Open a dataset as a `DataTree` from the online repository (requires internet). If a local copy is found then always use that to avoid network traffic. Available datasets: * ``"imerghh_730"``: GPM IMERG Final Precipitation L3 Half Hourly 0.1 degree x 0.1 degree V07 from 2021-08-29
(
name: str,
cache: bool = True,
cache_dir: str | os.PathLike | None = None,
*,
engine: T_Engine = None,
**kws,
)
| 253 | |
| 254 | |
| 255 | def open_datatree( |
| 256 | name: str, |
| 257 | cache: bool = True, |
| 258 | cache_dir: str | os.PathLike | None = None, |
| 259 | *, |
| 260 | engine: T_Engine = None, |
| 261 | **kws, |
| 262 | ) -> DataTree: |
| 263 | """ |
| 264 | Open a dataset as a `DataTree` from the online repository (requires internet). |
| 265 | |
| 266 | If a local copy is found then always use that to avoid network traffic. |
| 267 | |
| 268 | Available datasets: |
| 269 | |
| 270 | * ``"imerghh_730"``: GPM IMERG Final Precipitation L3 Half Hourly 0.1 degree x 0.1 degree V07 from 2021-08-29T07:30:00.000Z |
| 271 | * ``"imerghh_830"``: GPM IMERG Final Precipitation L3 Half Hourly 0.1 degree x 0.1 degree V07 from 2021-08-29T08:30:00.000Z |
| 272 | * ``"air_temperature"``: NCEP reanalysis subset |
| 273 | * ``"air_temperature_gradient"``: NCEP reanalysis subset with approximate x,y gradients |
| 274 | * ``"basin_mask"``: Dataset with ocean basins marked using integers |
| 275 | * ``"ASE_ice_velocity"``: MEaSUREs InSAR-Based Ice Velocity of the Amundsen Sea Embayment, Antarctica, Version 1 |
| 276 | * ``"rasm"``: Output of the Regional Arctic System Model (RASM) |
| 277 | * ``"ROMS_example"``: Regional Ocean Model System (ROMS) output |
| 278 | * ``"tiny"``: small synthetic dataset with a 1D data variable |
| 279 | * ``"era5-2mt-2019-03-uk.grib"``: ERA5 temperature data over the UK |
| 280 | * ``"eraint_uvz"``: data from ERA-Interim reanalysis, monthly averages of upper level data |
| 281 | * ``"ersstv5"``: NOAA's Extended Reconstructed Sea Surface Temperature monthly averages |
| 282 | |
| 283 | Parameters |
| 284 | ---------- |
| 285 | name : str |
| 286 | Name of the file containing the dataset. |
| 287 | e.g. 'air_temperature' |
| 288 | cache_dir : path-like, optional |
| 289 | The directory in which to search for and write cached data. |
| 290 | cache : bool, optional |
| 291 | If True, then cache data locally for use on subsequent calls |
| 292 | **kws : dict, optional |
| 293 | Passed to xarray.open_dataset |
| 294 | |
| 295 | See Also |
| 296 | -------- |
| 297 | tutorial.load_datatree |
| 298 | open_datatree |
| 299 | """ |
| 300 | try: |
| 301 | import pooch |
| 302 | except ImportError as e: |
| 303 | raise ImportError( |
| 304 | "tutorial.open_dataset depends on pooch to download and manage datasets." |
| 305 | " To proceed please install pooch." |
| 306 | ) from e |
| 307 | |
| 308 | logger = pooch.get_logger() |
| 309 | logger.setLevel("WARNING") |
| 310 | |
| 311 | cache_dir = _construct_cache_dir(cache_dir) |
| 312 | if name in external_urls: |
no test coverage detected
searching dependent graphs…