NEDAS.core.state_info module
- class NEDAS.core.state_info.StateInfo(c: Context)[source]
Bases:
objectManages the metadata, indexing, and memory offsets for the model state.
- Variables:
shape (tuple) – domain dimension(s) for the fields
fields (dict[int, FieldRecord]) – dictionary containing field ids and the corresponding field records
size (int) – total size of the complete state (bytes), for one member
variables (set[str]) – set of unique variables in the state
err_types (set[str]) – set of unique error models in the state
- shape: tuple
- mask: ndarray
- fields: dict[int, FieldRecord]
- size: int
- variables: list[str]
- err_types: list[str]
- add_fields_for_variable(c: Context, vrec: dict) None[source]
Add fields for a variable in the state. The state variable has dimensions t, z, y, x while the ‘field’ is the 2D part with y, x dimensions.
- Parameters:
c (Context) – the runtime context object
vrec (dict) – the variable record defining its properties