Skip to content

Commit 31ec240

Browse files
committed
Merge remote-tracking branch 'origin/master' into nano-everywhere-77
2 parents ab3f74a + 043529c commit 31ec240

File tree

3 files changed

+75
-48
lines changed

3 files changed

+75
-48
lines changed

_episodes/03-configuration.md

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ keypoints:
2020
## The configuration file
2121

2222
The ``config-user.yml`` configuration file contains all the global level
23-
information needed by ESMValTool to run. This is an [YAML
24-
file](https://yaml.org/spec/1.2/spec.html). An example configuration file can be
25-
found in the ESMValCore repository:
23+
information needed by ESMValTool to run.
24+
This is a [YAML file](https://yaml.org/spec/1.2/spec.html).
25+
An example configuration file can be found in the ESMValCore repository:
2626
[config-user-example.yml](https://github.com/ESMValGroup/ESMValCore/blob/master/esmvalcore/config-user.yml).
2727

2828
You can generate the default configuration file by running:
@@ -31,14 +31,15 @@ You can generate the default configuration file by running:
3131
esmvaltool config get_config_user
3232
~~~
3333

34-
It will save the file to: ``{HOME}/.esmvaltool/config-user.yml``.
34+
It will save the file to: `~/.esmvaltool/config-user.yml`, where `~` is the
35+
path to your home directory. Note that files and directories starting with a
36+
period are "hidden", to see the `.esmvaltool` directory in the terminal use
37+
`ls -la ~`.
3538

36-
Now, let's change our working directory in a terminal window to
37-
``{HOME}/.esmvaltool``. Then, we run a text editor called ``nano`` to have a look
38-
inside the configuration file:
39+
We run a text editor called ``nano`` to have a look inside the configuration file:
3940

4041
~~~bash
41-
nano config-user.yml
42+
nano ~/.esmvaltool/config-user.yml
4243
~~~
4344

4445
This file contains the information for:
@@ -91,12 +92,14 @@ remove_preproc_dir: true
9192

9293
# Path to custom config-developer file, to customise project configurations.
9394
# See config-developer.yml for an example. Set to [null] to use the default
94-
config_developer_file: null
95+
config_developer_file: null
9596
# Get profiling information for diagnostics
9697
# Only available for Python diagnostics
9798
profile_diagnostic: false
9899
```
99100
101+
In general there is no need to change the settings listed above.
102+
100103
## Destination directory
101104
102105
The destination directory is the rootpath where ESMValTool will store its output folders containing
@@ -169,7 +172,7 @@ for input data based on their source. The current categories in the configuratio
169172
file are mentioned below. For example, CMIP is used for a dataset from
170173
the climate model intercomparison project whereas OBS is used for an observational dataset.
171174
We can find more information about the projects in the ESMValTool
172-
[documentation](https://docs.esmvaltool.org/en/latest/input.html).
175+
[documentation](https://docs.esmvaltool.org/projects/esmvalcore/en/latest/quickstart/find_data.html).
173176
The ``rootpath`` specifies the directories where ESMValTool will look for input data.
174177
For each category, you can define either one path or several paths as a list.
175178
@@ -181,7 +184,8 @@ rootpath:
181184
default: ~/default_inputpath
182185
CORDEX: ~/default_inputpath
183186
```
184-
Site-specific entries for Jasmin, DKRZ and ETHZ are listed at the end of the example configuration file.
187+
Site-specific entries for Jasmin, DKRZ and ETHZ are listed at the end of the
188+
example configuration file.
185189
186190
In this lesson, we will work with data from
187191
[CMIP5](https://esgf-node.llnl.gov/projects/cmip5/).
@@ -195,10 +199,10 @@ We add the root path of the folder where our/your data is available.
195199
196200
> ## Setting the correct rootpath
197201
>
198-
> - To get the data (or its correct rootpath), check instruction in [Setup]({{
199-
> page.root }}{% link setup.md %}).
202+
> - To get the data (or its correct rootpath), check instruction in
203+
> [Setup]({{ page.root }}{% link setup.md %}).
200204
> - For more information about setting the rootpath, see also the ESMValTool
201-
> [documentation](https://esmvaltool.readthedocs.io/projects/esmvalcore/en/latest/esmvalcore/datafinder.html).
205+
> [documentation](https://docs.esmvaltool.org/projects/esmvalcore/en/latest/esmvalcore/datafinder.html).
202206
{: .callout}
203207
204208
## Directory structure for the data from different projects
@@ -225,7 +229,7 @@ drs:
225229
> ## Make your own configuration file
226230
>
227231
> It is possible to have several configuration files with different purposes,
228-
> for example: config-user_formalised_runs.yml, config-user_debugging.yml
232+
> for example: config-user_formalised_runs.yml, config-user_debugging.yml
229233
{: .callout}
230234
231235
> ## Saving preprocessed data
@@ -235,11 +239,13 @@ drs:
235239
>
236240
>> ## Solution
237241
>>
238-
> > If the option ``save_intermediary_cubes`` is set to true in the
239-
> > config-user.yml file, then the intermediary cubes will also be saved in the
240-
> > folder ``preproc``. Also, if the option ``remove_preproc_dir`` is set to
241-
> > ``false``, then the ``preproc/`` directory contains all the preprocessed
242-
> > data and the metadata interface files.
242+
> > If the option ``remove_preproc_dir`` is set to ``false``, then the
243+
> > ``preproc/`` directory contains all the pre-processed data and the
244+
> > metadata interface files.
245+
> > If the option ``save_intermediary_cubes`` is set to ``true``
246+
> > then data will also be saved after each preprocessor step in the folder
247+
> > ``preproc``. Note that saving all intermediate results to file will result
248+
> > in a considerable slowdown.
243249
> {: .solution}
244250
{: .challenge}
245251

_episodes/04-recipe.md

Lines changed: 47 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -64,37 +64,50 @@ diagnostics and description.
6464

6565
The information you provide in the recipe is not only affecting the processes
6666
you are starting, but also the directory names your output will be structured
67-
in. For additional reads, please have a look at the recipe format description in
68-
the [ESMValTool
69-
manual](https://docs.esmvaltool.org/projects/esmvalcore/en/latest/recipe/overview.html#recipe-section-diagnostics).
67+
in.
68+
For additional reads, please have a look at the recipe format description in the
69+
[ESMValTool manual](https://docs.esmvaltool.org/projects/esmvalcore/en/latest/recipe/overview.html#recipe-section-diagnostics).
7070

7171
## How to run ESMValTool
7272

73-
Once you’ve set up your conda environment and installed ESMValTool (see[ episode
74-
#2]({{ page.root}}{% link _episodes/02-installation.md %})) and set up your `config-user.yml` file to correctly match your local
75-
environment, (see [episode #3]({{ page.root}}{% link _episodes/03-configuration.md %})), ESMValTool is invoked using a simple
76-
command:
73+
Once you’ve set up your conda environment and installed ESMValTool (see
74+
[episode #2]({{ page.root}}{% link _episodes/02-installation.md %})
75+
) and set up your `config-user.yml` file to correctly match your local
76+
environment, (see
77+
[episode #3]({{ page.root}}{% link _episodes/03-configuration.md %})
78+
), ESMValTool is invoked using the command:
7779

80+
~~~bash
81+
esmvaltool run /path/to/recipe_example.yml
7882
~~~
79-
esmvaltool run recipe
80-
~~~
81-
{: .source}
8283

83-
If the configuration file is not in the default {HOME}\.esmvaltool\ path you can pass its path explicitly:
84+
If the configuration file is not in the default location
85+
`~/.esmvaltool/config-user.yml`, you can pass its path explicitly:
8486

87+
~~~bash
88+
esmvaltool run --config_file /path/to/config-user.yml /path/to/recipe_example.yml
8589
~~~
86-
esmvaltool run --config_file configuration recipe
90+
91+
Note that the path to the recipe can be either a path to a recipe file or it can
92+
be the name of an installed recipe.
93+
To view the list of installed recipes, run
94+
~~~bash
95+
esmvaltool recipes list
8796
~~~
88-
{: .source}
8997

9098
To try your hand with a basic recipe, please work through this episode.
9199

92100
## Introduction to the example recipe
93101
The recipe presented here is a simple, basic recipe that takes a single dataset
94102
and produces a time series plot.
95103

96-
Please download the following recipe into your ESMValTool working directory with
97-
the name: [recipe_example.yml](https://github.com/ESMValGroup/ESMValTool_Tutorial/blob/master/data/recipe_example.yml)
104+
Please download
105+
[recipe_example.yml](https://github.com/ESMValGroup/ESMValTool_Tutorial/blob/master/data/recipe_example.yml)
106+
into your ESMValTool working directory:
107+
108+
~~~bash
109+
wget https://raw.githubusercontent.com/ESMValGroup/ESMValTool_Tutorial/master/data/recipe_example.yml
110+
~~~
98111

99112
> ## recipe_example.yml
100113
> ```YAML
@@ -164,14 +177,17 @@ the name: [recipe_example.yml](https://github.com/ESMValGroup/ESMValTool_Tutoria
164177
Please note the following sections:
165178
166179
- documentation: lines 4-20
167-
180+
168181
The documentation consists of the following information:
169182
170183
- description: a short description of the recipe
171184
- authors: a list of authors (linked to `esmvaltool/config-references.yml`)
172-
- maintainer: a list of maintainers (linked to `esmvaltool/config-references.yml`)
173-
- references: a list of references (linked to a bibtexfile in `esmvaltool/references` with the same name)
174-
- projects: a list of projects (linked to `esmvaltool/config-references.yml`)
185+
- maintainer: a list of maintainers (linked to
186+
`esmvaltool/config-references.yml`)
187+
- references: a list of references (linked to a bibtexfile in
188+
`esmvaltool/references` with the same name)
189+
- projects: a list of projects (linked to
190+
`esmvaltool/config-references.yml`)
175191
176192
177193
- datasets: lines 22-23
@@ -191,11 +207,12 @@ Please note the following sections:
191207
192208
- preprocessors: lines 25-28
193209
194-
The definition for different preprocessors or preprocessor combinations. If no
195-
preprocessing is needed, the preprocessor can be set to an empty python
196-
dictionary (`{}`). Here, we produce annual means. The preprocessor is called
210+
The definition for different preprocessors or preprocessor combinations.
211+
If no preprocessing is needed, the preprocessor can be set to an empty
212+
map (`{}`). Here, we produce annual means. The preprocessor is called
197213
with its name (here: prep_timeseries), later in the diagnostic (line 39).
198-
(See [episode #5]({{ page.root}}{% link _episodes/05-preprocessor.md %}) for more details.)
214+
(See [episode #5]({{ page.root}}{% link _episodes/05-preprocessor.md %})
215+
for more details.)
199216
200217
- diagnostic section: lines 30-42
201218
@@ -215,8 +232,11 @@ Please note the following sections:
215232
- scripts: a definition of all scripts that are used in this diagnostic
216233
- the next indent (here: timeseries_diag) is the scripts’ names (a string
217234
without whitespace) for the script to use
218-
- script: a executable script with a directory relative to the
219-
`esmvaltool/diag_scripts/` directory
235+
- script: a script that will produce the plots. The path can be either
236+
relative the ESMValTool installation with subdirectory
237+
[`esmvaltool/diag_scripts/`](https://github.com/ESMValGroup/ESMValTool/tree/master/esmvaltool/diag_scripts)
238+
or an absolute path. In this case, it is a diagnostic script that is
239+
installed with ESMValTool.
220240
221241
> ## Please answer the following questions:
222242
> What is the short_name of the variable being analyzed?
@@ -233,7 +253,8 @@ Please note the following sections:
233253
{: .solution}
234254
235255
> ## What is the diagnostic script being used?
236-
> `ocean/diagnostic_timeseries.py`
256+
> The installed copy of
257+
> [`ocean/diagnostic_timeseries.py`](https://github.com/ESMValGroup/ESMValTool/blob/master/esmvaltool/diag_scripts/ocean/diagnostic_timeseries.py)
237258
{: .solution}
238259
239260
> ## How many years of data are being analyzed?

_episodes/06-debugging.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ conda activate esmvaltool
5050

5151
> ## conda environment
5252
>
53-
> More information about conda environment can be found at [Installation]({{
54-
> page.root }}{% link _episodes/02-installation.md %})
53+
> More information about the conda environment can be found at
54+
> [Installation]({{ page.root }}{% link _episodes/02-installation.md %}).
5555
{: .callout}
5656

5757
Let's change the working directory to the folder ``run`` and list its files:

0 commit comments

Comments
 (0)