Skip to content

Commit b4b1367

Browse files
committed
Merge remote-tracking branch 'origin/main' into update_episode_cmorize
2 parents d6ffa26 + 37235a4 commit b4b1367

File tree

10 files changed

+249
-344
lines changed

10 files changed

+249
-344
lines changed

.github/workflows/build-check-tutorial-site.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66

77
jobs:
88
build:
9-
runs-on: ubuntu-20.04
9+
runs-on: "ubuntu-latest"
1010
steps:
1111
- uses: actions/checkout@v2
1212
- name: Setup Ruby

_episodes/00-introduction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Introduction"
33
teaching: 5
44
exercises: 10
5-
compatibility: ESMValTool v2.11.0
5+
compatibility: ESMValTool v2.12.0
66

77
questions:
88
- What is ESMValTool?

_episodes/01-quickstart.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Quickstart guide"
33
teaching: 2
44
exercises: 8
5-
compatibility: ESMValTool v2.10.0
5+
compatibility: ESMValTool v2.12.0
66

77
questions:
88

@@ -107,4 +107,4 @@ keypoints:
107107
> [Running your first recipe][lesson-recipe] episode in this tutorial.
108108
{: .challenge}
109109
110-
{% include links.md %}
110+
{% include links.md %}

_episodes/02-installation.md

Lines changed: 4 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Installation"
33
teaching: 10
44
exercises: 10
5-
compatibility: ESMValTool v2.10.0
5+
compatibility: ESMValTool v2.12.0
66
questions:
77
- "What are the prerequisites for installing ESMValTool?"
88
- "How do I confirm that the installation was successful?"
@@ -146,52 +146,6 @@ installed in it.
146146
>
147147
{: .callout}
148148

