earth2studio.data.WB2Climatology#

class earth2studio.data.WB2Climatology(climatology_zarr_store='1990-2017_6h_1440x721.zarr', cache=True, verbose=True, async_timeout=600)[source]#

Climatology provided by WeatherBench2,

A climatology is used for e.g. computing anomaly metrics such as the ACC.
For WeatherBench 2, the climatology was computed using a running window for
smoothing (see paper and script) for each day of year and sixth hour of day.
We have computed climatologies for 1990-2017 and 1990-2019.
Parameters:
  • climatology_zarr_store (ClimatologyZarrStore, optional) –

    Stores within gs://weatherbench2/datasets/era5-hourly-climatology/ to select As of 05/03/2024 this is the following list of available files:

    • 1990-2017_6h_1440x721.zarr

    • 1990-2017_6h_512x256_equiangular_conservative.zarr

    • 1990-2017_6h_240x121_equiangular_with_poles_conservative.zarr

    • 1990-2017_6h_64x32_equiangular_conservative.zarr

    • 1990-2019_6h_1440x721.zarr

    • 1990-2019_6h_512x256_equiangular_conservative.zarr

    • 1990-2019_6h_240x121_equiangular_with_poles_conservative.zarr

    • 1990-2019_6h_64x32_equiangular_conservative.zarr

    by default 1990-2019_6h_1440x721.zarr

  • cache (bool, optional) – Cache data source on local memory, by default True

  • verbose (bool, optional) – Print download progress, by default True

  • async_timeout (int, optional) – Time in sec after which download will be cancelled if not finished successfully, by default 600

Warning

This is a remote data source and can potentially download a large amount of data to your local machine for large requests.

Note

Additional information on the data repository can be referenced here:

__call__(time, variable)#

Function to get data

Parameters:
  • time (datetime | list[datetime] | TimeArray) – Timestamps to return data for (UTC).

  • variable (str | list[str] | VariableArray) – String, list of strings or array of strings that refer to variables to return. Must be in the WB2 lexicon.

Returns:

ERA5 weather data array from weather bench 2

Return type:

xr.DataArray

async fetch(time, variable)[source]#

Async function to get data

Parameters:
  • time (datetime | list[datetime] | TimeArray) – Timestamps to return data for (UTC).

  • variable (str | list[str] | VariableArray) – String, list of strings or array of strings that refer to variables to return. Must be in the WB2 Climatology lexicon.

Returns:

ERA5 weather data array from weather bench 2

Return type:

xr.DataArray