arctichoke.dataset.field_mean
Attributes
Functions
|
Get the field mean of the dataset. |
Module Contents
- arctichoke.dataset.field_mean.cdo
- arctichoke.dataset.field_mean.cdo
- arctichoke.dataset.field_mean.get_field_mean(dataset: str, [str], xarray.DataArray, xarray.Dataset, save_as: str = None, **kwargs)
Get the field mean of the dataset.
Use the cdo function fldmean to take the field mean (the mean over the geographic area) of the given dataset.
- Parameters:
dataset (str, list of str, xarray.DataArray, xarray.Dataset) – The dataset of which to take the field mean.
save_as (str, None, optional) – The file name to pass to cdo.fldmean(output=save_as). Default is None, which doesn’t save the dataset to a file.
**kwargs – Keyword arguments to pass to cdo.fldmean().
- Returns:
fldmean_xr – A dataset of the field mean of the input data.
- Return type:
xarray.Dataset
Examples
>>> from arctichoke.dataset.field_mean import get_field_mean >>> fldmean_xr = get_field_mean('data/NWP_cdo_CLI_areacello_Ofx_EC-Earth3P-HR_highres-future_r2i1p2f1_gn.nc') >>> fldmean_xr['areacello'].values[0] (get_field_mean) `save_as`: None array([1.3731426e+08], dtype=float32)