hyoga.open.atmosphere#
- hyoga.open.atmosphere(crs, bounds, temperature='chelsa', precipitation=None, resolution=1000.0)#
Open atmospheric data from online datasets for PISM.
- Parameters:
crs (
str) – Coordinate reference system for the resulting dataset as OGC WKT or Proj.4 string, will be passed to Dataset.rio.reproject.bounds (
(west,south,east,north)) – Extent for the resulting dataset in projected coordinates given bycrs, will be passed to Dataset.rio.clip_box.precipitation (
'chelsa'or'cw5e5', optional) – Precipitation rate data source, default to same as temperature.temperature (
'chelsa'or'cw5e5', optional) – Near-surface air temperature data source, default to ‘chelsa’.resolution (
float, optional) – Resolution for the output dataset in projected coordinates given bycrs, will be passed to Dataset.rio.reproject.
- Returns:
ds (
Dataset) – The resulting dataset containing surface variables with the requestedcrs,bounds, andresolution. Useds.to_netcdf()to export as PISM bootstrapping file.
Notes
The calendar is set to ‘noleap’. The 365-day year is divided into twelve unequal months, including a 28-day February month. This the default calendar in PISM. Other calendars could be added in future versions.
To avoid ambiguity, time units are set to ‘days’. A Udunits ‘year’ is always 365.242198781 days, not a calendar year. A Udunits ‘month’ is one twelfth of that, not a calendar month. In addition, Python’s
cftime(and thus xarray) does not understand the unit ‘365 days’.CHELSA-2.1 temperature and precipitation rates are converted to the SI units ‘K’ and ‘kg m-2 s-1’. According to the CHELSA-2.1 docs monthly climatologies “represent averages for the calendar month”. The 1981–2010 period contains 6 leap years over 30 years, so the average February lasts 28.2 days. Due to the no-leap calendar, February precipitations are condensed over a slightly shorter period of 28 days, which overestimates daily rates. However, the total amount is unaffected.
Any grid_mapping variable in the source data will be renamed to ‘spatial_ref’ to avoid returning a dataset with multiple grid mappings.