climepi.climdata.get_example_dataset#
- climepi.climdata.get_example_dataset(name, base_dir=None, force_remake=False, **kwargs)#
Retrieve an example climate dataset.
Loads the example climate dataset if it exists locally, otherwise downloads the formatted dataset if possible, or retrieves/downloads/formats the raw underlying data from the relevant server.
Please note the terms of use of the underlying ISIMIP (https://www.isimip.org/gettingstarted/terms-of-use/terms-use-publicly-available-isimip-data-after-embargo-period/) and CESM2 LENS (https://www.ucar.edu/terms-of-use/data) data.
- Parameters:
name (
str) – Name of the example dataset to load. Currently available examples are: “isimip_cities_monthly” (ISIMIP monthly projections for London, Paris, Los Angeles, Cape Town and Istanbul for 2030-2100), “isimip_cities_daily” (ISIMIP daily projections for the same cities and years), “lens2_cities” (CESM LENS2 monthly projections for the same cities and years), and “lens2_2030_2060_2090” (CESM LENS2 monthly projections for 2030, 2060 and 2090).base_dir (
strorpathlib.Path, optional) – Base directory in which example datasets are stored. The example dataset will be downloaded to and accessed from a subdirectory of this directory with the same name as the name argument. If not specified, a directory within the OS cache will be used.force_remake (
bool, optional) – If True, force the download/formatting of the raw underlying data, even if the formatted dataset already exists locally and/or is available for direct download (default is False).**kwargs – Additional keyword arguments to pass to xarray.open_mfdataset when opening downloaded data files.
- Returns:
xarray.Dataset– Example dataset.