CFS_FX_Flux#
- class earth2studio.data.CFS_FX_Flux(
- member=1,
- source='nomads',
- cache=True,
- verbose=True,
- async_timeout=600,
- async_workers=16,
- retries=3,
- Global
NCEP Climate Forecast System v2 surface-flux forecast source.
Identical access pattern to
CFS_FXbut exposes theflxfproduct, which carries surface and near-surface diagnostic fields on the native T126 Gaussian grid (190 x 384). Use this source for surface fluxes (sensible/latent heat, radiation, precipitation rate), boundary-layer diagnostics, and cloud-cover summaries.- Parameters:
member (int, optional) – CFS ensemble member, one of {1, 2, 3, 4}, by default 1.
source (str, optional) – Backing store:
"nomads"(default) or"aws".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) – Total timeout in seconds for the entire fetch operation, by default 600.
async_workers (int, optional) – Maximum number of concurrent async fetch tasks, by default 16.
retries (int, optional) – Number of retry attempts per failed fetch task with exponential backoff, by default 3.
Warning
This is a remote data source and can potentially download a large amount of data to your local machine for large requests.
Note
The Gaussian latitude axis is non-uniform; values are the roots of the Legendre polynomial of degree 190 mapped through
arcsin. Downstream consumers expecting an equiangular grid will need to regrid first.Note
Additional information on the data repository:
- __call__(time, lead_time, variable)[source]#
Retrieve CFS forecast data.
- Parameters:
time (datetime | list[datetime] | TimeArray) – Initial-condition timestamps to return data for (UTC).
lead_time (timedelta | list[timedelta] | LeadTimeArray) – Forecast lead times to fetch (6-hour increments).
variable (str | list[str] | VariableArray) – Variable identifier(s). Must be in the source’s lexicon.
- Returns:
CFS forecast data array with dimensions
[time, lead_time, variable, lat, lon].- Return type:
xr.DataArray
- async fetch(time, lead_time, variable)[source]#
Async function to get CFS forecast data.
- Parameters:
time (datetime | list[datetime] | TimeArray) – Initial-condition timestamps to return data for (UTC).
lead_time (timedelta | list[timedelta] | LeadTimeArray) – Forecast lead times to fetch (6-hour increments).
variable (str | list[str] | VariableArray) – Variable identifier(s). Must be in the source’s lexicon.
- Returns:
CFS forecast data array.
- Return type:
xr.DataArray
- classmethod available(time, member=1)[source]#
Check whether a given CFS initial condition is available on AWS.
Uses the public AWS PDS bucket (the most complete public archive) rather than NOMADS, so this works regardless of the rolling-window cutoff on the NCEP server.
- Parameters:
time (datetime | np.datetime64) – Initial-condition date time to check.
member (int, optional) – CFS member to check, by default 1.
- Returns:
Whether the cycle directory exists in the AWS bucket.
- Return type:
bool