-
foxes.input.states.DatasetStates(data_source, output_vars, var2ncvar=
{}, fixed_vars={}, load_mode='preload', time_format=None, bounds_extra_space=None, height_bounds=None, sel=None, isel=None, weight_factor=None, check_times=True, check_input_nans=True, preprocess_nc=None, interp_pars={}, **kwargs)[source] Constructor.
Parameters¶
- data_source: str or xarray.Dataset
The data or the file search pattern, should end with suffix ‘.nc’. One or many files.
- output_vars: list of str
The output variables
- var2ncvar: dict, optional
Mapping from variable names to variable names in the nc file
- fixed_vars: dict, optional
Uniform values for output variables, instead of reading from data
- load_mode: str
The load mode, choices: preload, lazy, fly. preload loads all data during initialization, lazy lazy-loads the data using dask, and fly reads only states index and weights during initialization and then opens the relevant files again within the chunk calculation
- time_format: str, optional
The datetime parsing format string
- bounds_extra_space: float or str, optional
The extra space, either float in m, or str for units of D, e.g. ‘2.5D’
- height_bounds: tuple, optional
The (h_min, h_max) height bounds in m. Defaults to H +/- 0.5*D
- sel: dict, optional
Subset selection via xr.Dataset.sel()
- isel: dict, optional
Subset selection via xr.Dataset.isel()
- weight_factor: float, optional
The factor to multiply the weights with
- check_times: bool
Whether to check the time coordinates for consistency
- check_input_nans: bool
Whether to check input data for NaNs, otherwise NaNs are removed
- preprocess_nc: callable, optional
A function to preprocess the netcdf Dataset before use
- interp_pars: dict, optional
Additional parameters the interpolation
- kwargs: dict, optional
Additional arguments for the base class