Skip to content

Commit bf7165a

Browse files
authored
Merge pull request #226 from ESMValGroup/fix_recipes_for_v2.4
Change example recipes in tutorial to be compatible with ESMValTool v2.4.0 for introductory topics (episodes 1-5)
2 parents b6bf438 + 1b0f4bc commit bf7165a

File tree

8 files changed

+254
-194
lines changed

8 files changed

+254
-194
lines changed

_episodes/01-introduction.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ technical steps, let's talk about what ESMValTool is all about.
2424

2525
> ## What is ESMValTool?
2626
>
27-
> What do you already know about, or expect from ESMValTool?
27+
> What do you already know about or expect from ESMValTool?
2828
>
2929
> > ## ESMValTool is...
3030
> >
@@ -58,6 +58,7 @@ An example recipe could look like this:
5858

5959
```yaml
6060
documentation:
61+
title: This is an example recipe.
6162
description: Example recipe
6263
authors:
6364
- lastname_firstname
@@ -86,8 +87,8 @@ diagnostics:
8687
> be found in the documentation of ESMValTool.
8788
>
8889
> > ## Solution
89-
> > The keys are explained in the ESMValTool documentation, in the section `The
90-
> recipe format`, under
90+
> > The keys are explained in the ESMValTool documentation, in the `Recipe
91+
>> section `, under
9192
> [datasets](https://docs.esmvaltool.org/projects/esmvalcore/en/latest/recipe/overview.html#recipe-section-datasets)
9293
> {: .solution}
9394
{: .challenge}
@@ -100,8 +101,8 @@ results.
100101

101102
> ## Explore the available recipes
102103
>
103-
> Go to the [documentation of esmvaltool](https://docs.esmvaltool.org/) and
104-
> explore the `available recipes` section. Which recipe(s) would you like to
104+
> Go to the [ESMValTool Documentation webpage](https://docs.esmvaltool.org/) and
105+
> explore the `Available recipes` section. Which recipe(s) would you like to
105106
> try?
106107
{: .challenge}
107108

@@ -112,10 +113,10 @@ software engineers. It is an open source project to which anyone can contribute.
112113
Many of the interactions take place on GitHub. Here, we briefly introduce you to
113114
some of the most important pages.
114115

115-
> ## Meet ESMValGroup
116+
> ## Meet the ESMValGroup
116117
>
117-
> Browse to [github.com/ESMValGroup](https://github.com/ESMValGroup). This is
118-
> our 'organization' GitHub page. Have a look around. How many collaborators are
118+
> Go to [github.com/ESMValGroup](https://github.com/ESMValGroup). This is
119+
> the GitHub page of our 'organization'. Have a look around. How many collaborators are
119120
> there? Do you know any of them?
120121
>
121122
> Near the top of the page there are 2 pinned repositories: ESMValTool and

_episodes/02-installation.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ objectives:
99
- "Install ESMValTool"
1010
- "Demonstrate that the installation was successful"
1111
keypoints:
12-
- "All the required packages can be installed using conda."
12+
- "All the required packages can be installed using mamba."
1313
- "You can find more information about installation in the
1414
[documentation](https://docs.esmvaltool.org/en/latest/quickstart/installation.html)."
1515
---
@@ -31,12 +31,12 @@ associated software such as GitHub and Mamba.
3131

3232
1. If you have access to a server where ESMValTool is already installed
3333
as a module, for e.g., the [CEDA JASMIN](https://help.jasmin.ac.uk/article/4955-community-software-esmvaltool)
34-
server, you can simply load the module with the following:
34+
server, you can simply load the module with the following command:
3535
~~~bash
3636
module load esmvaltool
3737
~~~
38-
After loading ``esmvaltool``, we can start using ESMValTool. Please see the [next lesson]({{ page.root }}{% link _episodes/03-configuration.md %}).
39-
2. If you would like to install ESMValTool as a conda package, then this lesson
38+
After loading ``esmvaltool``, we can start using ESMValTool right away. Please see the [next lesson]({{ page.root }}{% link _episodes/03-configuration.md %}).
39+
2. If you would like to install ESMValTool as a mamba package, then this lesson
4040
will tell you how!
4141
3. If you would like to start experimenting with existing diagnostics or contributing to ESMvalTool, please see the instructions for
4242
source installation in the lesson [Development and
@@ -95,7 +95,7 @@ To install mamba on ``Linux`` or ``MacOSX``, follow the instructions below:
9595
which mamba
9696
```
9797

