{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Get started with DownClim" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "`DownClim` is a simple and easy to use Python package for performing a climate downscaling on future climatic projections. Based on a reference product, and a set of projections from [CMIP6](https://pcmdi.llnl.gov/CMIP6/) and [CORDEX](https://cordex.org/) simulations, `DownClim` will help you to generate a climate projection for your region of interest.\n", "\n", "Let's see it in action!" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## The `DownClimContext` object " ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "editable": true, "execution": { "iopub.execute_input": "2025-08-28T21:43:48.386950Z", "iopub.status.busy": "2025-08-28T21:43:48.386318Z", "iopub.status.idle": "2025-08-28T21:43:55.786742Z", "shell.execute_reply": "2025-08-28T21:43:55.785714Z", "shell.execute_reply.started": "2025-08-28T21:43:48.386911Z" }, "slideshow": { "slide_type": "" }, "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "2025-08-28 23:43:51,451 - downclim - INFO - DownClim starting... Enjoy!\n", "2025-08-28 23:43:51,453 - downclim - INFO - DownClim logging system initialized\n" ] } ], "source": [ "from __future__ import annotations\n", "\n", "import ee\n", "\n", "from downclim.dataset.cmip6 import CMIP6Context\n", "from downclim.downclim import (\n", " DownClimContext,\n", " define_DownClimContext_from_file,\n", " generate_DownClimContext_template_file,\n", ")\n" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "editable": true, "execution": { "iopub.execute_input": "2025-08-28T21:43:56.434678Z", "iopub.status.busy": "2025-08-28T21:43:56.433796Z", "iopub.status.idle": "2025-08-28T21:43:56.440754Z", "shell.execute_reply": "2025-08-28T21:43:56.439558Z", "shell.execute_reply.started": "2025-08-28T21:43:56.434633Z" }, "slideshow": { "slide_type": "" }, "tags": [ "remove_cell" ] }, "outputs": [], "source": [ "your_ee_project_id = \"downclim\"" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "editable": true, "execution": { "iopub.execute_input": "2025-08-28T21:43:59.151307Z", "iopub.status.busy": "2025-08-28T21:43:59.150946Z", "iopub.status.idle": "2025-08-28T21:44:02.211075Z", "shell.execute_reply": "2025-08-28T21:44:02.209571Z", "shell.execute_reply.started": "2025-08-28T21:43:59.151279Z" }, "slideshow": { "slide_type": "" }, "tags": [] }, "outputs": [], "source": [ "# Authenticate to Earth Engine to retrieve CMIP6 data\n", "# ee.Authenticate() if necessary, only need to do this once on your machine\n", "ee.Initialize(opt_url=\"https://earthengine-highvolume.googleapis.com\", project=your_ee_project_id)" ] }, { "cell_type": "markdown", "metadata": { "editable": true, "slideshow": { "slide_type": "" }, "tags": [] }, "source": [ "The `DownClimContext` object is the main object of the `DownClim` package. It contains all the relevant information necessary to perform your downscaling on your area of interest. \n", "\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "You can check directly the documentation of the `DownClimContext` object to have an extensive overview of how to define it properly. In the following section, we will see the main fields included in the `DownClimContext` object to perform a downscaling." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Main fields of the `DownClimContext` object" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "`DownClimContext` objects contain multiple attributes. The most relevant ones are:\n", "\n", "- `aois`: the areas of interest. You can define one or multiple areas of interest, and you have the possibility to define them either as a `str`, a `geopandas.GeoDataFrame` or a simple Python `tuple` of coordinates.\n", " - `str`: the name provided must be recognized by [GADM](https://gadm.org/) to retrieve the corresponding shapefile.\n", " - `geopandas.GeoDataFrame` containing the directly shapefile of the area of interest.\n", " - `tuple` of coordinates `(lon_min, lon_max, lat_min, lat_max, str)` where the last `str` is the name of the area of interest.\n", " \n", "- `variables`: the variables to downscale. You want to select the climate variables that you want to downscale in your future climate. You must provide them as a list of strings, and the name of the variables have to match the `CMIP6` / `CORDEX` naming convention (see [CMIP6 CMOR Tables](https://github.com/PCMDI/cmip6-cmor-tables)). For example, you can select the following variables: `['tas', 'pr']` for 2m temperature and precipitation. Please note that the variables selected must be available both in the climate simulations and in the reference product.\n", "\n", "- `baseline_product`: the reference product used for downscaling. \n", "\n", "- `downscaling_methods`: the downscaling method to use. To downscale your climate data on your area of interest, you might want to use different downscaling methods. So far, `DownClim` only supports the `bias_correction` method, but other methods can be easily adopted and will be available soon.\n", "\n", "- `use_cmip6` & `use_cordex`: whether to use CMIP6 or CORDEX simulations. You can select the climate simulation you want to use for your future projections. `CMIP6` projections are available for a large number of models and scenarios, at global scale and usually at a coarse resolution. `CORDEX` simulations are regional projections, much less numerous but at a finer resolution.\n", "\n", "- `baseline_periods`, `evaluation_periods`, `projection_periods`: the years to use for the baseline, evaluation and projection periods. To perform a downscaling, you must define the baseline period, evaluation period and projection period. \n", " - The baseline period is the period used to calibrate the downscaling method. It is a historical period that must overlap the reference product and the historical climate simulations.\n", " - The evaluation period is the period that overlaps the reference product and the future climate simulations. It is used to evaluate the calibration of the downscaling method performed on the baseline period. \n", " - The projection period is the period for which you want to generate the future climate projections downscaled.\n", "\n", "\n", "You can create a `DownClimContext` object either directly, or by defining a configuration file in a `.yaml` format." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### `DownClimContext` object creation directly" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "You can instantiate a `DownClimContext` object directly by providing the necessary information either via the constructor or providing a dictionary filled with the required keys. Not all fields are mandatory, and default values are used for the omitted fields." ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "editable": true, "execution": { "iopub.execute_input": "2025-08-28T21:44:20.663053Z", "iopub.status.busy": "2025-08-28T21:44:20.662676Z", "iopub.status.idle": "2025-08-28T21:44:24.755073Z", "shell.execute_reply": "2025-08-28T21:44:24.753643Z", "shell.execute_reply.started": "2025-08-28T21:44:20.663025Z" }, "slideshow": { "slide_type": "" }, "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "2025-08-28 23:44:20,664 - downclim.aoi - INFO - Retrieving AOI from Vanuatu\n", "2025-08-28 23:44:20,667 - downclim.aoi - INFO - AOI given as a string: retrieving from GADM for Vanuatu\n", "2025-08-28 23:44:24,568 - downclim.aoi - INFO - AOI CRS not defined: setting to EPSG:4326 / WGS84\n" ] } ], "source": [ "DownClimContext_example = DownClimContext(\n", " aoi=\"Vanuatu\",\n", " variable=[\"tas\", \"pr\"],\n", " historical_period=(1980, 1981),\n", " evaluation_period=(2017, 2018),\n", " projection_period=(2099, 2100),\n", " use_cordex=False,\n", " use_cmip6=True,\n", " cmip6_context=CMIP6Context()\n", ")\n" ] }, { "cell_type": "markdown", "metadata": { "editable": true, "slideshow": { "slide_type": "" }, "tags": [] }, "source": [ "### `DownClimContext` object creation from a `.yaml` file" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "You can also define a `DownClimContext` object from a `.yaml` file. You must first create a template `.yaml` file. " ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "editable": true, "slideshow": { "slide_type": "" }, "tags": [] }, "outputs": [], "source": [ "generate_DownClimContext_template_file(output_file = './DownClimContext_example.yaml')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "And after filling the sections of the file, your `DownClim` configuration file should look like this:\n", "\n", "```yaml\n", "##\n", "## All fields except aoi have default values. If the field is not specified, the default value is used.\n", "####################################################\n", "# aoi\n", "aoi: \"Vanuatu\"\n", "\n", "# variables\n", "variable: [\"tas\", \"pr\"] \n", "time_frequency: \"mon\" \n", "\n", "# downscaling\n", "downscaling_aggregation: \"monthly-mean\" \n", "downscaling_method: \"bias_correction\" \n", "\n", "# data and simulations\n", "baseline_product: \"chelsa2\"\n", "use_cordex: false \n", "use_cmip6: true \n", "cordex_context: {}\n", "cmip6_context: { source: [\"IPSL-CM6A-LR\"] }\n", "historical_period: [1980, 1981]\n", "evaluation_period: [2017, 2018]\n", "projection_period: [2099, 2100]\n", "evaluation_product: [\"chirps\", \"chelsa2\"]\n", "\n", "# internal computation\n", "nb_threads: 4\n", "memory_mb: 4096\n", "chunks: { \"time\": 1, \"lat\": 1000, \"lon\": 1000 }\n", "\n", "# directories\n", "output_dir: \"results\"\n", "tmp_dir: \"tmp\"\n", "keep_tmp_dir: true\n", "\n", "# data access\n", "esgf_credential: \"config/esgf_credential.yaml\"\n", "```" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "editable": true, "execution": { "iopub.execute_input": "2025-08-28T21:44:32.613758Z", "iopub.status.busy": "2025-08-28T21:44:32.612581Z", "iopub.status.idle": "2025-08-28T21:44:35.303981Z", "shell.execute_reply": "2025-08-28T21:44:35.302682Z", "shell.execute_reply.started": "2025-08-28T21:44:32.613700Z" }, "slideshow": { "slide_type": "" }, "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "2025-08-28 23:44:32,615 - downclim.downclim - INFO - Reading DownClimContext from ./DownClimContext_example.yaml\n", "2025-08-28 23:44:32,622 - downclim.downclim - INFO - Context read successfully from ./DownClimContext_example.yaml\n", "2025-08-28 23:44:32,623 - downclim.aoi - INFO - Retrieving AOI from Vanuatu\n", "2025-08-28 23:44:32,626 - downclim.aoi - INFO - AOI given as a string: retrieving from GADM for Vanuatu\n", "2025-08-28 23:44:35,270 - downclim.aoi - INFO - AOI CRS not defined: setting to EPSG:4326 / WGS84\n" ] }, { "data": { "text/plain": [ "{'aoi': [ geometry GID_0 NAME_0\n", " 0 MULTIPOLYGON (((169.7766 -20.2488, 169.7719 -2... VUT Vanuatu],\n", " 'variable': ['tas', 'pr'],\n", " 'time_frequency': ,\n", " 'downscaling_aggregation': ,\n", " 'baseline_product': ,\n", " 'evaluation_product': [,\n", " ],\n", " 'downscaling_method': ,\n", " 'use_cordex': False,\n", " 'use_cmip6': True,\n", " 'cordex_context': {'project': ['CORDEX'],\n", " 'product': ['output'],\n", " 'domain': None,\n", " 'institute': None,\n", " 'driving_model': None,\n", " 'experiment': ['historical', 'rcp26'],\n", " 'experiment_family': None,\n", " 'ensemble': ['r1i1p1'],\n", " 'rcm_name': None,\n", " 'rcm_version': None,\n", " 'frequency': ,\n", " 'variable': ['tas', 'pr'],\n", " 'variable_long_name': None},\n", " 'cmip6_context': {'project': ['ScenarioMIP', 'CMIP'],\n", " 'institute': None,\n", " 'source': ['IPSL-CM6A-LR', 'CMCC-CM2-HR4'],\n", " 'experiment': ['ssp245', 'historical'],\n", " 'ensemble': ['r1i1p1f1'],\n", " 'frequency': ,\n", " 'variable': ['tas', 'pr'],\n", " 'grid_label': None},\n", " 'historical_period': (1980, 1981),\n", " 'evaluation_period': (2017, 2018),\n", " 'projection_period': (2099, 2100),\n", " 'nb_threads': 4,\n", " 'memory_mb': 4096,\n", " 'chunks': {'time': 1, 'lat': 1000, 'lon': 1000},\n", " 'output_dir': 'results',\n", " 'tmp_dir': 'tmp',\n", " 'keep_tmp_dir': True,\n", " 'cmip6_simulations_to_downscale': None,\n", " 'cordex_simulations_to_downscale': None,\n", " 'esgf_credentials': None,\n", " 'ee_project': None}" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "DownClimContext_example = define_DownClimContext_from_file('./DownClimContext_example.yaml')\n", "DownClimContext_example.model_dump()" ] }, { "cell_type": "markdown", "metadata": { "editable": true, "slideshow": { "slide_type": "" }, "tags": [] }, "source": [ "## Download required data" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Once your `DownClimContext` object is defined correctly, you can download the required data defined in the context. You can do it by using the `download_data` method of the `DownClimContext` object." ] }, { "cell_type": "code", "execution_count": 14, "metadata": { "editable": true, "slideshow": { "slide_type": "" }, "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "2025-08-28 16:01:04,162 - downclim.downclim - INFO - Starting data download...\n", "2025-08-28 16:01:04,167 - downclim.downclim - INFO - Downloading baseline product...\n", "2025-08-28 16:01:04,184 - downclim.downclim - INFO - Downloading baseline product...\n", "2025-08-28 16:01:04,186 - downclim.dataset.chelsa2 - INFO - Downloading CHELSA data...\n", "2025-08-28 16:01:04,188 - downclim.dataset.utils - INFO - Checking output directory...\n", "2025-08-28 16:01:04,192 - downclim.dataset.utils - INFO - Setting output directory: results/chelsa\n", "2025-08-28 16:01:04,193 - downclim.dataset.utils - INFO - Checking output directory...\n", "2025-08-28 16:01:04,194 - downclim.dataset.utils - INFO - Setting output directory: tmp/chelsa\n", "2025-08-28 16:01:04,196 - downclim.aoi - INFO - Retrieving AOI names and bounds\n", "2025-08-28 16:01:04,198 - downclim.dataset.chelsa2 - INFO - Downloading CHELSA data...\n", "2025-08-28 16:01:04,306 - downclim.dataset.chelsa2 - INFO - Getting year \"1980\" for variables \"tas\" and areas of interest : \"['Vanuatu']\"\n", "2025-08-28 16:01:04,307 - downclim.dataset.chelsa2 - INFO - Getting year \"1981\" for variables \"tas\" and areas of interest : \"['Vanuatu']\"\n", "2025-08-28 16:01:09,346 - downclim.dataset.chelsa2 - INFO - Concatenating data for area of interest : Vanuatu\n", "2025-08-28 16:01:09,430 - downclim.dataset.chelsa2 - INFO - Concatenating data for area of interest : Vanuatu\n", "2025-08-28 16:01:46,595 - downclim.dataset.chelsa2 - INFO - Saving file tmp/chelsa/chelsa_Vanuatu_tas_1981.nc\n", "2025-08-28 16:01:53,127 - downclim.dataset.chelsa2 - INFO - Saving file tmp/chelsa/chelsa_Vanuatu_tas_1980.nc\n", "2025-08-28 16:01:53,266 - downclim.dataset.chelsa2 - INFO - Getting year \"1980\" for variables \"pr\" and areas of interest : \"['Vanuatu']\"\n", "2025-08-28 16:01:53,271 - downclim.dataset.chelsa2 - INFO - Getting year \"1981\" for variables \"pr\" and areas of interest : \"['Vanuatu']\"\n", "2025-08-28 16:02:00,961 - downclim.dataset.chelsa2 - INFO - Concatenating data for area of interest : Vanuatu\n", "2025-08-28 16:02:01,095 - downclim.dataset.chelsa2 - INFO - Concatenating data for area of interest : Vanuatu\n", "2025-08-28 16:04:47,382 - downclim.dataset.chelsa2 - INFO - Saving file tmp/chelsa/chelsa_Vanuatu_pr_1981.nc\n", "2025-08-28 16:05:03,239 - downclim.dataset.chelsa2 - INFO - Saving file tmp/chelsa/chelsa_Vanuatu_pr_1980.nc\n", "2025-08-28 16:05:03,544 - downclim.dataset.chelsa2 - INFO - Merging files by aoi...\n", "2025-08-28 16:05:03,550 - downclim.dataset.chelsa2 - INFO - Merging files for area Vanuatu...\n", "2025-08-28 16:05:04,986 - downclim.dataset.utils - INFO - Saving chelsa grid for Vanuatu...\n", "2025-08-28 16:05:05,004 - downclim.dataset.utils - INFO - Grid saved to results/chelsa/chelsa_Vanuatu_grid.nc\n", "2025-08-28 16:05:05,014 - downclim.downclim - INFO - Downloading evaluation product...\n", "2025-08-28 16:05:05,017 - downclim.downclim - INFO - Downloading evaluation product...\n", "2025-08-28 16:05:05,021 - downclim.dataset.chirps - INFO - Downloading CHIRPS data...\n", "2025-08-28 16:05:05,024 - downclim.dataset.utils - INFO - Checking output directory...\n", "2025-08-28 16:05:05,026 - downclim.dataset.utils - INFO - Setting output directory: results/chirps\n", "2025-08-28 16:05:05,029 - downclim.aoi - INFO - Retrieving AOI names and bounds\n", "2025-08-28 16:05:09,197 - downclim.dataset.connectors - INFO - Already connected to Earth Engine with project 'downclim'.\n", "2025-08-28 16:05:09,199 - downclim.dataset.chirps - INFO - Getting CHIRPS data for period : \"(2017, 2018)\" and area of interest : \"Vanuatu\"\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/arsouze/miniconda3/envs/downclim/lib/python3.13/site-packages/rioxarray/crs.py:38: RuntimeWarning: CRS EPSG:4362 is deprecated. Its non-deprecated replacement EPSG:4956 will be used instead. To use the original CRS, set the OSR_USE_NON_DEPRECATED configuration option to NO.\n", " return rasterio.crs.CRS.from_user_input(crs_input)\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "2025-08-28 16:05:22,552 - downclim.dataset.utils - INFO - Saving chirps grid for Vanuatu...\n", "2025-08-28 16:05:22,568 - downclim.dataset.utils - INFO - Grid saved to results/chirps/chirps_Vanuatu_grid.nc\n", "2025-08-28 16:05:22,571 - downclim.dataset.chelsa2 - INFO - Downloading CHELSA data...\n", "2025-08-28 16:05:22,590 - downclim.dataset.utils - INFO - Checking output directory...\n", "2025-08-28 16:05:22,597 - downclim.dataset.utils - INFO - Setting output directory: results/chelsa\n", "2025-08-28 16:05:22,607 - downclim.dataset.utils - INFO - Checking output directory...\n", "2025-08-28 16:05:22,610 - downclim.dataset.utils - INFO - Setting output directory: tmp/chelsa\n", "2025-08-28 16:05:22,620 - downclim.aoi - INFO - Retrieving AOI names and bounds\n", "2025-08-28 16:05:22,624 - downclim.dataset.chelsa2 - INFO - Downloading CHELSA data...\n", "2025-08-28 16:05:22,752 - downclim.dataset.chelsa2 - INFO - Getting year \"2017\" for variables \"tas\" and areas of interest : \"['Vanuatu']\"\n", "2025-08-28 16:05:22,754 - downclim.dataset.chelsa2 - INFO - Getting year \"2018\" for variables \"tas\" and areas of interest : \"['Vanuatu']\"\n", "2025-08-28 16:05:29,381 - downclim.dataset.chelsa2 - INFO - Concatenating data for area of interest : Vanuatu\n", "2025-08-28 16:05:29,718 - downclim.dataset.chelsa2 - INFO - Concatenating data for area of interest : Vanuatu\n", "2025-08-28 16:06:06,134 - downclim.dataset.chelsa2 - INFO - Saving file tmp/chelsa/chelsa_Vanuatu_tas_2017.nc\n", "2025-08-28 16:06:10,241 - downclim.dataset.chelsa2 - INFO - Saving file tmp/chelsa/chelsa_Vanuatu_tas_2018.nc\n", "2025-08-28 16:06:10,365 - downclim.dataset.chelsa2 - INFO - Getting year \"2017\" for variables \"pr\" and areas of interest : \"['Vanuatu']\"\n", "2025-08-28 16:06:10,367 - downclim.dataset.chelsa2 - INFO - Getting year \"2018\" for variables \"pr\" and areas of interest : \"['Vanuatu']\"\n", "2025-08-28 16:06:16,688 - downclim.dataset.chelsa2 - INFO - Concatenating data for area of interest : Vanuatu\n", "2025-08-28 16:06:16,792 - downclim.dataset.chelsa2 - INFO - Concatenating data for area of interest : Vanuatu\n", "2025-08-28 16:10:11,760 - downclim.dataset.chelsa2 - INFO - Saving file tmp/chelsa/chelsa_Vanuatu_pr_2018.nc\n", "2025-08-28 16:10:42,207 - downclim.dataset.chelsa2 - INFO - Saving file tmp/chelsa/chelsa_Vanuatu_pr_2017.nc\n", "2025-08-28 16:10:42,358 - downclim.dataset.chelsa2 - INFO - Merging files by aoi...\n", "2025-08-28 16:10:42,361 - downclim.dataset.chelsa2 - INFO - Merging files for area Vanuatu...\n", "2025-08-28 16:10:43,056 - downclim.downclim - INFO - Downloading simulations...\n", "2025-08-28 16:10:43,058 - downclim.downclim - INFO - Downloading simulations data...\n", "2025-08-28 16:10:43,058 - downclim.downclim - INFO - Downloading CMIP6 simulations...\n", "2025-08-28 16:10:43,405 - downclim.dataset.utils - INFO - Checking output directory...\n", "2025-08-28 16:10:43,406 - downclim.dataset.utils - INFO - Setting output directory: results/cmip6\n", "2025-08-28 16:10:43,408 - downclim.aoi - INFO - Retrieving AOI names and bounds\n", "2025-08-28 16:10:43,410 - downclim.dataset.connectors - INFO - Connecting to Google Cloud File System...\n", "2025-08-28 16:10:43,424 - downclim.dataset.cmip6 - INFO - Preparing CMIP6 data for ('IPSL', 'IPSL-CM6A-LR', 'r1i1p1f1', 'historical').\n", "2025-08-28 16:10:47,828 - downclim.dataset.cmip6 - INFO - Preparing CMIP6 data for ('IPSL', 'IPSL-CM6A-LR', 'r1i1p1f1', 'ssp245').\n", "2025-08-28 16:10:51,830 - downclim.dataset.cmip6 - INFO - Extracting CMIP6 data for baseline period, years 1980-01-01 to 1981-12-31, for the area of interest 'Vanuatu'.\n", "2025-08-28 16:11:07,974 - downclim.dataset.cmip6 - INFO - Extracting CMIP6 data for evaluation period, years 2017-01-01 to 2018-12-31, for the area of interest 'Vanuatu'.\n", "2025-08-28 16:11:22,998 - downclim.dataset.cmip6 - INFO - Extracting CMIP6 data for projection period, years 2099-01-01 to 2100-12-31, for the area of interest 'Vanuatu'.\n", "2025-08-28 16:11:33,206 - downclim.downclim - INFO - Data download complete.\n" ] } ], "source": [ "DownClimContext_example.download_data()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Perform a downscaling" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Once your `DownClimContext` object is defined correctly and your data downloaded, you can directly perform a downscaling according to the context.\n", "\n", "It gets as simple as: " ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "2025-08-28 16:11:44,426 - downclim.downscale - INFO - Starting downscaling process...\n", "2025-08-28 16:11:44,439 - downclim.dataset.utils - INFO - Checking input directory...\n", "2025-08-28 16:11:44,442 - downclim.dataset.utils - INFO - Checking output directory...\n", "2025-08-28 16:11:44,444 - downclim.dataset.utils - WARNING - Output directory not provided. Using default output directory ./results/downscaled.\n", "2025-08-28 16:11:44,445 - downclim.dataset.utils - INFO - Setting output directory: ./results/downscaled\n", "2025-08-28 16:11:44,449 - downclim.dataset.utils - INFO - Creating output subdirectory: ./results/downscaled/cmip6\n", "2025-08-28 16:11:44,458 - downclim.dataset.utils - INFO - Creating output subdirectory: ./results/downscaled/cordex\n", "2025-08-28 16:11:44,464 - downclim.dataset.utils - INFO - Creating output subdirectory: ./results/downscaled/../regridder\n", "2025-08-28 16:11:44,467 - downclim.aoi - INFO - Retrieving AOI names and bounds\n", "2025-08-28 16:11:44,470 - downclim.downscale - INFO - Checking periods to downscale...\n", "2025-08-28 16:11:44,472 - downclim.downscale - INFO - Checking simulations to downscale for AOI: Vanuatu\n", "2025-08-28 16:11:44,475 - downclim.downscale - WARNING - CMIP6 simulations to downscale not provided. Using all files found in results/cmip6.\n", "2025-08-28 16:11:44,480 - downclim.downscale - WARNING - CORDEX simulations to downscale not provided. Using all files found in results/cordex.\n", "2025-08-28 16:11:44,482 - downclim.downscale - WARNING - No CORDEX simulations to downscale found.\n", "2025-08-28 16:11:44,484 - downclim.downscale - INFO - Checking downscaling grid file...\n", "2025-08-28 16:11:44,487 - downclim.downscale - WARNING - Downscaling grid file not provided. Using default grid file results/chelsa/chelsa_Vanuatu_grid.nc which is extracted from chelsa\n", "2025-08-28 16:11:44,516 - downclim.downscale - INFO - Checking baseline historical data...\n", "2025-08-28 16:11:44,571 - downclim.downscale - INFO - Baseline grid matches downscaling grid\n", "2025-08-28 16:11:44,574 - downclim.downscale - INFO - CMIP6 simulations to downscale: {'historical': {'results/cmip6/Vanuatu_cmip6_IPSL_IPSL-CM6A-LR_historical_r1i1p1f1_monthly-mean_1980-01-01_1981-12-31.nc': {'output_dir': 'results/cmip6', 'aoi_n': 'Vanuatu', 'data_product': 'cmip6', 'institute': 'IPSL', 'source': 'IPSL-CM6A-LR', 'experiment': 'historical', 'ensemble': 'r1i1p1f1', 'aggregation': 'monthly-mean', 'tmin': '1980-01-01', 'tmax': '1981-12-31'}}, 'evaluation': {'results/cmip6/Vanuatu_cmip6_IPSL_IPSL-CM6A-LR_ssp245_r1i1p1f1_monthly-mean_2017-01-01_2018-12-31.nc': {'output_dir': 'results/cmip6', 'aoi_n': 'Vanuatu', 'data_product': 'cmip6', 'institute': 'IPSL', 'source': 'IPSL-CM6A-LR', 'experiment': 'ssp245', 'ensemble': 'r1i1p1f1', 'aggregation': 'monthly-mean', 'tmin': '2017-01-01', 'tmax': '2018-12-31'}}, 'projection': {'results/cmip6/Vanuatu_cmip6_IPSL_IPSL-CM6A-LR_ssp245_r1i1p1f1_monthly-mean_2099-01-01_2100-12-31.nc': {'output_dir': 'results/cmip6', 'aoi_n': 'Vanuatu', 'data_product': 'cmip6', 'institute': 'IPSL', 'source': 'IPSL-CM6A-LR', 'experiment': 'ssp245', 'ensemble': 'r1i1p1f1', 'aggregation': 'monthly-mean', 'tmin': '2099-01-01', 'tmax': '2100-12-31'}}}\n", "2025-08-28 16:11:44,579 - downclim.downscale - INFO - CORDEX simulations to downscale: {'historical': {}, 'evaluation': {}, 'projection': {}}\n", "2025-08-28 16:11:44,581 - downclim.downscale - INFO - Regridding historical data results/cmip6/Vanuatu_cmip6_IPSL_IPSL-CM6A-LR_historical_r1i1p1f1_monthly-mean_1980-01-01_1981-12-31.nc, period (1980, 1981), for AOI: Vanuatu.\n", "2025-08-28 16:11:51,758 - downclim.downscale - INFO - Regridding historical dataset for results/cmip6/Vanuatu_cmip6_IPSL_IPSL-CM6A-LR_historical_r1i1p1f1_monthly-mean_1980-01-01_1981-12-31.nc: ./results/downscaled/cmip6/Vanuatu_cmip6_IPSL_IPSL-CM6A-LR_historical_r1i1p1f1_monthly-mean_1980-01-01_1981-12-31-chelsa_Vanuatu_grid.nc.\n", "2025-08-28 16:11:52,735 - downclim.downscale - INFO - Regridding dataset for results/cmip6/Vanuatu_cmip6_IPSL_IPSL-CM6A-LR_ssp245_r1i1p1f1_monthly-mean_2017-01-01_2018-12-31.nc, period: evaluation, for AOI: Vanuatu.\n", "2025-08-28 16:11:53,579 - downclim.downscale - INFO - Downscaling dataset results/cmip6/Vanuatu_cmip6_IPSL_IPSL-CM6A-LR_ssp245_r1i1p1f1_monthly-mean_2017-01-01_2018-12-31.nc, period: evaluation, for AOI: Vanuatu using method: bias_correction.\n", "2025-08-28 16:11:53,879 - downclim.downscale - INFO - Saving downscaled dataset into: ./results/downscaled/cmip6/Vanuatu_cmip6_IPSL_IPSL-CM6A-LR_ssp245_r1i1p1f1_monthly-mean_2017-01-01_2018-12-31-downscaled-chelsa_baseline-chelsa_Vanuatu_grid.nc\n", "2025-08-28 16:11:54,049 - downclim.downscale - INFO - Regridding dataset for results/cmip6/Vanuatu_cmip6_IPSL_IPSL-CM6A-LR_ssp245_r1i1p1f1_monthly-mean_2099-01-01_2100-12-31.nc, period: projection, for AOI: Vanuatu.\n", "2025-08-28 16:11:54,925 - downclim.downscale - INFO - Downscaling dataset results/cmip6/Vanuatu_cmip6_IPSL_IPSL-CM6A-LR_ssp245_r1i1p1f1_monthly-mean_2099-01-01_2100-12-31.nc, period: projection, for AOI: Vanuatu using method: bias_correction.\n", "2025-08-28 16:11:55,123 - downclim.downscale - INFO - Saving downscaled dataset into: ./results/downscaled/cmip6/Vanuatu_cmip6_IPSL_IPSL-CM6A-LR_ssp245_r1i1p1f1_monthly-mean_2099-01-01_2100-12-31-downscaled-chelsa_baseline-chelsa_Vanuatu_grid.nc\n" ] } ], "source": [ "DownClimContext_example.run_downscaling()" ] }, { "cell_type": "code", "execution_count": 19, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "2025-08-28 16:19:30,478 - downclim.downscale - INFO - Starting downscaling process...\n", "2025-08-28 16:19:30,499 - downclim.dataset.utils - INFO - Checking input directory...\n", "2025-08-28 16:19:30,505 - downclim.dataset.utils - INFO - Checking output directory...\n", "2025-08-28 16:19:30,509 - downclim.dataset.utils - WARNING - Output directory not provided. Using default output directory ./results/downscaled.\n", "2025-08-28 16:19:30,514 - downclim.dataset.utils - INFO - Setting output directory: ./results/downscaled\n", "2025-08-28 16:19:30,518 - downclim.dataset.utils - INFO - Creating output subdirectory: ./results/downscaled/cmip6\n", "2025-08-28 16:19:30,519 - downclim.dataset.utils - INFO - Creating output subdirectory: ./results/downscaled/cordex\n", "2025-08-28 16:19:30,523 - downclim.dataset.utils - INFO - Creating output subdirectory: ./results/downscaled/../regridder\n", "2025-08-28 16:19:30,524 - downclim.aoi - INFO - Retrieving AOI names and bounds\n", "2025-08-28 16:19:30,530 - downclim.downscale - INFO - Checking periods to downscale...\n", "2025-08-28 16:19:30,531 - downclim.downscale - INFO - Checking simulations to downscale for AOI: Vanuatu\n", "2025-08-28 16:19:30,533 - downclim.downscale - WARNING - CMIP6 simulations to downscale not provided. Using all files found in results/cmip6.\n", "2025-08-28 16:19:30,535 - downclim.downscale - WARNING - CORDEX simulations to downscale not provided. Using all files found in results/cordex.\n", "2025-08-28 16:19:30,537 - downclim.downscale - WARNING - No CORDEX simulations to downscale found.\n", "2025-08-28 16:19:30,538 - downclim.downscale - INFO - Checking downscaling grid file...\n", "2025-08-28 16:19:30,587 - downclim.downscale - INFO - Checking baseline historical data...\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "2025-08-28 16:19:30,647 - downclim.downscale - INFO - Regridding baseline data on the downscaling grid.\n", "2025-08-28 16:19:30,650 - downclim.dataset.utils - INFO - Checking if regridder file from results/chelsa/chelsa_Vanuatu_grid.nc to downscaling grid ./results/chirps/chirps_Vanuatu_grid.nc already exists\n", "2025-08-28 16:19:30,651 - downclim.dataset.utils - INFO - Could not find regridder file in ./results/downscaled/../regridder/regridder-chelsa_Vanuatu_grid-to-chirps_Vanuatu_grid.nc.\n", " Creating a new one. This may take a while...\n", "2025-08-28 16:19:36,765 - downclim.downscale - INFO - CMIP6 simulations to downscale: {'historical': {'results/cmip6/Vanuatu_cmip6_IPSL_IPSL-CM6A-LR_historical_r1i1p1f1_monthly-mean_1980-01-01_1981-12-31.nc': {'output_dir': 'results/cmip6', 'aoi_n': 'Vanuatu', 'data_product': 'cmip6', 'institute': 'IPSL', 'source': 'IPSL-CM6A-LR', 'experiment': 'historical', 'ensemble': 'r1i1p1f1', 'aggregation': 'monthly-mean', 'tmin': '1980-01-01', 'tmax': '1981-12-31'}}, 'evaluation': {'results/cmip6/Vanuatu_cmip6_IPSL_IPSL-CM6A-LR_ssp245_r1i1p1f1_monthly-mean_2017-01-01_2018-12-31.nc': {'output_dir': 'results/cmip6', 'aoi_n': 'Vanuatu', 'data_product': 'cmip6', 'institute': 'IPSL', 'source': 'IPSL-CM6A-LR', 'experiment': 'ssp245', 'ensemble': 'r1i1p1f1', 'aggregation': 'monthly-mean', 'tmin': '2017-01-01', 'tmax': '2018-12-31'}}, 'projection': {'results/cmip6/Vanuatu_cmip6_IPSL_IPSL-CM6A-LR_ssp245_r1i1p1f1_monthly-mean_2099-01-01_2100-12-31.nc': {'output_dir': 'results/cmip6', 'aoi_n': 'Vanuatu', 'data_product': 'cmip6', 'institute': 'IPSL', 'source': 'IPSL-CM6A-LR', 'experiment': 'ssp245', 'ensemble': 'r1i1p1f1', 'aggregation': 'monthly-mean', 'tmin': '2099-01-01', 'tmax': '2100-12-31'}}}\n", "2025-08-28 16:19:36,766 - downclim.downscale - INFO - CORDEX simulations to downscale: {'historical': {}, 'evaluation': {}, 'projection': {}}\n", "2025-08-28 16:19:36,767 - downclim.downscale - INFO - Regridding historical data results/cmip6/Vanuatu_cmip6_IPSL_IPSL-CM6A-LR_historical_r1i1p1f1_monthly-mean_1980-01-01_1981-12-31.nc, period (1980, 1981), for AOI: Vanuatu.\n", "2025-08-28 16:19:37,008 - downclim.downscale - INFO - Regridding historical dataset for results/cmip6/Vanuatu_cmip6_IPSL_IPSL-CM6A-LR_historical_r1i1p1f1_monthly-mean_1980-01-01_1981-12-31.nc: ./results/downscaled/cmip6/Vanuatu_cmip6_IPSL_IPSL-CM6A-LR_historical_r1i1p1f1_monthly-mean_1980-01-01_1981-12-31-chirps_Vanuatu_grid.nc.\n", "2025-08-28 16:19:37,116 - downclim.downscale - INFO - Regridding dataset for results/cmip6/Vanuatu_cmip6_IPSL_IPSL-CM6A-LR_ssp245_r1i1p1f1_monthly-mean_2017-01-01_2018-12-31.nc, period: evaluation, for AOI: Vanuatu.\n", "2025-08-28 16:19:37,175 - downclim.downscale - INFO - Downscaling dataset results/cmip6/Vanuatu_cmip6_IPSL_IPSL-CM6A-LR_ssp245_r1i1p1f1_monthly-mean_2017-01-01_2018-12-31.nc, period: evaluation, for AOI: Vanuatu using method: bias_correction.\n", "2025-08-28 16:19:37,201 - downclim.downscale - INFO - Saving downscaled dataset into: ./results/downscaled/cmip6/Vanuatu_cmip6_IPSL_IPSL-CM6A-LR_ssp245_r1i1p1f1_monthly-mean_2017-01-01_2018-12-31-downscaled-chelsa_baseline-chirps_Vanuatu_grid.nc\n" ] } ], "source": [ "DownClimContext_example.run_downscaling(downscaling_grid_file=\"./results/chirps/chirps_Vanuatu_grid.nc\", periods_to_downscale=[\"evaluation\"])" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "```{note}\n", "We perform 2 downscalings here : one on each grid (*i.e.* `./results/chelsa/chelsa_Vanuatu_grid.nc`, the default value, and `./results/chirps/chirps_Vanuatu_grid.nc`). We do so because the [`evaluation` process](#evaluate-your-downscaling) is requested both on `CHIRPS` and `CHELSA` products, and both on their own original grid.\n", "\n", "Another way would have been to perform the downscaling on a common grid (*e.g.* CHELSA grid, as this is the baseline product used for downscaling here, hence the default value), and specify the evaluation grid in the `run_evaluation` method.\n", "```" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Evaluate your downscaling" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "You can even easily evaluate your downscaling over an evaluation period (as defined [above](#main-fields-of-the-downclimcontext-object))." ] }, { "cell_type": "code", "execution_count": 20, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "2025-08-28 16:20:22,807 - downclim.evaluation - INFO - Starting evaluation process...\n", "2025-08-28 16:20:22,825 - downclim.dataset.utils - INFO - Checking input directory...\n", "2025-08-28 16:20:22,832 - downclim.dataset.utils - WARNING - Input directory not provided. Using default input directory ./results/downscaled\n", "2025-08-28 16:20:22,834 - downclim.dataset.utils - INFO - Checking output directory...\n", "2025-08-28 16:20:22,835 - downclim.dataset.utils - WARNING - Output directory not provided. Using default output directory ./results/evaluation.\n", "2025-08-28 16:20:22,837 - downclim.dataset.utils - INFO - Setting output directory: ./results/evaluation\n", "2025-08-28 16:20:22,840 - downclim.dataset.utils - INFO - Creating output subdirectory: ./results/evaluation/cmip6\n", "2025-08-28 16:20:22,843 - downclim.dataset.utils - INFO - Creating output subdirectory: ./results/evaluation/cordex\n", "2025-08-28 16:20:22,850 - downclim.evaluation - INFO - Start evaluation for AOI: Vanuatu\n", "2025-08-28 16:20:22,852 - downclim.evaluation - INFO - Evaluating simulations over product: chirps\n", "2025-08-28 16:20:22,854 - downclim.evaluation - WARNING - Evaluation grid file not provided. Using default grid file ./results/downscaled/../chirps/chirps_Vanuatu_grid.nc which is extracted from chirps.\n", "2025-08-28 16:20:22,857 - downclim.evaluation - INFO - Opening evaluation grid file: ./results/downscaled/../chirps/chirps_Vanuatu_grid.nc\n", "2025-08-28 16:20:22,868 - downclim.evaluation - INFO - Opening evaluation product chirps...\n", "2025-08-28 16:20:22,869 - downclim.evaluation - INFO - Looking for evaluation product for evaluation period here : ./results/downscaled/../chirps/Vanuatu_chirps_monthly-mean_2017-2018.nc\n", "2025-08-28 16:20:22,883 - downclim.evaluation - INFO - Evaluation grid and chirps grid are the same. No need to regrid.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "2025-08-28 16:20:23,167 - downclim.evaluation - INFO - Looking for downscaled simulations to evaluate...\n", "2025-08-28 16:20:23,171 - downclim.evaluation - WARNING - CMIP6 simulations to downscale not provided. Using all files found in ./results/downscaled/cmip6.\n", "2025-08-28 16:20:23,173 - downclim.evaluation - WARNING - CORDEX simulations to downscale not provided. Using all files found in ./results/downscaled/cordex.\n", "2025-08-28 16:20:23,174 - downclim.evaluation - WARNING - No CORDEX simulations to downscale found.\n", "2025-08-28 16:20:23,175 - downclim.evaluation - WARNING - Files that are evaluated must have the format ./results/downscaled/cordex/Vanuatu_cordex*2017*2018*chirps_Vanuatu_grid.nc.\n", "2025-08-28 16:20:24,853 - downclim.evaluation - INFO - \n", " Evaluating results/downscaled/cmip6/Vanuatu_cmip6_IPSL_IPSL-CM6A-LR_ssp245_r1i1p1f1_monthly-mean_2017-01-01_2018-12-31-downscaled-chelsa_baseline-chirps_Vanuatu_grid.nc against ./results/downscaled/../chirps/Vanuatu_chirps_monthly-mean_2017-2018.nc...\n", " \n", "2025-08-28 16:20:24,854 - downclim.evaluation - INFO - Computing correlation...\n", "2025-08-28 16:20:24,899 - downclim.evaluation - INFO - Computing RMSE...\n", "2025-08-28 16:20:24,908 - downclim.evaluation - INFO - Computing standard deviation...\n", "2025-08-28 16:20:24,914 - downclim.evaluation - INFO - Computing mean...\n", "2025-08-28 16:20:24,964 - downclim.evaluation - INFO - Evaluating simulations over product: chelsa\n", "2025-08-28 16:20:24,965 - downclim.evaluation - WARNING - Evaluation grid file not provided. Using default grid file ./results/downscaled/../chelsa/chelsa_Vanuatu_grid.nc which is extracted from chelsa.\n", "2025-08-28 16:20:24,967 - downclim.evaluation - INFO - Opening evaluation grid file: ./results/downscaled/../chelsa/chelsa_Vanuatu_grid.nc\n", "2025-08-28 16:20:24,981 - downclim.evaluation - INFO - Opening evaluation product chelsa...\n", "2025-08-28 16:20:24,983 - downclim.evaluation - INFO - Looking for evaluation product for evaluation period here : ./results/downscaled/../chelsa/Vanuatu_chelsa_monthly-mean_2017-2018.nc\n", "2025-08-28 16:20:25,024 - downclim.evaluation - INFO - Evaluation grid and chelsa grid are the same. No need to regrid.\n", "2025-08-28 16:20:25,346 - downclim.evaluation - INFO - Looking for downscaled simulations to evaluate...\n", "2025-08-28 16:20:25,349 - downclim.evaluation - WARNING - CMIP6 simulations to downscale not provided. Using all files found in ./results/downscaled/cmip6.\n", "2025-08-28 16:20:25,351 - downclim.evaluation - WARNING - CORDEX simulations to downscale not provided. Using all files found in ./results/downscaled/cordex.\n", "2025-08-28 16:20:25,352 - downclim.evaluation - WARNING - No CORDEX simulations to downscale found.\n", "2025-08-28 16:20:25,353 - downclim.evaluation - WARNING - Files that are evaluated must have the format ./results/downscaled/cordex/Vanuatu_cordex*2017*2018*chelsa_Vanuatu_grid.nc.\n", "2025-08-28 16:20:25,605 - downclim.evaluation - INFO - \n", " Evaluating results/downscaled/cmip6/Vanuatu_cmip6_IPSL_IPSL-CM6A-LR_ssp245_r1i1p1f1_monthly-mean_2017-01-01_2018-12-31-downscaled-chelsa_baseline-chelsa_Vanuatu_grid.nc against ./results/downscaled/../chelsa/Vanuatu_chelsa_monthly-mean_2017-2018.nc...\n", " \n", "2025-08-28 16:20:25,606 - downclim.evaluation - INFO - Computing correlation...\n", "2025-08-28 16:20:26,339 - downclim.evaluation - INFO - Computing RMSE...\n", "2025-08-28 16:20:26,455 - downclim.evaluation - INFO - Computing standard deviation...\n", "2025-08-28 16:20:26,592 - downclim.evaluation - INFO - Computing mean...\n" ] } ], "source": [ "DownClimContext_example.run_evaluation()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "As `results` has been used as the default output directory, you can find all files created there and your file tree should look like this:\n", "\n", "```bash\n", ".\n", "├── aois\n", "│ ├── Vanuatu.cpg\n", "│ ├── Vanuatu.dbf\n", "│ ├── Vanuatu.prj\n", "│ ├── Vanuatu.shp\n", "│ └── Vanuatu.shx\n", "├── chelsa\n", "│ ├── chelsa_Vanuatu_grid.nc\n", "│ ├── Vanuatu_chelsa_monthly-mean_1980-1981.nc\n", "│ └── Vanuatu_chelsa_monthly-mean_2017-2018.nc\n", "├── chirps\n", "│ ├── chirps_Vanuatu_grid.nc\n", "│ └── Vanuatu_chirps_monthly-mean_2017-2018.nc\n", "├── cmip6\n", "│ ├── Vanuatu_cmip6_IPSL_IPSL-CM6A-LR_historical_r1i1p1f1_monthly-mean_1980-01-01_1981-12-31.nc\n", "│ ├── Vanuatu_cmip6_IPSL_IPSL-CM6A-LR_ssp245_r1i1p1f1_monthly-mean_2017-01-01_2018-12-31.nc\n", "│ └── Vanuatu_cmip6_IPSL_IPSL-CM6A-LR_ssp245_r1i1p1f1_monthly-mean_2099-01-01_2100-12-31.nc\n", "├── downscaled\n", "│ ├── cmip6\n", "│ │ ├── Vanuatu_cmip6_IPSL_IPSL-CM6A-LR_historical_r1i1p1f1_monthly-mean_1980-01-01_1981-12-31-chelsa_Vanuatu_grid.nc\n", "│ │ ├── Vanuatu_cmip6_IPSL_IPSL-CM6A-LR_historical_r1i1p1f1_monthly-mean_1980-01-01_1981-12-31-chirps_Vanuatu_grid.nc\n", "│ │ ├── Vanuatu_cmip6_IPSL_IPSL-CM6A-LR_ssp245_r1i1p1f1_monthly-mean_2017-01-01_2018-12-31-downscaled-chelsa_baseline-chelsa_Vanuatu_grid.nc\n", "│ │ ├── Vanuatu_cmip6_IPSL_IPSL-CM6A-LR_ssp245_r1i1p1f1_monthly-mean_2017-01-01_2018-12-31-downscaled-chelsa_baseline-chirps_Vanuatu_grid.nc\n", "│ │ └── Vanuatu_cmip6_IPSL_IPSL-CM6A-LR_ssp245_r1i1p1f1_monthly-mean_2099-01-01_2100-12-31-downscaled-chelsa_baseline-chelsa_Vanuatu_grid.nc\n", "│ └── cordex\n", "├── evaluation\n", "│ ├── cmip6\n", "│ │ ├── Vanuatu_cmip6_IPSL_IPSL-CM6A-LR_ssp245_r1i1p1f1_monthly-mean_2017-01-01_2018-12-31-downscaled-chelsa_baseline-chelsa_Vanuatu_grid_evaluation.nc\n", "│ │ └── Vanuatu_cmip6_IPSL_IPSL-CM6A-LR_ssp245_r1i1p1f1_monthly-mean_2017-01-01_2018-12-31-downscaled-chelsa_baseline-chirps_Vanuatu_grid_evaluation.nc\n", "│ └── cordex\n", "└── regridder\n", " └── regridder-chelsa_Vanuatu_grid-to-chirps_Vanuatu_grid.nc\n", "```\n", "\n", "- `aois` : all files related to the areas of interest (AOIs) \n", "- `chelsa` : all files related to the CHELSA product. Contains the grid file (`netcdf` with `lon` and `lat` variables), in addition to climatologies for baseline and evaluation periods.\n", "- `chirps` : all files related to the CHIRPS product. Contains the grid file (`netcdf` with `lon` and `lat` variables). As this product is used for evaluation only, it contains only a climatology over the evaluation period.\n", "- `cmip6` : all files related to the CMIP6 product. All CMIP6 simulation files over the AOI matching the `CMIP6Context` defined in the `DownClimContext`.\n", "- `cordex` : all files related to the CORDEX product. All CORDEX simulation files over the AOI matching the `CORDEXContext` defined in the `DownClimContext`. Here, empty as we did not requested any CORDEX simulations.\n", "- `downscaled` : all files `CMIP6` and `CORDEX` downscaled products (over the baseline product). We performed 2 downscaling over 2 different grids, although only for the evaluation period for CHIRPS grid.\n", "- `evaluation` : all files related to the evaluation of the downscaled products. \n", "- `regridder` : all files related to the regridding process. This process is internal to `DownClim`, but it can save a lot of time to reuse existing regridders among different grids." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## You're all set!\n", "\n", "Now you can play with your `DownClimContext` object to explore, download, downscale and evaluate climate data over your areas of interest.\n", "\n", "However, if you're looking for a finer grain of control over the dataset, we encourage you to [explore all DownClim functions](examples/all_functions.ipynb)." ] } ], "metadata": { "kernelspec": { "display_name": "python3 (downclim)", "language": "python", "name": "conda-env-downclim-py" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.13.2" } }, "nbformat": 4, "nbformat_minor": 4 }