WVModelOutputFile
A WVModelOutputFile represents a file to be written to disk and has one or more output groups
Declaration
WVModelOutputFile < handleOverview
A WVModelOutputFile represents a file to be written to disk, that
may or may not have been created yet, depending on the model time.
The ncfile property therefore may be empty if a NetCDF file is not
yet created for writing.
A WVModelOutputFile holds onto one or more output groups, instances
of WVModelOutputGroup, and internally they orchestrate pausing the
model and writing to groups
Usage
You probably do not ever need to initialize a WVModelOutputFile
directly, but instead should use the convenience method defined in
WVModel,
outputFile = model.addNewOutputFile("myfile.nc");
At this stage the file contains no output groups and will not write anything to file. You can now add output groups to the file. Most users will want to simply use
outputFile = model.createNetCDFFileForModelOutput("myfile.nc",outputInterval=86400);
which will additionally add the evenly-spaced output group and record the wave-vortex coefficients.
Topics
- Properties
didInitializeStorageboolean indicating whether or not the internal structure of the NetCDF file has been createdfilenamename of the current (or future) NetCDF filemodelreference to the WVModel being usedncfilereference to the NetCDFFile being used for model outputoutputGroupsarray ofWVModelOutputGroups that will be written to filepathcurrent (or future) path of the NetCDF filetInitializetime at which the NetCDF file will be createdwvtpass-through of the wvt instance
- Internal
closeNetCDFFilecloses the netcdf file after informing the output groupsinitializeOutputFiletells the output groups to initialize themselves in the NetCDF fileobservingSystemWillWriteWaveVortexCoefficientsA simple check to see if one of the observing systems will be writing wave-vortex coefficientsoutputTimesForIntegrationPeriodreturns a unique, ordered array of the aggregate output times during the requested integration period.recordNetCDFFileHistorytells the output groups to log this time step in the NetCDF historywriteTimeStepToOutputFiletells the output groups to write data at time t
- Initialization
WVModelOutputFileinitialize a WVModelOutputFilemodelOutputFileFromFilecreate a WVModelOutputFile from an existing NetCDFFile
- Output groups
addNewEvenlySpacedOutputGroupadd an evenly-spaced output group to this fileaddObservingSystemadd an observing system to the ouput group (if there is only one group)addOutputGroupadd an output group to this fileoutputGroupNamesretrieve the names of all output group namesoutputGroupWithNameretrieve a WVModelOutputGroup by name