ERA5 interface

Using the OMUSE interface to ERA5 you can access the CDS ERA5 dataset in a code-like manner. The ERA5 class has a model interface with a evolve_model method which handles the download and caching of ERA5 data in a transparent fashion.

Variables

Currently the ERA5 interface exposes single level variables from ERA5. Variables are available on standard OMUSE grid object.

Prerequisites

ERA5 needs the CDSAPI installed as well as a valid access key in `` ~/.cdsapirc``

Example

example:

from omuse.units import units
from omuse.community.era5.interface import ERA5

e=ERA5(variables=["2m_temperature", "total_precipitation"],
        nwse_boundingbox=[70, -15, 40, 15]| units.deg)

print("starting date:", e.start_datetime)
print(e.grid) # note grid has prepended the names with _ (because ERA5 variable names are not always valid python var names)

e.evolve_model(128 | units.hour)
val=e.grid._2m_temperature.value_in(units.K)
class omuse.community.era5.interface.ERA5(maxcache=None, cachedir='./__era5_cache', start_datetime=datetime.datetime(1979, 1, 2, 0, 0), variables=[], grid_resolution=None, nwse_boundingbox=None, invariate_variables=['land_sea_mask'], download_timespan='day')

ERA5 interface

Parameters:
  • cachedir (str, optional) – directory used for storing cache files, default: “./__era5_cache”
  • start_datetime (datetime object, optional) – starting date of model. Must be datatime object, default: datetime.datetime(1979,1,2)
  • variables (list of str, optional) – variables to be retrieved. Must be list of valid strings. default: []
  • grid_resolution (0.25, 0.5 or 1.0 | units.deg, optional) – Resolution of the retrieved grid. default: 0.25 | units.deg
  • nwse_boundingbox (None or [North,West,South,East], optional) – Bounding box of grid, will be [90,-180,-90,180] | units.deg (whole globe) if None. default: None
  • invariate_variables (list of str, optional) – invariate variables to retrieve. Will be included on the grid (but not updated). default: [“land_sea_mask”]
  • download_timespan (None, "day" or "month", optional) –

    timespan of downloaded files. Longer timespans result in fewer but bigger downloads, default: “day”

    [1]Copernicus Climate Change Service (C3S) (2017): ERA5: Fifth generation of ECMWF atmospheric reanalyses of the global climate . Copernicus Climate Change Service Climate Data Store (CDS)
    [2]Hersbach, H. et al., 2020: The ERA5 Reanalysis. Quart. J. Roy. Meteorol. Soc., doi: 10.1002/qj.3803
    [3]Pelupessy, F.I., Chertova, M., van den Oord, G., van Werkhoven, B., 2020, EGU General Assembly, doi: 10.5194/egusphere-egu2020-18011