pywapor.pre_et_look

Generates input data for pywapor.et_look.

rename_vars(ds, *args)

Rename some variables in a dataset.

Parameters

ds (xr.Dataset) – Input dataset whose variables will be renamed.

Returns

Dataset with renamed variables.

Return type

xr.Dataset

lapse_rate(ds, *args)

Applies lapse rate correction to variables whose name contains “t_air”.

Parameters

ds (xr.Dataset) – Dataset on whose variables containing “t_air” a lapse rate correction will be applied.

Returns

Dataset on whose variables containing “t_air” a lapse rate correction has been applied.

Return type

xr.Dataset

calc_doys(ds, *args, bins=None)

Calculate the day-of-the-year (doy) in the middle of a timebin and assign the results to a new variable doy.

Parameters
  • ds (xr.Dataset) – Input dataset.

  • bins (list, optional) – List of boundaries of the timebins, by default None

Returns

Dataset with a new variable containing the doy per timebin.

Return type

xr.Dataset

add_constants(ds, *args)

Adds default dimensionless constants to a dataset.

Parameters

ds (xr.Dataset) – Dataset to which the constants will be added.

Returns

Dataset with extra variables.

Return type

xr.Dataset

main(folder, latlim, lonlim, timelim, sources='level_2_v3', bin_length=1, enhancers=[<function lapse_rate>])

Prepare input data for et_look.

Parameters
  • folder (str) – Path to folder in which to store (intermediate) data.

  • latlim (list) – Latitude limits of area of interest.

  • lonlim (list) – Longitude limits of area of interest.

  • timelim (list) – Period for which to prepare data.

  • sources ("level_1" | "level_2" | "level_2_v3" | dict, optional) – Configuration for each variable and source, by default “level_1”.

  • bin_length (int | "DEKAD", optional) – Composite length, by_default “DEKAD”.

  • enhancers (list, optional) – Functions to apply to the xr.Dataset before creating the final output, by default [lapse_rate].

Returns

Dataset with input data for pywapor.et_look.

Return type

xr.Dataset