earth2studio.data
.HRRR_FX#
- class earth2studio.data.HRRR_FX(source='aws', max_workers=24, cache=True, verbose=True, async_timeout=600)[source]#
High-Resolution Rapid Refresh (HRRR) forecast source provides a North-American weather forecasts with hourly forecast runs developed by NOAA. This forecast source has hourly forecast steps up to a lead time of 48 hours. Data is provided on a Lambert conformal 3km grid at 1-hour intervals. The spatial dimensionality of HRRR data is [1059, 1799].
- Parameters:
source (str, optional) – Data source to use (‘aws’, ‘google’, ‘azure’, ‘nomads’), by default ‘aws’
max_workers (int, optional) – Max works in async io thread pool. Only applied when using sync call function and will modify the default async loop if one exists, by default 24
cache (bool, optional) – Cache data source on local memory, by default True
verbose (bool, optional) – Print download progress, by default True
async_timeout (int, optional) – Time in sec after which download will be cancelled if not finished successfully, by default 600
Warning
This is a remote data source and can potentially download a large amount of data to your local machine for large requests.
Note
48 hour forecasts are provided on 6 hour intervals. 18 hour forecasts are generated hourly.
Note
Additional information on the data repository can be referenced here:
- __call__(time, lead_time, variable)[source]#
Retrieve HRRR forecast data
- Parameters:
time (datetime | list[datetime] | TimeArray) – Timestamps to return data for (UTC).
lead_time (timedelta | list[timedelta] | LeadTimeArray) – Forecast lead times to fetch.
variable (str | list[str] | VariableArray) – String, list of strings or array of strings that refer to variables to return. Must be in the HRRR lexicon.
- Returns:
HRRR forecast data array
- Return type:
xr.DataArray
- async fetch(time, lead_time, variable)[source]#
Async function to get data
- Parameters:
time (datetime | list[datetime] | TimeArray) – Timestamps to return data for (UTC).
lead_time (timedelta | list[timedelta] | LeadTimeArray) – Forecast lead times to fetch.
variable (str | list[str] | VariableArray) – String, list of strings or array of strings that refer to variables to return. Must be in the HRRR FX lexicon.
- Returns:
HRRR forecast data array
- Return type:
xr.DataArray
- classmethod available(time)#
Checks if given date time is avaliable in the HRRR object store. Uses S3 store
- Parameters:
time (datetime | np.datetime64) – Date time to access
- Returns:
If date time is avaiable
- Return type:
bool