-
foxes.input.states.create.create_dataset_mean(data_source, coord, var2ncvar, to_file=
None, preprocess=None, verbosity=1, **kwargs)[source] Create dataset mean state data and optionally write to file.
Parameters¶
- data_source: str or xarray.Dataset
The data or the file search pattern, should end with suffix ‘.nc’. One or many files.
- coord: str
Name of the coordinate which should be averaged over
- var2ncvar: dict
Mapping from variable names to netCDF variable names. Will be searched for FV.WS, FV.WD, FV.U, FV.V
- to_file: str, optional
If given, write the mean state to this file
- preprocess: callable, optional
Preprocessing function with signature ds = preprocess(ds) which is applied to each dataset after reading.
- verbosity: int
The verbosity level, 0 = silent
- kwargs: dict, optional
Additional keyword arguments passed to xarray.open_dataset
Returns¶
- data: xarray.Dataset
The created mean state data