pycontrails.datalib.dwd.ods

DWD Open Data Server utilities.

Functions

get(rpath, lpath)

Get data file from Open Data Server.

global_latitude_rpath(forecast)

Get path to remote latitude file for global icosahedral grid.

global_longitude_rpath(forecast)

Get path to remote longitude file for global icosahedral grid.

list_forecast_steps(domain, forecast)

List forecast steps available for a given forecast cycle.

list_forecasts(domain)

List available forecast cycles.

rpath(domain, forecast, variable, step, level)

Get URL remote data file.

pycontrails.datalib.dwd.ods.get(rpath, lpath)

Get data file from Open Data Server.

Parameters:
  • rpath (str) – URL of remote file on Open Data Server

  • lpath (str) – Local path where file contents will be saved

pycontrails.datalib.dwd.ods.global_latitude_rpath(forecast)

Get path to remote latitude file for global icosahedral grid.

Parameters:

forecast (datetime) – Start time of forecast cycle.

Returns:

str – URL of grib file with cell-center latitudes

pycontrails.datalib.dwd.ods.global_longitude_rpath(forecast)

Get path to remote longitude file for global icosahedral grid.

Parameters:

forecast (datetime) – Start time of forecast cycle.

Returns:

str – URL of grib file with cell-center longitudes

pycontrails.datalib.dwd.ods.list_forecast_steps(domain, forecast)

List forecast steps available for a given forecast cycle.

Parameters:
  • domain (str) – ICON domain. Must be one of “global”, “europe”, or “germany”.

  • forecast (datetime) – Start time of forecast cycle.

Returns:

list[datetime] – Times of available forecast steps. If no data is available for the specified forecast cycle a warning is issued and an empty list is returned.

pycontrails.datalib.dwd.ods.list_forecasts(domain)

List available forecast cycles.

Parameters:

domain (str) – ICON domain. Must be one of “global”, “europe”, or “germany”.

Returns:

list[datetime] – Start time of available forecast cycles

pycontrails.datalib.dwd.ods.rpath(domain, forecast, variable, step, level)

Get URL remote data file.

Parameters:
  • domain (str) – ICON domain. Must be one of “global”, “europe”, or “germany”.

  • forecast (datetime) – Start time of forecast cycle.

  • variable (str) – Open Data Server variable name.

  • step (int) – Forecast step.

  • level (int | None) – Model level for 3d variables or None for 2d variables

Returns:

str – URL of remote data file.