earth2studio.data.UFSObsConv#

class earth2studio.data.UFSObsConv(tolerance=numpy.timedelta64(0), max_workers=24, cache=True, async_timeout=600, verbose=True)[source]#

NOAA UFS GEFS-v13 replay observations in-situ data

Parameters:
  • tolerance (timedelta | np.timedelta64, optional) – Time tolerance; observations within +/- tolerance of any requested time are returned, by default np.timedelta64(0).

  • max_workers (int, optional) – Max workers in async IO thread pool for concurrent downloads, by default 24.

  • cache (bool, optional) – Cache data source in local filesystem cache, by default True.

  • async_timeout (int, optional) – Time in seconds after which the async fetch will be cancelled if not finished, by default 600.

  • verbose (bool, optional) – Log basic progress information, 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.

Example

ds = UFSObsConv(tolerance=timedelta(hours=2))
df = ds(datetime(2024, 1, 1, 20), ["u"])
__call__(time, variable, fields=None)#

Fetch observations for a set of timestamps.

Parameters:
  • time (datetime | list[datetime] | TimeArray) – Timestamps to return data for (UTC).

  • variable (str | list[str] | VariableArray) – DataFrame column names to return.

  • fields (str | list[str] | pa.Schema | None, optional) – Fields to include in output, by default None (all fields).

Return type:

DataFrame

async fetch(time, variable, fields=None)#

Async function to get data.

Parameters:
  • time (datetime | list[datetime] | ndarray[datetime64])

  • variable (str | list[str] | ndarray[str])

  • fields (str | list[str] | Schema | None)

Return type:

DataFrame