CAMS_FX#

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

CAMS Global atmospheric composition forecast data source.

Uses the cams-global-atmospheric-composition-forecasts dataset. Grid is 0.4 deg global (451 x 900).

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, registration, and authentication can be referenced here:

__call__(time, lead_time, variable)[source]#

Retrieve CAMS Global forecast data.

Parameters:
  • time (datetime | list[datetime] | TimeArray) – Forecast initialization times (UTC).

  • lead_time (timedelta | list[timedelta] | LeadTimeArray) – Forecast lead times.

  • variable (str | list[str] | VariableArray) – Variables to return. Must be in CAMSGlobalLexicon.

Returns:

CAMS forecast data array with dims [time, lead_time, variable, lat, lon]

Return type:

xr.DataArray

async fetch(time, lead_time, variable)[source]#

Async retrieval of CAMS Global forecast data.

Parameters:
  • time (datetime | list[datetime] | TimeArray) – Forecast initialization times (UTC).

  • lead_time (timedelta | list[timedelta] | LeadTimeArray) – Forecast lead times.

  • variable (str | list[str] | VariableArray) – Variables to return. Must be in CAMSGlobalLexicon.

Returns:

CAMS forecast data array with dims [time, lead_time, variable, lat, lon]

Return type:

xr.DataArray

classmethod available(time)[source]#

Check if CAMS Global forecast data is available for the requested times.

Parameters:

time (datetime | list[datetime]) – Timestamps to check availability for.

Returns:

True if all requested times are within the valid range.

Return type:

bool