149-
### Install Julia
150-
151-
Some ESMValTool diagnostics are written in the Julia programming language.
152-
If you want a full installation of ESMValTool including Julia diagnostics, you need
153-
to make sure Julia is installed before installing ESMValTool.
154-
155-
In this tutorial, we will not use Julia, but for reference, we have listed the steps
156-
to install Julia below.
157-
Complete instructions for installing Julia can be found on the [Julia
158-
installation page](https://julialang.org/downloads/platform/#linux_and_freebsd).
159-
160-
> ## Julia installation instructions
161-
>
162-
> First, open a bash terminal and activate the newly created `esmvaltool` environment.
163-
>
164-
> ```bash
165-
> conda activate esmvaltool
166-
> ```
167-
>
168-
> Next, to install Julia via `mamba`, you can use the following command:
169-
>
170-
> ```bash
171-
> mamba install julia
172-
> ```
173-
>
174-
> To check that the Julia executable can be found, run
175-
>
176-
> ```bash
177-
> which julia
178-
> ```
179-
>
180-
> to display the path to the Julia executable, it should be
181-
>
182-
> ```
183-
> ~/mambaforge/envs/esmvaltool/bin/julia
184-
> ```
185-
> {: .output}
186-
>
187-
> To test that Julia is installed correctly, run
188-
>
189-
> ```bash
190-
> julia
191-
> ```
192-
>
193-
> to start the interactive Julia interpreter. Press `Ctrl+D` to exit.
194-
{: .solution}
195149

196150
### Test that the installation was successful
197151

@@ -229,13 +183,13 @@ to display the command line help.
229183
> > {: .bash}
230184
> > The version of ESMValTool installed should be displayed on the screen as:
231185
> > ~~~
232-
> > ESMValCore: 2.10.0
233-
> > ESMValTool: 2.10.0
186+
> > ESMValCore: 2.12.0
187+
> > ESMValTool: 2.12.0
234188
> > ~~~
235189
> > {: .output}
236190
> Note that on HPC servers such as JASMIN, sometimes a more recent development
237191
> version may be displayed for ESMValTool, for e.g.
238-
> `ESMValTool: 2.9.0.dev4+g6948d5512`
192+
> `ESMValTool: 2.12.0.dev71+g2c60b4d97`
239193
> {: .solution}
240194
{: .challenge}
241195

_episodes/03-configuration.md

Lines changed: 36 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Configuration"
33
teaching: 10
44
exercises: 10
5-
compatibility: ESMValTool v2.10.0
5+
compatibility: ESMValTool v2.12.0
66

77
questions:
88
- What is the user configuration file and how should I use it?
@@ -22,7 +22,7 @@ keypoints:
2222

2323
## The configuration file
2424

25-
For the purposes of this tutorial, we will create a directory in our home directory
25+
First, for the purposes of this tutorial, we will create a directory in our home directory
2626
called `esmvaltool_tutorial` and use that as our working directory. The following steps
2727
should do that:
2828

@@ -38,29 +38,32 @@ This is a [YAML file](https://yaml.org/spec/1.2/spec.html).
3838
You can get the default configuration file by running:
3939

4040
~~~bash
41-
esmvaltool config get_config_user --path=<target_dir>
41+
esmvaltool config get_config_user
4242
~~~
43-
The default configuration file will be downloaded to the directory specified with
44-
the `--path` variable. For instance, you can provide the path to your working directory
45-
as the `target_dir`. If this option is not used, the file will be saved to the default
46-
location: `~/.esmvaltool/config-user.yml`, where `~` is the
43+
The default configuration file will be downloaded to the default location:
44+
`~/.config/esmvaltool/config-user.yml`, where `~` is the
4745
path to your home directory. Note that files and directories starting with a
48-
period are "hidden", to see the `.esmvaltool` directory in the terminal use
49-
`ls -la ~`. Note that if a configuration file by that name already exists in the default
46+
period are "hidden", to see the `.config` directory in the terminal use
47+
`ls -la ~`.
48+
With the optional ``--path=<target_dir>`` you can specifiy the directory
49+
in which the configuration file can be saved. For instance, you can provide
50+
the path to your working directory as the `target_dir`.
51+
Note, if a configuration file by that name already exists in the default
5052
location, the `get_config_user` command will not update the file as ESMValTool will not
5153
overwrite the file. You will have to move the file first if you want an updated copy of the
52-
user configuration file.
54+
default user configuration file.
5355

5456

5557

5658
We run a text editor called ``nano`` to have a look inside the configuration file
5759
and then modify it if needed:
5860

5961
~~~bash
60-
nano ~/.esmvaltool/config-user.yml
62+
nano ~/.config/esmvaltool/config-user.yml
6163
~~~
6264

63-
Any other editor can be used, e.g.vim.
65+
If ``nano`` does not work on your system, or if you prefer a different editor,
66+
any other editor can be used, e.g. ``vim``.
6467

6568
This file contains the information for:
6669

@@ -120,7 +123,7 @@ using the format: YYYYMMDD_HHMMSS.
120123

121124
> ## Set the destination directory
122125
>
123-
> Let's name our destination directory ``esmvaltool_output`` in the working directory.
126+
> Let's name our destination directory ``esmvaltool_output`` in the current directory.
124127
> ESMValTool should write the output to this path, so make sure you have the disk space
125128
> to write output to this directory.
126129
> How do we set this in the `config-user.yml`?
@@ -172,7 +175,7 @@ rootpath:
172175
default: ~/climate_data
173176
```
174177
These are typically available in the default configuration file you downloaded, so simply
175-
removing the machine specific lines should be sufficient to access input data.
178+
uncommenting the machine specific lines should be sufficient to access input data.
176179
177180
> ## Set the correct rootpath
178181
>
@@ -228,23 +231,21 @@ removing the machine specific lines should be sufficient to access input data.
228231
>>```
229232
>>
230233
>> - For more information about setting the rootpath, see also the ESMValTool
231-
>> [documentation](https://docs.esmvaltool.org/projects/esmvalcore/en/latest/
232-
quickstart/find_data.html).
234+
>> [documentation](https://docs.esmvaltool.org/projects/esmvalcore/en/
235+
latest/quickstart/find_data.html).
233236
> {: .solution}
234237
{: .challenge}
235238
236239
## Directory structure for the data from different projects
237240
238241
Input data can be from various models, observations and reanalysis data that
239-
adhere to the [CF/CMOR standard](https://cmor.llnl.gov/). The ``drs`` setting
240-
describes the file structure.
241-
242+
adhere to the [CF/CMOR standard](https://cmor.llnl.gov/).
242243
The ``drs`` setting describes the file structure for several projects (e.g.
243244
CMIP6, CMIP5, obs4mips, OBS6, OBS) on several key machines
244245
(e.g. BADC, CP4CDS, DKRZ, ETHZ, SMHI, BSC). For more
245246
information about ``drs``, you can visit the ESMValTool documentation on
246-
[Data Reference Syntax (DRS)](https://docs.esmvaltool.org/projects/esmvalcore/
247-
en/latest/quickstart/find_data.html#cmor-drs).
247+
[Data Reference Syntax (DRS)](https://docs.esmvaltool.org/projects/ESMValCore/
248+
en/latest/quickstart/find_data.html#explaining-drs-cmip5-or-drs-cmip6).
248249
249250
> ## Set the correct drs
250251
>
@@ -293,24 +294,15 @@ en/latest/quickstart/find_data.html#cmor-drs).
293294
294295
> ## Explain the default drs (if working on local machine)
295296
>
296-
> 1. In the previous exercise, we set the `drs` of CMIP5 data to `default`.
297+
> In the previous exercise, we set the `drs` of CMIP5 data to `default`.
297298
> Can you explain why?
298-
> 2. Have a look at the directory structure of the `OBS` data.
299-
> There is a folder called `Tier1`. What does it mean?
300299
>
301300
>> ## Solution
302301
>>
303-
>> 1. `drs: default` is one way to retrieve data from a ROOT directory that has
302+
>> `drs: default` is one way to retrieve data from a ROOT directory that has
304303
>> no DRS-like structure. ``default`` indicates that all the files are in a
305304
>> folder without any structure.
306305
>>
307-
>> 2. Observational data are organized in Tiers depending on their level of
308-
>> public availability. Therefore the default directory must be structured
309-
>> accordingly with sub-directories `TierX` e.g. Tier1, Tier2 or Tier3, even
310-
>> when `drs: default`. More details can be found in the
311-
[documentation](https://docs.esmvaltool.org/projects/esmvalcore/en/latest/
312-
quickstart/find_data.html#observational-data).
313-
>>
314306
> {: .solution}
315307
{: .challenge}
316308
@@ -329,8 +321,8 @@ if you want to feed some additional data (e.g. shape files) to your recipe.
329321
> auxiliary_data_dir: ~/auxiliary_data
330322
> ```
331323
> See more information in ESMValTool
332-
[document](https://docs.esmvaltool.org/projects/ESMValCore/en/latest/quickstart
333-
/configure.html?highlight=auxiliary_data#user-configuration-file).
324+
[documentation](https://docs.esmvaltool.org/projects/ESMValCore/en/latest/
325+
> quickstart/configure.html?highlight=auxiliary_data#top-level-configuration-options).
334326
{: .callout}
335327
336328
> ## Number of parallel tasks
@@ -353,12 +345,18 @@ amount of memory available in your system.
353345
354346
> ## Make your own configuration file
355347
>
356-
> It is possible to have several configuration files with different purposes,
357-
> for example: config-user_formalised_runs.yml, config-user_debugging.yml.
358-
> In this case, you have to pass the path of your own configuration file
359-
> as a command-line option when running the ESMValTool.
348+
> Configuration files could live in the user configuration directory, which is
349+
> by default ``~/.config/esmvaltool``. The directory could be also specified
350+
> via the command line argument ``--config_dir``.
360351
> We will learn how to do this in the
361352
> [next lesson]({{ page.root }}{% link _episodes/04-recipe.md %}).
353+
>
354+
> It is possible to have several configuration files with different purposes,
355+
> for example: config-user_formalised_runs.yml, config-user_debugging.yml.
356+
> In this case, ESMValTool searches for all YAML files within each of the
357+
> configuration directories and merges them together. How this is done is
358+
> explained [here](https://docs.esmvaltool.org/projects/ESMValCore/en/
359+
> latest/quickstart/configure.html#yaml-files).
362360
{: .callout}
363361
364362
{% include links.md %}

_episodes/04-recipe.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Running your first recipe"
33
teaching: 15
44
exercises: 15
5-
compatibility: ESMValTool v2.10.0
5+
compatibility: ESMValTool v2.12.0
66

77
questions:
88
- "How to run a recipe?"
@@ -43,7 +43,7 @@ esmvaltool run examples/recipe_python.yml
4343
or if you have the user configuration file in your current directory then
4444

4545
```
46-
esmvaltool run --config_file ./config-user.yml examples/recipe_python.yml
46+
esmvaltool run --config_dir . examples/recipe_python.yml
4747
```
4848

4949
If everything is okay, you should see that ESMValTool is printing a lot of
@@ -80,7 +80,7 @@ Let's dissect what's happening here.
8080
> > ## Answers
8181
> >
8282
> > 1. The config file should be the one we edited in the previous episode,
83-
> > something like `/home/<username>/.esmvaltool/config-user.yml` or
83+
> > something like `/home/<username>/.config/esmvaltool/config-user.yml` or
8484
`~/esmvaltool_tutorial/config-user.yml`.
8585
> > 1. ESMValTool found the recipe in its installation directory,
8686
>> something like
@@ -132,8 +132,8 @@ distinguished in the log messages:
132132
> > following line in the output:
133133
> >
134134
> > ```
135-
> >[134535] INFO These tasks will be executed: map/tas, timeseries/tas_global,
136-
>>timeseries/script1, map/script1, timeseries/tas_amsterdam
135+
> >INFO [3966381] These tasks will be executed: timeseries/script1,
136+
> > timeseries/tas_amsterdam, timeseries/tas_global, map/tas, map/script1
137137
> > ```
138138
> >
139139
> > So there are three tasks related to timeseries: global temperature,

_episodes/05-conclusions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Conclusion of the basic tutorial"
33
teaching: 10
44
exercises: 0
5-
compatibility: ESMValTool v2.10.0
5+
compatibility: ESMValTool v2.12.0
66

77
questions:
88
- "What do I do now?"
@@ -63,7 +63,7 @@ to be suitable for use by ESMValTool.
6363
> - [ESMValTool home page](https://www.esmvaltool.org/)
6464
> - [Papers](https://esmvaltool.org/references/)
6565
> - [Source code (ESMValTool)](https://github.com/ESMValGroup/ESMValTool)
66-
> - [Source code (ESMValCore )](https://github.com/ESMValGroup/ESMValCore)
66+
> - [Source code (ESMValCore)](https://github.com/ESMValGroup/ESMValCore)
6767
{: .callout}
6868

6969

0 commit comments

Comments
 (0)