Last updated: YYYY-MM-DD
Provide an introduction and context for the notebook here.
Learning objectives 🎯¶
This is a mandatory section for C3S training material
Describe briefly what the learner/user can expect to learn in this notebook. Address the learner directly, for example:
You will use and adapt this Jupyter notebook template to create your own Jupyter notebook tutorials. Having followed this notebook, you will gain an understanding of the overall layout, common elements, metadata schema and best practices to apply in creating Jupyter notebook based learning resources for ECMWF.
If the notebook is targeted to a niche audience and is not already stated in a Jupyterbook or webpage where the notebook can be accessed, please summarise them here, or in a separate section.
Prepare your environment¶
Insert here any necessary instructions to set-up the environment of learners, any background information on data, projects, access to data catalogues, or preliminary steps necessary to run the notebooks. These may include instructions for installing packages, imports, etc.
Import libraries¶
# Import your libraries here
import cdsapiSetup credentials (optional)¶
If you have not setup your ~/.cdsapirc file with your credentials, you can replace None with your credentials that can be found on the how to api page (you will need to log in to see your credentials).
# If you have already setup your .cdsapirc file you can leave this as None
cdsapi_key = None
cdsapi_url = NoneDefine a data directory (optional)¶
Define a directory to store the data downloaded in the notebook, please ensure that it is a directory that you can write to.
data_dir = "/tmp/"Define your data request (optional)¶
If your notebook retrieves data, describe (or link to) the request parameters and expected outputs here.
dataset = "reanalysis-era5-single-levels-monthly-means"
filename = f"{data_dir}/dataset-filename.grib"
request = {
"product_type": ["monthly_averaged_reanalysis"],
"variable": ["2m_temperature"],
"year": ["2023"],
"month": ["06"],
"time": ["00:00"],
"data_format": "grib",
"download_format": "unarchived",
}
client = cdsapi.Client(url=cdsapi_url, key=cdsapi_key)
client.retrieve(dataset, request).download(filename)2026-04-14 14:36:13,545 INFO Request ID is 4213edf5-7888-4d00-bee0-8663a7dacf00
2026-04-14 14:36:13,597 INFO status has been updated to accepted
2026-04-14 14:36:29,669 INFO status has been updated to running
2026-04-14 14:36:37,336 INFO status has been updated to successful
'/tmp//dataset-filename.grib'Take home messages 📌¶
In this section, summarise key take home messages.
Key message 1
Key message 2
Key message 3