xso.model.Model
- class xso.model.Model[source]
Base model class, containing dictionaries of all model variables and components, as well as the function that sorts through all of these, and computes each step at model runtime.
It is instantiated once at model setup and filled with the specific variables defined in components and their supplied labels and values. The Model class is stored in the model backend and shared and written to by all components.
- __init__()[source]
Initializing defaultdicts to store model variables flexibly, before initializing them in Xarray-simlab backend.
Methods
__init__()Initializing defaultdicts to store model variables flexibly, before initializing them in Xarray-simlab backend.
model_function([time, current_state, forcing])General model function that computes forcings and fluxes.
unpack_flat_state(flat_state)Function called at the beginning of the model_function, to convert array of model values into a labeled dictionary.