Skip to content

Commit 5695cf3

Browse files
author
BenMGeo
committed
add line numbers to recipe
1 parent 6abfe13 commit 5695cf3

File tree

1 file changed

+62
-58
lines changed

1 file changed

+62
-58
lines changed

_episodes/first_example_recipe.md

Lines changed: 62 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ Recipes are the instructions that you give to ESMValTool that tell it what you w
3030
- the time range and time resolution,
3131
- the MIP, ensemble member,
3232
- the experiment (i.e. historical, ssp125 etc...),
33-
- and the grid type (CMIP6 only)
34-
35-
This section can also be optional, as datasets can no preprocessing is needed.
33+
- and the grid type (CMIP6 only).
3634

3735
- preprocessors: general operations applied to a dataset before handling it in a diagnostic, listing
3836
- which preprocessor modules to apply,
@@ -75,51 +73,52 @@ Please copy and paste the following recipe into your ESMValTool working area wit
7573

7674
>## recipe_example.yml
7775
>~~~YAML
78-
> # ESMValTool
79-
> # recipe_example.yml
80-
> ---
81-
> documentation:
82-
> description: Demonstrate basic ESMValTool example
83-
>
84-
> authors:
85-
> - demora_lee
86-
> - mueller_benjamin
87-
> - swaminathan_ranjini
88-
>
89-
> maintainer:
90-
> - demora_lee
91-
>
92-
> references:
93-
> - demora2018gmd
94-
> # Some plots also appear in ESMValTool paper 2.
95-
>
96-
> projects:
97-
> - ukesm
98-
>
99-
> datasets:
100-
> - {dataset: HadGEM2-ES, project: CMIP5, exp: historical, mip: Omon, ensemble: r1i1p1, start_year: 1859, end_year: 2005}
101-
>
102-
> preprocessors:
103-
> prep_timeseries: # For 0D fields
104-
> annual_statistics:
105-
> operator: mean
106-
>
107-
> diagnostics:
108-
> # --------------------------------------------------
109-
> # Time series diagnostics
110-
> # --------------------------------------------------
111-
> diag_timeseries_temperature:
112-
> description: simple_time_series
113-
> variables:
114-
> timeseries_variable:
115-
> short_name: thetaoga
116-
> preprocessor: prep_timeseries
117-
> scripts:
118-
> timeseries_diag:
119-
> script: ocean/diagnostic_timeseries.py
76+
> 1 # ESMValTool
77+
> 2 # recipe_example.yml
78+
> 3 ---
79+
> 4 documentation:
80+
> 5 description: Demonstrate basic ESMValTool example
81+
> 6
82+
> 7 authors:
83+
> 8 - demora_lee
84+
> 9 - mueller_benjamin
85+
>10 - swaminathan_ranjini
86+
>11
87+
>12 maintainer:
88+
>13 - demora_lee
89+
>14
90+
>15 references:
91+
>16 - demora2018gmd
92+
>17 # Some plots also appear in ESMValTool paper 2.
93+
>18
94+
>19 projects:
95+
>20 - ukesm
96+
>21
97+
>22 datasets:
98+
>23 - {dataset: HadGEM2-ES, project: CMIP5, exp: historical, mip: Omon, ensemble: r1i1p1, start_year: 1859, end_year: 2005}
99+
>24
100+
>25 preprocessors:
101+
>26 prep_timeseries: # For 0D fields
102+
>27 annual_statistics:
103+
>28 operator: mean
104+
>29
105+
>30 diagnostics:
106+
>31 # --------------------------------------------------
107+
>32 # Time series diagnostics
108+
>33 # --------------------------------------------------
109+
>34 diag_timeseries_temperature:
110+
>35 description: simple_time_series
111+
>36 variables:
112+
>37 timeseries_variable:
113+
>38 short_name: thetaoga
114+
>39 preprocessor: prep_timeseries
115+
>40 scripts:
116+
>41 timeseries_diag:
117+
>42 script: ocean/diagnostic_timeseries.py
120118
>~~~
121119
{: .solution}
122120
121+
123122
> ## Explore the recipe
124123
> Use the command and investigate the sample recipe.
125124
> ~~~
@@ -245,21 +244,26 @@ Each time you run the ESMValTool, it will produce a new output directory within
245244
246245
## Common issues & tips
247246
248-
### Esmvaltool not found
249-
Can you run the command “esmvaltool -h”. If no, then it’s possible that the conda environment isn’t activated. Please return to the installation section, epside [2] LINK.
247+
> ## Esmvaltool not found
248+
> Can you run the command “esmvaltool -h”. If no, then it’s possible that the conda environment isn’t activated. Please return to the installation section, episode #2 LINK.
249+
{: .solution}
250250
251-
### ESMValTool can’t locate the data
252-
The error message is “esmvalcore._recipe_checks.RecipeError: Missing data”
253-
Which computing machine are you using? Does your user-config.yml file reflect your machine's settings? Is the dataset’s name in the correct order?
251+
> ## ESMValTool can’t locate the data. The error message is “esmvalcore._recipe_checks.RecipeError: Missing data”
252+
> Which computing machine are you using? Does your user-config.yml file reflect your machine's settings? Is the dataset’s name in the correct order?
253+
{: .solution}
254254
255-
### Diagnostic path problems
256-
The directory path to your diagnostics code is set relative to the esmvaltool/diag_scripts subdirectory. Is the code placed in this subdirectory? Is it spelled correctly?
255+
> ## Diagnostic path problems
256+
> The directory path to your diagnostics code is set relative to the esmvaltool/diag_scripts subdirectory. Is the code placed in this subdirectory? Is it spelled correctly?
257+
{: .solution}
257258
258-
### FX files not found.
259+
> ## FX files not found
260+
>
261+
{: .solution}
259262
260-
### The preprocessor works but the diagnostic fails:
261-
If your preprocessor works fine but your diagnostic script fails, congratulations! A failed diagnostic means that you won’t need to re-run the preprocessor. In your “run/main_log.txt” run output, you should see a line that reads: “To re-run this diagnostic script, run:”, followed by a line with a command that will allow you to re-run your diagnostic script only. Append this line with the “-i” option after the python script you call to re-run your diagnostic.
263+
> ## The preprocessor works but the diagnostic fails
264+
> If your preprocessor works fine but your diagnostic script fails, congratulations! A failed diagnostic means that you won’t need to re-run the preprocessor. In your “run/main_log.txt” run output, you should see a line that reads: “To re-run this diagnostic script, run:”, followed by a line with a command that will allow you to re-run your diagnostic script only. Append this line with the “-i” option after the python script you call to re-run your diagnostic.
265+
{: .solution}
262266
263-
### Your recipe’s name/project/reference isn’t recognised by ESMValTool.
264-
Error message is “ValueError: Tag 'NAME' does not exist in section 'authors' of path/esmvaltool/config-references.yml
265-
Most likely, you added your own name to the recipe in the description section, but didn’t add it to the esmvaltool/config-references.yml file, where the names are linked to an email address, institute, and ORCID Identity.
267+
> ## Your recipe’s name/project/reference isn’t recognised by ESMValTool. Error message is “ValueError: Tag 'NAME' does not exist in section 'authors' of path/esmvaltool/config-references.yml”
268+
> Most likely, you added your own name to the recipe in the description section, but didn’t add it to the esmvaltool/config-references.yml file, where the names are linked to an email address, institute, and ORCID Identity.
269+
{: .solution}

0 commit comments

Comments
 (0)