Skip to content

diag_manager_monitor

HAS_PYFMS = True module-attribute

DiagManagerMonitor

Bases: Monitor

sympl.Monitor-style object for sending diagnostics to FMS's diag manager

fields = {} instance-attribute

axes = {} instance-attribute

diag_end_time = None instance-attribute

domain_id = domain_id instance-attribute

__init__(domain_id)

Create a DiagManagerMonitor.

Parameters:

Name Type Description Default
domain_id int

integer domain-decomposition identifier as returned by mpp_define_domain

required

store(state)

Sends data from quantities in the state to be written by the diag_manager. All state variables must be registered beforehand via register_field.

cleanup()

Calls diag_manager.end after simulation ends to ensure all data is written.

set_end_time(end_time)

Sets the end time to stop recieving data. Must be called prior to cleanup/diag_manager.end()

set_timestep(timestep)

Sets the timestep to increment by after data is sent.

register_field(module_name, field_name, units, dtype, init_time, dims=None, missing_value=None, long_name=None, range_data=None)

Register a diagnostic field with the FMS diag_manager via the pyFMS interface for fortran This corresponds to a variable/field in the output netcdf file. Any axis/dimensions used by this variable should be registered prior to this function.

register_axis(name, axis_data, not_xy, cart_name=None, long_name=None, units=None, domain_id=None, set_name=None)

Registers an axis with the FMS diag_manager via the pyFMS interface for fortran This corresponds to a axis/dimension in the output netcdf file. Time axis will be added as an unlimited dimension automatically, so does not need to be explicitly registered.