NClimGridDaily#

class earth2studio.data.NClimGridDaily(cache=True, verbose=True, async_timeout=600)[source]#
NA

NOAA NClimGrid daily gridded climate data source.

NClimGrid provides daily CONUS gridded temperature and precipitation data on a ~1/24 degree (~0.0417°) latitude/longitude grid. Data spans from 1951 to the present and is stored as monthly NetCDF files on AWS S3.

Available variables: t2m_max, t2m_min, t2m (daily avg), tp (precipitation).

Parameters:
  • 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) – Total timeout in seconds for the entire fetch operation, 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.

__call__(time, variable)[source]#

Function to get NClimGrid data.

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

  • variable (str | list[str] | VariableArray) – Canonical Earth2Studio variable name(s). Must be in the NClimGridLexicon.

Returns:

NClimGrid weather data array with dimensions [time, variable, lat, lon].

Return type:

xr.DataArray

async fetch(time, variable)[source]#

Async function to get NClimGrid data.

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

  • variable (str | list[str] | VariableArray) – Canonical Earth2Studio variable name(s). Must be in the NClimGridLexicon.

Returns:

NClimGrid weather data array with dimensions [time, variable, lat, lon].

Return type:

xr.DataArray

classmethod available(time)[source]#

Check if given date time is available.

Parameters:

time (datetime | np.datetime64) – Date time to check.

Returns:

If date time is available.

Return type:

bool