gfs#

GFS analysis data source via earth2studio.

Fetches Global Forecast System (GFS) 0.25-degree analysis data from cloud object stores (AWS or NCEP) using earth2studio.data.GFS. GFS provides global weather analysis on an equirectangular grid with spatial shape (721, 1440) (lat, lon).

Each pipeline index corresponds to a single timestamp, and the returned xarray.DataArray has dimensions (time, variable, lat, lon) with a single time step.

Classes#

GFSSource

Fetch GFS analysis fields from cloud object stores.

Module Contents#

class physicsnemo_curator.domains.da.sources.gfs.GFSSource(
times: list[datetime.datetime],
variables: list[str],
*,
source: str = 'aws',
cache: bool = False,
)#

Bases: physicsnemo_curator.core.base.Source[xarray.DataArray]

Fetch GFS analysis fields from cloud object stores.

GFS is a NOAA global weather analysis and forecasting model providing data on a 0.25-degree equirectangular grid (721 x 1440). Data is accessed via earth2studio and can be served from AWS or NCEP.

Parameters:
  • times (list[datetime]) – Timestamps to fetch. Must be at 6-hour intervals (00, 06, 12, 18 UTC). AWS source: available after 2021-01-01. NCEP source: last 10 days only.

  • variables (list[str]) – Earth2studio variable identifiers (e.g. "t2m", "u10m"). Must be present in earth2studio.lexicon.GFSLexicon.

  • source (str) – Cloud data source. One of "aws" (default) or "ncep".

  • cache (bool) – Whether to cache downloaded data locally. Default False.

Examples

>>> from datetime import datetime
>>> source = GFSSource(
...     times=[datetime(2024, 1, 1, 0)],
...     variables=["t2m", "u10m"],
... )
>>> len(source)
1
>>> da = next(source[0])
>>> da.dims
('time', 'variable', 'lat', 'lon')

Note

Initialize the GFS source.

param times:

Timestamps to fetch. Must be at 6-hour intervals.

type times:

list[datetime]

param variables:

Earth2studio variable identifiers.

type variables:

list[str]

param source:

Cloud data source ("aws" or "ncep").

type source:

str

param cache:

Whether to cache downloaded data locally.

type cache:

bool

classmethod params() list[physicsnemo_curator.core.base.Param]#

Return parameter descriptors for the GFS source.

Returns:

Descriptors for times, variables, source, and cache.

Return type:

list[Param]

property cache: bool#

Return whether local caching is enabled.

description: ClassVar[str] = 'GFS 0.25° analysis via earth2studio (AWS, NCEP)'#

Short description shown in the interactive CLI.

name: ClassVar[str] = 'GFS'#

Human-readable display name for the interactive CLI.

property source: str#

Return the cloud data source name.

property times: list[datetime.datetime]#

Return the list of timestamps in this source.

property variables: list[str]#

Return the list of variable IDs in this source.