Skip to content

Commit a6d2b53

Browse files
committed
changes made to clarify that recipes produce an error message when run without a variable to process
1 parent 7dbf649 commit a6d2b53

File tree

1 file changed

+18
-10
lines changed

1 file changed

+18
-10
lines changed

_episodes/06-preprocessor.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -174,18 +174,21 @@ For now, let's just use one of the existing references. Change the author field
174174
ESMValTool. If you now run the recipe again, you should see the final message
175175

176176
```
177-
INFO Run was successful
177+
ERROR No tasks to run!
178178
```
179179
{: .output}
180180
181+
Although there is no actual error in the recipe, ESMValTool assumes you mistakenly
182+
left out a variable name to process and alerts you with this error message.
181183
## Adding a dataset entry
182184
183185
Let's add a datasets section. We will reuse the same datasets that we used in
184-
previous episodes. The data files are stored in `~/esmvaltool_tutorial/data`.
186+
previous episodes.
185187
186188
> ## Filling in the dataset keys
187189
>
188-
> Explore the data directory, and look at the explanation of the dataset entry
190+
> Use the paths specified in the configuration file to explore the data directory,
191+
> and look at the explanation of the dataset entry
189192
> in the [ESMValTool
190193
> documentation](https://docs.esmvaltool.org/projects/esmvalcore/en/latest/recipe/overview.html#recipe-section-documentation).
191194
> For both the datasets, write down the following properties:
@@ -219,18 +222,23 @@ previous episodes. The data files are stored in `~/esmvaltool_tutorial/data`.
219222
> {: .solution}
220223
{: .challenge}
221224
222-
We will start with the BCC-ESM1 dataset. Add a datasets section to the recipe,
223-
listing a single dataset, like so:
225+
We start with the BCC-ESM1 dataset and add a datasets section to the recipe,
226+
listing a single dataset, as shown below. Note that key fields such
227+
as `mip` or `start_year` are included in the `datasets` section here but are part
228+
of the `diagnostic` section in the recipe example seen in [Running your first recipe]({{ page.root }}{% link _episodes/04-recipe.md %}).
224229
225230
```yaml
226231
datasets:
227-
- {dataset: BCC-ESM1, project: CMIP6, mip: Amon, exp: historical, ensemble: r1i1p1f1, grid: gn, start_year: 1850, end_year: 2014}
232+
- {dataset: BCC-ESM1, project: CMIP6, mip: Amon, exp: historical,
233+
ensemble: r1i1p1f1, grid: gn, start_year: 1850, end_year: 2014}
228234
```
229235

230-
Verify that the recipe still runs. Note that we have not included the short name
231-
of the variable in this dataset section. This allows us to reuse this dataset
232-
entry with different variable names later on. This is not really necessary for
233-
our simple use case, but it is common practice in ESMValTool.
236+
The recipe should run but produce the same message as in the previous case since we
237+
still have not included a variable to actually process. We have not included the
238+
short name of the variable in this dataset section because this allows
239+
us to reuse this dataset entry with different variable names later on.
240+
This is not really necessary for our simple use case, but it is common practice
241+
in ESMValTool.
234242

235243
## Adding the preprocessor section
236244

0 commit comments

Comments
 (0)