-
foxes.input.states.FieldDataNC(data_source, output_vars, var2ncvar=
{}
, fixed_vars={}
, states_coord='Time'
, x_coord='UTMX'
, y_coord='UTMY'
, h_coord='height'
, load_mode='preload'
, weight_ncvar=None
, time_format='%Y-%m-%d_%H:%M:%S'
, sel=None
, isel=None
, interp_nans=False
, bounds_extra_space=1000
, **interpn_pars)[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
- states_coord: str
The states coordinate name in the data
- x_coord: str
The x coordinate name in the data
- y_coord: str
The y coordinate name in the data
- h_coord: str, optional
The height coordinate name in the 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
- weight_ncvar: str, optional
Name of the weight data variable in the nc file(s)
- time_format: str
The datetime parsing format string
- sel: dict, optional
Subset selection via xr.Dataset.sel()
- isel: dict, optional
Subset selection via xr.Dataset.isel()
- interp_nans: bool
Linearly interpolate nan values
- bounds_extra_space: float or str, optional
The extra space, either float in m, or str for units of D, e.g. ‘2.5D’
- interpn_pars: dict, optional
Additional parameters for scipy.interpolate.interpn