WVModelOutputGroup
A WVModelOutputGroup represents a group of observing system to be written to file at particular output times
Declaration
WVModelOutputFile < handleOverview
A WVModelOutputGroup encapsulates a netcdf group with particular
output times t; it has one or more observing systems that get written to the group at those times.
The simplest output group is the
WVModelOutputGroupEvenlySpaced
which, as the name suggests, writes outputs at an evenly spaced
interval.
The reason for this abstraction is that some observing systems do not have evenly spaced output intervals, e.g., the AlongTrackSimulator, and it is often the case that one might want to sample the model for a short interval at higher frequency, e.g., sampling a mooring at high frequency to resolve the buoyancy frequency, or running a tracer experiment for 24 hours in the middle of a long model run.
Usage
outputFile = model.addNewOutputFile("myfile.nc");
outputGroup = WVModelOutputGroupEvenlySpaced(model,name="high-temporal-resolution",initialTime=wvt.t,outputInterval=wvt.inertialPeriod/20);
outputFile.addOutputGroup(outputGroup);
Topics
- Properties
didInitializeStorageboolean indicating whether or not the internal structure of the NetCDF file has been createdmodelReference to the WVModel being usednameof the current (or future) group in the NetCDF file
- Observing systems
addObservingSystemadd an observing system to this fileobservingSystemWithNameretrieve an observing system by nameobservingSystemsarray of WVObservingSystem that will be written to the groupremoveObservingSystemremove an observing system to this file
- Required subclass overrides
outputTimesForIntegrationPeriodreturns a unique, ordered array of the aggregate output times during the requested integration period.
- Internal
closeNetCDFFilenotification that the NetCDF file will closeinitObservingSystemsFromGroupasks the output group to load the observing systems in the NetCDF fileinitializeOutputGroupinitializes a new output group in the NetCDF filerecordNetCDFFileHistorylosg this time step in the NetCDF historywriteTimeStepToNetCDFFilewrites data at time t
- Initialization
WVModelOutputGroupinitialize a WVModelOutputGroupmodelOutputGroupFromGroupinitialize a WVModelOutputGroup instance from NetCDF file
- Writing to NetCDF files
groupReference to the NetCDFGroup being used for model output
- Integration
incrementsWrittenToGroupoutput index of the current/most recent step.timeOfLastIncrementWrittenToGroupoutput index of the current/most recent step.