- class foxes.input.states.SingleStateField(foxes.core.States)[source]
Single state field, i.e. no state coordinate, just a regular grid.
Attributes¶
- data_source: xarray.Dataset or str
The NetCDF dataset to read from, or a path to it.
- output_vars: list of str
List of variable names to read.
- var2ncvar: dict
Mapping from variable names to netCDF variable names.
- fixed_vars: dict
Mapping from variable names to fixed values.
- x_coord: str
Name of the x coordinate.
- y_coord: str
Name of the y coordinate.
- h_coord: str
Name of the height coordinate.
- sel: dict
Subset selection via xr.Dataset.sel()
- isel: dict
Subset selection via xr.Dataset.isel()
- interp_pars: dict
Interpolation parameters, passed to the interpolation function.
- bounds_extra_space: float or str
The extra space, either float in m, or str for units of D, e.g. ‘2.5D’
- height_bounds: tuple
The (h_min, h_max) height bounds in m. Defaults to H +/- 0.5*D
Public members¶
-
SingleStateField(data_source, output_vars, var2ncvar=
{}, ...)[source] Constructor.
- output_point_vars(algo)[source]
The variables which are being modified by the model.
- property data
The field data
-
load_data(algo=
None, verbosity=1)[source] Load and/or create all model data that is subject to chunking.
-
reset(algo=
None, states_sel=None, states_loc=None, verbosity=0)[source] Reset the states, optionally select states
- gen_states_split_size()[source]
Generator for suggested states split sizes for output writing.
- classmethod new(states_type, *args, **kwargs)[source]
Run-time states factory.
- output_coords()[source]
Gets the coordinates of all output arrays
- ensure_output_vars(algo, tdata)[source]
Ensures that the output variables are present in the target data.
- run_calculation(algo, *data, out_vars, **calc_pars)[source]
Starts the model calculation in parallel.
- property model_id
Unique id based on the model type.
- property initialized
Initialization flag.
- sub_models()[source]
List of all sub-models
-
initialize(algo, verbosity=
0, force=False)[source] Initializes the model.
- property running
Flag for currently running models
-
set_running(algo, data_stash, sel=
None, isel=None, verbosity=0)[source] Sets this model status to running, and moves all large data to stash.
-
unset_running(algo, data_stash, sel=
None, isel=None, verbosity=0)[source] Sets this model status to not running, recovering large data from stash
-
get_data(variable, target, lookup=
'smfp', mdata=None, ...)[source] Getter for a data entry in the model object or provided data sources