input.converter_functions#
A collection of functions unique to an input dataset required for conversion to valenspy compliant xarray datasets.
Functions
|
Convert a xarray with raw ALARO_K data to a ValensPy compliant xarray Dataset. |
|
Convert a xarray with raw CCLM data to a ValensPy compliant xarray Dataset. |
|
Convert a xarray with raw EOBS data to a ValensPy compliant xarray Dataset. |
|
Convert a xarray with raw ERA5 data to a ValensPy compliant xarray Dataset. |
|
Convert a xarray with raw MAR data to a ValensPy compliant xarray Dataset. |
|
Convert a xarray with raw RADCLIM data to a ValensPy compliant xarray Dataset. |
- ALARO_K_to_CF(ds: Dataset) Dataset [source]#
Convert a xarray with raw ALARO_K data to a ValensPy compliant xarray Dataset.
Does nothing, WIP
- Parameters:
ds (xr.Dataset) – The xarray Dataset of ALARO_K simulation to convert
- Returns:
The CF compliant CCLM model data for the specified variable.
- Return type:
Dataset
- CCLM_to_CF(ds: Dataset) Dataset [source]#
Convert a xarray with raw CCLM data to a ValensPy compliant xarray Dataset.
Flatten the pressure dimension by renaming variables with the pressure level in the name and removing the pressure dimension. Drop the last time step of the dataset.
- Parameters:
ds (xr.Dataset) – The xarray Dataset of CCLM simulation to convert
- Returns:
The CF compliant CCLM model data for the specified variable.
- Return type:
Dataset
- EOBS_to_CF(ds: Dataset) Dataset [source]#
Convert a xarray with raw EOBS data to a ValensPy compliant xarray Dataset.
Rename latitude and longitude coordinates to lat and lon, respectively.
- Parameters:
ds (xr.Dataset) – The xarray Dataset of EOBS observations to convert
- Returns:
The CF compliant EOBS observations for the specified variable.
- Return type:
Dataset
- ERA5_to_CF(ds: Dataset) Dataset [source]#
Convert a xarray with raw ERA5 data to a ValensPy compliant xarray Dataset.
Rename latitude and longitude coordinates to lat and lon, respectively. Rename valid_time to time for certain variables.
- Parameters:
ds (xr.Dataset) – The xarray Dataset of ERA5 observations to convert
- Returns:
The CF compliant ERA5 observations for the specified variable.
- Return type:
Dataset
- MAR_to_CF(ds: Dataset) Dataset [source]#
Convert a xarray with raw MAR data to a ValensPy compliant xarray Dataset.
Rename TIME to time and remove the ZTQLEV and ZUVLEV dimensions by selecting the first value of each dimension.
- Parameters:
ds (xr.Dataset) – The xarray Dataset of MAR simulation to convert
- Returns:
xarray dataset ready for unit conversion
- Return type:
Dataset
- RADCLIM_to_CF(ds: Dataset) Dataset [source]#
Convert a xarray with raw RADCLIM data to a ValensPy compliant xarray Dataset.
Rename nlon and nlat to lon and lat, respectively. Set the coordinates lat_bounds and lon_bounds as coordinates.
- Parameters:
ds (xr.Dataset) – The xarray Dataset of CCLM simulation to convert
- Returns:
The CF compliant CCLM model data for the specified variable.
- Return type:
Dataset