Skip to content

Commit 63351c2

Browse files
authored
Update documentation on running the tool (#1400)
* Update documentation on running the tool * Move text on installed recipes to ESMValTool * Add a note that recipe_example.yml does not exist
1 parent d4c6c6f commit 63351c2

File tree

3 files changed

+49
-62
lines changed

3 files changed

+49
-62
lines changed

doc/quickstart/index.rst

+3-4
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ Getting started
44
.. toctree::
55
:maxdepth: 1
66

7-
Installation <install>
7+
Installation <install>
88
Configuration <configure>
99
Input data <find_data>
10-
Installed recipes <recipes>
11-
Running <run>
12-
Output <output>
10+
Running <run>
11+
Output <output>

doc/quickstart/recipes.rst

-36
This file was deleted.

doc/quickstart/run.rst

+46-22
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,66 @@ Running
66
The ESMValCore package provides the ``esmvaltool`` command line tool, which can
77
be used to run a :doc:`recipe <../recipe/index>`.
88

9-
To run a recipe, call ``esmvaltool run`` with the desired recipe:
9+
To list the available commands, run
1010

1111
.. code:: bash
1212
13-
esmvaltool run recipe_python.yml
13+
esmvaltool --help
14+
15+
It is also possible to get help on specific commands, e.g.
16+
17+
.. code:: bash
18+
19+
esmvaltool run --help
20+
21+
will display the help message with all options for the ``run`` command.
22+
23+
To run a recipe, call ``esmvaltool run`` with the path to the desired recipe:
24+
25+
.. code:: bash
26+
27+
esmvaltool run recipe_example.yml
28+
29+
The ``esmvaltool run recipe_example.yml`` command will first look if
30+
``recipe_example.yml`` is the path to an existing file.
31+
If this is the case, it will run that recipe.
32+
If you have :ref:`ESMValTool installed <esmvaltool:install>`, it will look if
33+
the name matches one of the recipes in your ESMValTool installation directory,
34+
in the subdirectory
35+
`recipes <https://github.com/ESMValGroup/ESMValTool/blob/main/esmvaltool/recipes/>`__
36+
and run that.
37+
38+
.. note::
39+
40+
There is no ``recipe_example.yml`` shipped with either ESMValCore or ESMValTool.
41+
If you would like to try out the command above, replace ``recipe_example.yml``
42+
with the path to an existing recipe, e.g.
43+
`examples/recipe_python.yml <https://github.com/ESMValGroup/ESMValTool/blob/main/esmvaltool/recipes/examples/recipe_python.yml>`_
44+
if you have the ESMValTool package installed.
45+
46+
To work with installed recipes, the ESMValTool package provides the
47+
``esmvaltool recipes`` command, see :ref:`esmvaltool:recipes_command`.
1448

1549
If the configuration file is not in the default location
1650
``~/.esmvaltool/config-user.yml``, you can pass its path explicitly:
1751

1852
.. code:: bash
1953
20-
esmvaltool run --config_file /path/to/config-user.yml recipe_python.yml
54+
esmvaltool run --config_file /path/to/config-user.yml recipe_example.yml
2155
2256
It is also possible to explicitly change values from the config file using flags:
2357

2458
.. code:: bash
2559
26-
esmvaltool run --argument_name argument_value recipe_python.yml
60+
esmvaltool run --argument_name argument_value recipe_example.yml
2761
2862
To automatically download the files required to run a recipe from ESGF, set
2963
``offline`` to ``false`` in the :ref:`user configuration file`
3064
or run the tool with the command
3165

3266
.. code:: bash
3367
34-
esmvaltool run --offline=False recipe_python.yml
68+
esmvaltool run --offline=False recipe_example.yml
3569
3670
This feature is available for projects that are hosted on the ESGF, i.e.
3771
CMIP3, CMIP5, CMIP6, CORDEX, and obs4MIPs.
@@ -40,7 +74,7 @@ To control the strictness of the CMOR checker, use the flag ``--check_level``:
4074

4175
.. code:: bash
4276
43-
esmvaltool run --check_level=relaxed recipe_python.yml
77+
esmvaltool run --check_level=relaxed recipe_example.yml
4478
4579
Possible values are:
4680

@@ -54,13 +88,13 @@ use
5488

5589
.. code:: bash
5690
57-
esmvaltool run recipe_python.yml --resume_from ~/esmvaltool_output/recipe_python_20210930_123907
91+
esmvaltool run recipe_example.yml --resume_from ~/esmvaltool_output/recipe_python_20210930_123907
5892
5993
Multiple directories can be specified for re-use, make sure to quote them:
6094

6195
.. code:: bash
6296
63-
esmvaltool run recipe_python.yml --resume_from "~/esmvaltool_output/recipe_python_20210930_101007 ~/esmvaltool_output/recipe_python_20210930_123907"
97+
esmvaltool run recipe_example.yml --resume_from "~/esmvaltool_output/recipe_python_20210930_101007 ~/esmvaltool_output/recipe_python_20210930_123907"
6498
6599
The first preprocessor directory containing the required data will be used.
66100

@@ -74,7 +108,7 @@ To run only the preprocessor tasks from a recipe, use
74108

75109
.. code:: bash
76110
77-
esmvaltool run recipe_python.yml --remove_preproc_dir=False --run_diagnostic=False
111+
esmvaltool run recipe_example.yml --remove_preproc_dir=False --run_diagnostic=False
78112
79113
.. note::
80114

@@ -88,7 +122,7 @@ To run a reduced version of the recipe, usually for testing purpose you can use
88122

89123
.. code:: bash
90124
91-
esmvaltool run --max_datasets=NDATASETS --max_years=NYEARS recipe_python.yml
125+
esmvaltool run --max_datasets=NDATASETS --max_years=NYEARS recipe_example.yml
92126
93127
In this case, the recipe will limit the number of datasets per variable to
94128
NDATASETS and the total amount of years loaded to NYEARS. They can also be used
@@ -100,7 +134,7 @@ To run a recipe, even if some datasets are not available, use
100134

101135
.. code:: bash
102136
103-
esmvaltool run --skip_nonexistent=True recipe_python.yml
137+
esmvaltool run --skip_nonexistent=True recipe_example.yml
104138
105139
It is also possible to select only specific diagnostics to be run. To tun only
106140
one, just specify its name. To provide more than one diagnostic to filter use
@@ -109,17 +143,7 @@ attention to the quotes.
109143

110144
.. code:: bash
111145
112-
esmvaltool run --diagnostics=diagnostic1 recipe_python.yml
113-
114-
115-
116-
To get help on additional commands, please use
117-
118-
.. code:: bash
119-
120-
esmvaltool --help
121-
122-
146+
esmvaltool run --diagnostics=diagnostic1 recipe_example.yml
123147
124148
.. note::
125149

0 commit comments

Comments
 (0)