Example recipes

Overview

These are example recipes calling example diagnostic scripts.

The recipe examples/recipe_python.yml produces time series plots of global mean temperature and for the temperature in Amsterdam. It also produces a map of global temperature in January 2020.

The recipe examples/recipe_extract_shape.yml produces a map of the mean temperature in the Elbe catchment over the years 2000 to 2002. Some example shapefiles for use with this recipe are available here, make sure to download all files with the same name but different extensions.

The recipe examples/recipe_julia.yml produces a map plot with the mean temperature over the year 1997 plus a number that is configurable from the recipe.

The recipe examples/recipe_decadal.yml showcases how the timerange tag can be used to load datasets belonging to the DCPP activity. Produces timeseries plots comparing the global mean temperature of a DCPP dataset with an observational dataset.

For detailed instructions on obtaining input data, please refer to Obtaining input data. However, in case you just quickly want to run through the example, you can use the following links to obtain the data from ESGF:

Please refer to the terms of use for CMIP5 and CMIP6 data.

Available recipes and diagnostics

Recipes are stored in esmvaltool/recipes/

  • examples/recipe_python.yml

  • examples/recipe_extract_shape.yml

  • examples/recipe_julia.yml

  • examples/recipe_decadal.yml

Diagnostics are stored in esmvaltool/diag_scripts/

  • examples/diagnostic.py: visualize results and store provenance information

  • examples/diagnostic.jl: visualize results and store provenance information

  • examples/decadal_example.py: visualize results and store provenance information

User settings in recipe

  1. Script examples/diagnostic.py

    Required settings for script

    • quickplot: plot_type: which of the iris.quickplot functions to use. Arguments that are accepted by these functions can also be specified here, e.g. cmap. Preprocessors need to be configured such that the resulting data matches the plot type, e.g. a timeseries or a map.

    Optional settings for script

    • write_netcdf: true (default) or false. This can be used to disable writing the results to netcdf files.

  2. Script examples/diagnostic.jl

    Required settings for script

    • parameter1: example parameter, this number will be added to the mean (over time) value of the input data.

Variables

  • tas (atmos, monthly, longitude, latitude, time)

Example plots

../_images/map.png

Fig. 199 Air temperature in January 2000 (BCC-ESM1 CMIP6).

../_images/timeseries.png

Fig. 200 Amsterdam air temperature (multimodel mean of CMIP5 CanESM2 and CMIP6 BCC-ESM1).

../_images/elbe.png

Fig. 201 Mean air temperature over the Elbe catchment during 2000-2002 according to CMIP5 CanESM2.

../_images/decadal_first_example.png

Fig. 202 Global mean temperature of CMIP6 dcppA-hindcast EC-Earth3 and OBS ERA-Interim.