netcdf_monitor
NetCDFMonitor
sympl.Monitor-style object for storing model state dictionaries netCDF files.
__init__(path, communicator, time_chunk_size=1, precision=Float)
Create a NetCDFMonitor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
directory in which to store data |
required |
communicator
|
Communicator
|
provides global communication to gather state |
required |
time_chunk_size
|
int
|
number of times per file |
1
|
store(state)
Append the model state dictionary to the netcdf files.
Will only write to disk when a full time chunk has been accumulated, or when .cleanup() is called.
Requires the state contain the same quantities with the same metadata as the first time this is called. Dimension order metadata may change between calls so long as the set of dimensions is the same. Quantities are stored with dimensions [time, tile] followed by the dimensions included in the first state snapshot. The one exception is "time" which is stored with dimensions [time].