climepi.climdata.get_example_dataset

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.

Parameters:
  • name (str) – Name of the example dataset to load. Currently available examples are: “isimip_cities” (ISIMIP monthly data for London, Los Angeles, Paris, Cape Town, and Istanbul for 2030-2100), “isimip_cities_daily” (ISIMIP daily data for the same cities and years), “lens2_cities” (CESM LENS2 monthly data for the same cities and years), and “lens2_2030_2060_2090” (CESM LENS2 monthly data for 2030, 2060 and 2090).

  • base_dir (str or pathlib.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.

  • base_dir (str or pathlib.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.