ModelState#
- class fridom.framework.model_state.ModelState(mset: ModelSettingsBase, clock: Clock | None = None)[source]#
Bases:
objectStores the model state variables and the time information.
Description#
The base class for model states. It contains the state vector, the time step and the model time. Child classes may add more attributes as for example the diagnostic variables needed for the model. All model state variables should be stored in this class.
Parameters#
- msetModelSettings
The model settings object.
- clockClock, optional
The clock object to keep track of the model time.
- __init__(mset: ModelSettingsBase, clock: Clock | None = None) None[source]#
Methods
Attributes
The clock of the model.
The tendency vector.
The iteration number.
Flag to cancel the model run in case something goes wrong.
Model State as xarray dataset
Model State of sliced domain as xarray dataset
The state vector.
The diagnostic state vector.
Examples using
fridom.framework.ModelState#- property xr#
Model State as xarray dataset
- property xrs#
Model State of sliced domain as xarray dataset
- property z: VectorField#
The state vector.
- property z_diag: VectorField#
The diagnostic state vector.
- property dz: VectorField#
The tendency vector.
- property it: int#
The iteration number.
- property panicked: bool#
Flag to cancel the model run in case something goes wrong.