pyremo.preproc.get_gcm_dataset

get_gcm_dataset(ds, ref_ds=None, tos=None, attrs=None, use_cftime=True, invertlev=None, time_range=None)[source]

Creates a global dataset ready for preprocessing.

This function creates a homogenized global dataset. If necessary, units are converted and the sea surface temperature tos is interpolated spatially and temporally to the atmospheric grid.

Parameters:
  • ds (xarray.Dataset or dict of filenames) – Input dataset from a global model according to CF conventions.

  • ref_ds (xarray.Dataset) – Reference datasets that is used for determining the grid and vertical coordinates and the global attributes. If ref_ds=None, ta from the input dataset is used as a reference.

  • attrs – Global attributes for the output dataset. If attrs=None, the global attributes from ref_ds are used.

Returns:

gfile (xarray.Dataset) – Global dataset ready for preprocessing.