WVModelOutputFile
Organize one NetCDF output file for a WVModel.
Declaration
WVModelOutputFile < handleOverview
A WVModelOutputFile owns the writable NetCDF handle and one or more
output groups. The file is opened when its first group initializes, so
ncfile may be empty before output begins.
Most users create a configured file through WVModel:
outputFile = model.createNetCDFFileForModelOutput("myfile.nc",outputInterval=86400);
This adds an evenly spaced output group containing the wave-vortex coefficients. For explicit control, first create an empty file description and then add one or more groups:
outputFile = model.addNewOutputFile("myfile.nc");
outputGroup = outputFile.addNewEvenlySpacedOutputGroup( ...
"daily",initialTime=model.t,outputInterval=86400);
An empty output file has no schedule and writes nothing until a group is
added. The physical NetCDF file is created lazily at the first scheduled
output time, so ncfile remains empty beforehand. Close the file through
the model or output-file facade when writing is complete.
Topics
- Create model output
WVModelOutputFileinitialize a WVModelOutputFile
- Manage output observers
addObservingSystemadd an observing system to the ouput group (if there is only one group)
- Write and close output
closeNetCDFFilecloses the netcdf file after informing the output groupsinitializeOutputFiletells the output groups to initialize themselves in the NetCDF filewriteTimeStepToOutputFiletells the output groups to write data at time t
Developer Topics
These items document internal implementation details and are not part of the primary public API.
- Output persistence and scheduling
addNewEvenlySpacedOutputGroupadd an evenly-spaced output group to this fileaddOutputGroupadd an output group to this filedidInitializeStorageboolean indicating whether or not the internal structure of the NetCDF file has been createdfilenamename of the current (or future) NetCDF filemodelOutputFileFromFilecreate a WVModelOutputFile from an existing NetCDFFilencfilereference to the NetCDFFile being used for model outputoutputGroupNamesretrieve the names of all output group namesoutputGroupWithNameretrieve a WVModelOutputGroup by nameoutputGroupsarray ofWVModelOutputGroups that will be written to fileoutputTimesForIntegrationPeriodreturns 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 history
- Output internals
modelreference to the WVModel being usedobservingSystemWillWriteWaveVortexCoefficientsA simple check to see if one of the observing systems will be writing wave-vortex coefficientspathcurrent (or future) path of the NetCDF filetInitializetime at which the NetCDF file will be createdwvtpass-through of the wvt instance