98-
This should show the path to your mamba executeable, e.g. `~/mambaforge/bin/mamba`.
98+
This should show the path to your mamba executable, e.g. `~/mambaforge/bin/mamba`.
9999

100100
For more information about installing mamba,
101101
see [the mamba installation documentation](https://docs.esmvaltool.org/en/latest/quickstart/installation.html#mamba-installation).

_episodes/03-configuration.md

Lines changed: 90 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,36 @@ keypoints:
2020

2121
## The configuration file
2222

23+
For the purposes of this tutorial, we will create a directory in our home directory
24+
called `esmvaltool_tutorial` and use that as our working directory. The following steps
25+
should do that:
26+
27+
~~~bash
28+
mkdir esmvaltool_tutorial
29+
cd esmvaltool_tutorial
30+
~~~
31+
2332
The ``config-user.yml`` configuration file contains all the global level
2433
information needed by ESMValTool to run.
2534
This is a [YAML file](https://yaml.org/spec/1.2/spec.html).
2635

2736
You can get the default configuration file by running:
2837

2938
~~~bash
30-
esmvaltool config get_config_user
39+
esmvaltool config get_config_user --path=<target_dir>
3140
~~~
32-
33-
It will save the file to: `~/.esmvaltool/config-user.yml`, where `~` is the
41+
The default configuration file will be downloaded to the directory specified with
42+
the `--path` variable. For instance, you can provide the path to your working directory
43+
as the `target_dir`. If this option is not used, the file will be saved to the default
44+
location: `~/.esmvaltool/config-user.yml`, where `~` is the
3445
path to your home directory. Note that files and directories starting with a
3546
period are "hidden", to see the `.esmvaltool` directory in the terminal use
36-
`ls -la ~`.
47+
`ls -la ~`. Note that if a configuration file by that name already exists in the default
48+
location, the `get_config_user` command will not update the file as ESMValTool will not
49+
overwrite the file. You will have to move the file first if you want an updated copy of the
50+
user configuration file.
51+
52+
3753

3854
We run a text editor called ``nano`` to have a look inside the configuration file
3955
and then modify it if needed:
@@ -67,7 +83,7 @@ The configuration file starts with output settings that
6783
inform ESMValTool about your preference for output.
6884
You can turn on or off the setting by ``true`` or ``false``
6985
values. Most of these settings are fairly self-explanatory.
70-
For example, `write_plots: true` means that diagnostics create plots.
86+
7187

7288
> ## Saving preprocessed data
7389
>
@@ -101,8 +117,9 @@ using the format: YYYYMMDD_HHMMSS.
101117
> ## Set the destination directory
102118
>
103119
> Let's name our destination directory ``esmvaltool_output`` in the working directory.
104-
> ESMValTool should write the output to this path.
105-
> How to modify the `config-user.yml`?
120+
> ESMValTool should write the output to this path, so make sure you have the disk space
121+
> to write output to this directory.
122+
> How do we set this in the `config-user.yml`?
106123
>
107124
>> ## Solution
108125
>>
@@ -120,66 +137,88 @@ using the format: YYYYMMDD_HHMMSS.
120137
ESMValTool uses several categories (in ESMValTool, this is referred to as projects)
121138
for input data based on their source. The current categories in the configuration
122139
file are mentioned below. For example, CMIP is used for a dataset from
123-
the climate model intercomparison project whereas OBS is used for an observational dataset.
124-
We can find more information about the projects in the ESMValTool
140+
the Climate Model Intercomparison Project whereas OBS may be
141+
used for an observational dataset.
142+
More information about the projects used in ESMValTool is available in the
125143
[documentation](https://docs.esmvaltool.org/projects/esmvalcore/en/latest/quickstart/find_data.html).
144+
When using ESMValTool on your own machine, you can create a directory to download
145+
climate model data or observation data sets and let the tool use data from there.
146+
It is also possible to ask
147+
ESMValTool to download climate model data as needed. This can be done by specifying a
148+
download directory and by setting the option to download data as shown below.
149+
150+
```yaml
151+
# Directory for storing downloaded climate data
152+
download_dir: ~/climate_data
153+
offline: false
154+
```
155+
If you are working offline or do not want to download the data then set the
156+
option above to `true`.
157+
126158
The ``rootpath`` specifies the directories where ESMValTool will look for input data.
127-
For each category, you can define either one path or several paths as a list.
128-
For example:
159+
For each category, you can define either one path or several paths as a list. For example:
129160
130161
```yaml
131162
rootpath:
132163
CMIP5: [~/cmip5_inputpath1, ~/cmip5_inputpath2]
133164
OBS: ~/obs_inputpath
134165
RAWOBS: ~/rawobs_inputpath
135-
default: ~/default_inputpath
136-
CORDEX: ~/default_inputpath
166+
default: ~/climate_data
137167
```
138-
139-
Site-specific entries for Jasmin and DKRZ are listed at the end of the
140-
example configuration file.
168+
These are typically available in the default configuration file you downloaded, so simply
169+
removing the machine specific lines should be sufficient to access input data.
141170
142171
> ## Set the correct rootpath
143172
>
144173
> In this tutorial, we will work with data from
145174
> [CMIP5](https://esgf-node.llnl.gov/projects/cmip5/)
146175
> and [CMIP6](https://esgf-node.llnl.gov/projects/cmip6).
147-
> How can we moodify the `rootpath` to make sure the data path is set correctly
148-
> for both CMIP5 and CMIP6?
149-
>
176+
> How can we modify the `rootpath` to make sure the data path is set correctly
177+
> for both CMIP5 and CMIP6?
150178
> Note:
151-
> to get the data, check instruction in
179+
> to get the data, check the instructions in
152180
> [Setup]({{ page.root }}{% link setup.md %}).
153181
>
154182
>> ## Solution
155183
>>
156184
>> - Are you working on your own local machine?
157185
>> You need to add the root path of the folder where the data is available
158186
>> to the `config-user.yml` file as:
187+
>>
159188
>>```yaml
160189
>> rootpath:
161190
>> ...
162191
>> CMIP5: ~/esmvaltool_tutorial/data
163192
>> CMIP6: ~/esmvaltool_tutorial/data
164193
>>```
165194
>>
166-
>> - Are you working with on a computer cluster like Jasmin or DKRZ?
167-
>> Site-specific path to the data are already listed at the end of the
195+
>> - Are you working on your local machine and have downloaded data using ESMValTool?
196+
>> You need to add the root path of the folder where the data has been downloaded to as
197+
>> specified in the `download_dir`.
198+
>>
199+
>> ```yaml
200+
>> rootpath:
201+
>> ...
202+
>> CMIP5: ~/climate_data
203+
>> CMIP6: ~/climate_data
204+
>>```
205+
>>
206+
>> - Are you working on a computer cluster like Jasmin or DKRZ?
207+
>> Site-specific path to the data for JASMIN/DKRZ/ETH/IPSL
208+
>> are already listed at the end of the
168209
>> `config-user.yml` file. You need to uncomment the related lines.
169-
>> For example, on Jasmin:
210+
>> For example, on JASMIN:
170211
>>
171212
>>```yaml
172-
>> # Site-specific entries: Jasmin
173-
>> # Uncomment the lines below to locate data on JASMIN
174-
>> rootpath:
175-
>> CMIP6: /badc/cmip6/data/CMIP6
176-
>> CMIP5: /badc/cmip5/data/cmip5/output1
177-
>> # CMIP3: /badc/cmip3_drs/data/cmip3/output
178-
>> # OBS: /gws/nopw/j04/esmeval/obsdata-v2
179-
>> # OBS6: /gws/nopw/j04/esmeval/obsdata-v2
180-
>> # obs4mips: /gws/nopw/j04/esmeval/obsdata-v2
181-
>> # ana4mips: /gws/nopw/j04/esmeval/obsdata-v2
182-
>> # CORDEX: /badc/cordex/data/CORDEX/output
213+
>>auxiliary_data_dir: /gws/nopw/j04/esmeval/aux_data/AUX
214+
>>rootpath:
215+
>> CMIP6: /badc/cmip6/data/CMIP6
216+
>> CMIP5: /badc/cmip5/data/cmip5/output1
217+
>> OBS: /gws/nopw/j04/esmeval/obsdata-v2
218+
>> OBS6: /gws/nopw/j04/esmeval/obsdata-v2
219+
>> obs4MIPs: /gws/nopw/j04/esmeval/obsdata-v2
220+
>> ana4mips: /gws/nopw/j04/esmeval/obsdata-v2
221+
>> default: /gws/nopw/j04/esmeval/obsdata-v2
183222
>>```
184223
>>
185224
>> - For more information about setting the rootpath, see also the ESMValTool
@@ -216,8 +255,16 @@ information about ``drs``, you can visit the ESMValTool documentation on
216255
>> CMIP5: default
217256
>> CMIP6: default
218257
>>```
219-
>>
220-
>> - Are you working with on a computer cluster like Jasmin or DKRZ?
258+
>> - Are you asking ESMValTool to download the data for use with your diagnostics?
259+
>> You need to set the `drs` of the data in the `config-user.yml` file as:
260+
>> ```yaml
261+
>> drs:
262+
>> CMIP5: ESGF
263+
>> CMIP6: ESGF
264+
>> CORDEX: ESGF
265+
>> obs4MIPs: ESGF
266+
>>```
267+
>> - Are you working on a computer cluster like Jasmin or DKRZ?
221268
>> Site-specific `drs` of the data are already listed at the end of the
222269
>> `config-user.yml` file. You need to uncomment the related lines.
223270
>> For example, on Jasmin:
@@ -227,12 +274,10 @@ information about ``drs``, you can visit the ESMValTool documentation on
227274
>> drs:
228275
>> CMIP6: BADC
229276
>> CMIP5: BADC
230-
>> # CMIP3: BADC
231-
>> # CORDEX: BADC
232-
>> # OBS: BADC
233-
>> # OBS6: BADC
234-
>> # obs4mips: BADC
235-
>> # ana4mips: BADC
277+
>> OBS: default
278+
>> OBS6: default
279+
>> obs4mips: default
280+
>> ana4mips: default
236281
>>```
237282
>>
238283
> {: .solution}
@@ -242,8 +287,8 @@ information about ``drs``, you can visit the ESMValTool documentation on
242287
>
243288
> 1. In the previous exercise, we set the `drs` of CMIP5 data to `default`.
244289
> Can you explain why?
245-
> 2. Have a look at the directory structure of the data.
246-
> There is the folder `Tier1`. What does it mean?
290+
> 2. Have a look at the directory structure of the `OBS` data.
291+
> There is a folder called `Tier1`. What does it mean?
247292
>
248293
>> ## Solution
249294
>>
@@ -254,7 +299,7 @@ information about ``drs``, you can visit the ESMValTool documentation on
254299
>> 2. Observational data are organized in Tiers depending on their level of
255300
>> public availability. Therefore the default directory must be structured
256301
>> accordingly with sub-directories `TierX` e.g. Tier1, Tier2 or Tier3, even
257-
>> when `drs: default`.
302+
>> when `drs: default`. More details can be found in the [documentation](https://docs.esmvaltool.org/projects/esmvalcore/en/latest/quickstart/find_data.html#observational-data).
258303
>>
259304
> {: .solution}
260305
{: .challenge}

0 commit comments

Comments
 (0)