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.
Target audience (optional)¶
If the notebook is targeted to a niche audience and this is not already stated in the Jupyter Book or webpage where the notebook can be accessed, summarise the intended audience here.
Skill level: Beginner / Intermediate / Advanced
Role or use case: e.g. researcher, forecaster, educator, student
Domain background assumed: e.g. basic Python data analysis, hydrological modelling, climate reanalysis, machine learning
Prepare your environment¶
Insert here any necessary instructions to set up the learner’s environment, any background information on data, projects, access to data catalogues, or preliminary steps necessary to run the notebook. These may include instructions for installing packages, imports, etc.
Special prerequisites (optional)¶
List only special resources, accounts, tools, or related notebooks that are not expected in a typical environment. Do not list general prior knowledge here; cover assumed background under Target audience if needed.
Related notebooks or resources to complete first: ...
Required tools or accounts: e.g. CDS API key, non-standard command-line tools, service credentials
(Install and) Import libraries¶
# Install required libraries
!pip install -q cdsapi# 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 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 = "dataset-filename.nc"
request = {
"product_type": ["monthly_averaged_reanalysis"],
"variable": ["2m_temperature"],
"year": ["2023"],
"month": ["06", "07", "08"],
"time": ["00:00"],
"data_format": "netcdf",
"download_format": "unarchived",
}
client = cdsapi.Client(url=cdsapi_url, key=cdsapi_key)
client.retrieve(dataset, request).download({filename})Main workflow¶
Use as many generic code sections as you need. Replace the section numbers with concise headings that fit your notebook.
Guidance:
Keep each code cell focused on one logical step. If a cell becomes long or combines multiple steps, split it.
Maintain a balanced narrative: each major code block should be preceded by markdown explaining the purpose, method, and expected output.
Code section 1¶
Describe what is done in the following code cell(s) and explain the output produced.
# Add code for this logical step hereCode section 2¶
Describe what is done in the following code cell(s) and explain the output produced.
# Add code for this logical step hereTake home messages 📌¶
In this section, summarise key take home messages.
Key message 1
Key message 2
Key message 3
References¶
Cite all datasets, publications, and reused figures used in this notebook. Use a DOI, an equivalent persistent identifier, or a stable URL with named authoritative provenance.
Datasets
Dataset name (year). Provider. DOI / URL.
Publications
Author, A. B. (Year). Title. Journal, vol(issue), pages. DOI.
Reused figures
Figure source (URL), licence string.
Glossary (optional)¶
Use this section only if the notebook introduces several novel terms; otherwise, define each term on first use in the prose.
Term 1 - definition
Term 2 - definition
Licence (optional / if applicable)¶
This notebook is distributed under the licence declared in the repository’s myst.yml and LICENSE files. If a different licence applies to specific data, figures, or reused content within this notebook, state it here together with the source. Remove this section if not applicable.