climepi.climdata.get_example_dataset#
- climepi.climdata.get_example_dataset(name, base_dir=None, force_remake=False, **kwargs)[source]#
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_daily’ (ISIMIP daily projections for London, Paris, Los Angeles, Cape Town and Istanbul for 2030-2100), ‘lens2_2020_2100_monthly’ (CESM LENS2 monthly projections for 2020 and 2100) and ‘lens2_2020_2100_monthly_one_realization’ (a single-realization subset of the above).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 thenameargument. If not specified, a directory within the OS cache will be used.force_remake (
bool, optional) – IfTrue, 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 isFalse).**kwargs – Additional keyword arguments to pass to
xarray.open_mfdataset()when opening downloaded data files.
- Returns:
xarray.Dataset– Example dataset.