Earth2Studio is now OSS!

earth2studio.data.CDS#

class earth2studio.data.CDS(cache=True, verbose=True)[source]#

The climate data source (CDS) serving ERA5 re-analysis data. This data soure requires users to have a CDS API access key which can be obtained for free on the CDS webpage.

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

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

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)[source]#

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 CDS lexicon.

Returns:

ERA5 weather data array from CDS

Return type:

xr.DataArray

classmethod available(time)[source]#

Checks if given date time is avaliable in the CDS with the pressure level database

Parameters:

time (datetime | np.datetime64) – Date time to access

Returns:

If date time is avaiable

Return type:

bool