data.CFS_Reforecast_FX_Flux¶
Global
Import path: earth2studio.data.CFS_Reforecast_FX_Flux
Documentation¶
Bases: CFS_Reforecast_FX
NCEP CFSv2 6-hourly 9-month reforecast (surface-flux product).
Same archive and access pattern as CFS_Reforecast_FX but
exposes the flxf product on the native T126 Gaussian grid
(190 x 384). Variable inventory mirrors
[CFSFluxLexicon][earth2studio.lexicon.CFSFluxLexicon] (which the reforecast
grib2 inventories match).
Parameters:
-
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:16) –Maximum number of concurrent async fetch tasks, by default 16.
-
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
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 reforecast 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, 0 to ~9 months).
-
variable(str | list[str] | VariableArray) –Variable identifier(s). Must be in the source's lexicon.
Returns:
-
DataArray–CFS reforecast 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 fetch of CFS reforecast data.
Parameters:
-
time(datetime | list[datetime] | TimeArray) –Initial-condition timestamps (UTC).
-
lead_time(timedelta | list[timedelta] | LeadTimeArray) –Forecast lead times.
-
variable(str | list[str] | VariableArray) –Variable identifier(s). Must be in the source's lexicon.
Returns:
-
DataArray–CFS reforecast data array.
available
classmethod
¶
available(time: datetime | datetime64) -> bool
Check whether a CFS reforecast initial condition is available.
Performs offline validity checks (6-hour cycle, history range); the
every-5-days cycle calendar is not enforced here because it shifts
slightly across leap-year boundaries. Off-schedule requests are
surfaced as FileNotFoundError at fetch time.
Parameters:
-
time(datetime | datetime64) –Initial-condition date time to check.
Returns:
-
bool–Whether the offline checks pass.