earth2studio.data.UFSObsConv#
- class earth2studio.data.UFSObsConv(time_tolerance=numpy.timedelta64(10, 'm'), max_workers=24, cache=True, async_timeout=600, verbose=True)[source]#
NOAA UFS GEFS-v13 replay observations in-situ data
- Parameters:
time_tolerance (TimeTolerance, optional) – Time tolerance window for filtering observations. Accepts a single value (symmetric ± window) or a tuple (lower, upper) for asymmetric windows, by default, np.timedelta64(10, ‘m’).
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.
Note
Additional resources:
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