cds

create_time_settings(timelim)

Reformats the time limits so that they can be ingested by CDS.

Parameters

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

Returns

Time entries for CDS.

Return type

list

request_size(setting)

Check the total size of a CDS request.

Parameters

setting (list) – Time entries for CDS.

Returns

Size of request.

Return type

float

split_setting(setting, max_size=100)

Split a request into smaller requests untill size is smaller than max_size.

Parameters
  • setting (list) – Time entries for CDS.

  • max_size (int, optional) – Max allowed request size by CDS, by default 100.

Returns

Setting broken up into smaller parts.

Return type

list

split_settings(settings, max_size=100)

Split multuple requests into smaller requests untill all sizes are smaller than max_size.

Parameters
  • setting (list) – Time entries for CDS.

  • max_size (int, optional) – Max allowed request size by CDS, by default 100.

Returns

Settings broken up into smaller parts.

Return type

list

download(folder, product_name, latlim, lonlim, timelim, variables, post_processors)

Download data from CDS.

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

  • product_name (str) – Product name to download.

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

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

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

  • variables (dict) – keys are variable names, values are additional settings.

  • post_processors (dict) – processors to apply to specific variables.

Returns

Dataset with downloaded data.

Return type

xr.Dataset