data.CFS_FX_Flux¶
Global
Import path: earth2studio.data.CFS_FX_Flux
Documentation¶
Bases: CFS_FX
NCEP Climate Forecast System v2 surface-flux forecast source.
Identical access pattern to CFS_FX but exposes the flxf
product, 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, default:1) –CFS ensemble member, one of {1, 2, 3, 4}, by default 1.
-
source(str, default:'nomads') –Backing store:
"nomads"(default) or"aws". -
cache(bool, default:True) –Cache data source on local memory, by default True.
-
verbose(bool, default:True) –Print download progress, by default True.
-
async_timeout(int, default:600) –Total timeout in seconds for the entire fetch operation, by default 600.
-
async_workers(int, default:None) –Maximum number of concurrent downloads. By default None, which autoscales to the number of download tasks (capped at 64).
-
retries(int, default:3) –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__ ¶
__call__(
time: datetime | list[datetime] | TimeArray,
lead_time: timedelta | list[timedelta] | LeadTimeArray,
variable: str | list[str] | VariableArray,
) -> DataArray
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:
-
DataArray–CFS forecast data array with dimensions
[time, lead_time, variable, lat, lon].
fetch
async
¶
fetch(
time: datetime | list[datetime] | TimeArray,
lead_time: timedelta | list[timedelta] | LeadTimeArray,
variable: str | list[str] | VariableArray,
) -> DataArray
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:
-
DataArray–CFS forecast data array.
available
classmethod
¶
available(
time: datetime | datetime64, member: int = 1
) -> bool
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 | datetime64) –Initial-condition date time to check.
-
member(int, default:1) –CFS member to check, by default 1.
Returns:
-
bool–Whether the cycle directory exists in the AWS bucket.