Skip to content

Commit f2355da

Browse files
authored
Merge pull request #420 from ESMValGroup/update_epsiode_09
Update episode 9 "CMORization" for v2.14.0
2 parents 7049c85 + 57bec4e commit f2355da

1 file changed

Lines changed: 34 additions & 30 deletions

File tree

_episodes/09-cmorization.md

Lines changed: 34 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "CMORization: adding new datasets to ESMValTool"
33
teaching: 15
44
exercises: 45
5-
compatibility: ESMValTool v2.13.0
5+
compatibility: ESMValTool v2.14.0
66

77
questions:
88
- "CMORization: what is it and why do we need it?"
@@ -68,8 +68,8 @@ that is important for calculating components of the global carbon cycle.
6868
See the next section on how to obtain data.
6969

7070
As in the previous episode
71-
([Development and Contribution episode]({{ page.root }}{% link
72-
_episodes/07-development-setup.md %})),
71+
["Development and Contribution"]({{ page.root }}{% link
72+
_episodes/07-development-setup.md %}),
7373
we will be using the development installation of ESMValTool.
7474

7575

@@ -123,28 +123,17 @@ run the existing one. There is a specific command available in the ESMValTool to
123123
run the CMORizer scripts:
124124

125125
```bash
126-
esmvaltool data format --config_dir <directory of config-user.yml> <dataset-name>
126+
esmvaltool data format --original-data-dir </path/to/original/data> <dataset-name>
127127
```
128128

129-
The options `--start` and `--end` can be added to command above to restrict the
129+
This will look for the original data in the `original-data-dir` folder and store the
130+
formatted data in the the output_dir path given in the configuration file. If
131+
`original-data-dir` is not specified ESMValTool looks for the data in the current directory. The
132+
options `--start` and `--end` can be added to the command above to restrict the
130133
formatting of raw data to a time range. They will be ignored if a specific
131134
dataset does not support this option (i.e. because all the data is provided as a single file).
132-
Valid formats are `YYYY`, `YYYYMM`, `YYYYMMDD`. The same way is also applicable for
133-
the option `esmvaltool data download`.
134-
135-
The ``config-user.yml`` is the file in which we define the different data
136-
paths, see the episode on [Configuration]({{ page.root }}{% link _episodes/03-configuration.md %}).
137-
In the ``rootpath`` of your ``config-user.yml``, make sure to add the right
138-
directory for "RAWOBS" data in which you downloaded the FLUXCOM dataset:
139-
140-
```yaml
141-
rootpath:
142-
RAWOBS: ~/data/RAWOBS
143-
```
144-
145-
This enables ESMValTool to find the raw observational datasets stored in the
146-
"RAWOBS" folder. The ``dataset-name`` needs to be identical to the folder
147-
name that was created to store the raw observation data files, i.e.
135+
Valid formats are `YYYY`, `YYYYMM`, `YYYYMMDD`. The ``dataset-name`` needs to be identical to the
136+
folder name that was created to store the raw observation data files, i.e.
148137
``RAWOBS/TierX/dataset-name``. In our case this would be "FLUXCOM".
149138

150139
If everything is okay, the output should look something like this:
@@ -207,8 +196,20 @@ called `~/data/OBS/Tier3/FLUXCOM` and make sure the path to ``OBS`` is set
207196
correctly in our config-user file:
208197

209198
```yaml
210-
rootpath:
211-
OBS: ~/data/OBS
199+
OBS6:
200+
data:
201+
dkrz:
202+
type: esmvalcore.io.local.LocalDataSource
203+
rootpath: ~/data/OBS
204+
dirname_template: "Tier{tier}/{dataset}"
205+
filename_template: "{project}_{dataset}_{type}_{version}_{mip}_{short_name}[_.]*nc"
206+
OBS:
207+
data:
208+
dkrz:
209+
type: esmvalcore.io.local.LocalDataSource
210+
rootpath: ~/data/OBS
211+
dirname_template: "Tier{tier}/{dataset}"
212+
filename_template: "{project}_{dataset}_{type}_{version}_{mip}_{short_name}[_.]*nc"
212213
```
213214
214215
You can also see the path where ESMValTool stores the reformatting script:
@@ -290,8 +291,7 @@ CMORized, ESMValTool will give a warning or error.
290291
Try to run the example recipe with
291292

292293
```bash
293-
esmvaltool run recipe_check_fluxcom.yml --config_dir <directory of config-user.yml>
294-
--log_level debug
294+
esmvaltool run recipe_check_fluxcom.yml --log_level debug
295295
```
296296

297297
If everything is okay, the recipe should run without problems.
@@ -414,7 +414,7 @@ You can try running the CMORizer at this point, and it should work without
414414
errors. However, it doesn't produce any output yet:
415415

416416
```bash
417-
esmvaltool data format --config_dir <directory of config-user.yml> FLUXCOM
417+
esmvaltool data format --original-data-dir </path/to/original/data> FLUXCOM
418418
```
419419

420420
### 1. Find the input data
@@ -637,15 +637,19 @@ upgrading the CMORizer to newer standards here!). Make sure the path to ``OBS6``
637637
is set correctly in our config-user file:
638638

639639
```yaml
640-
rootpath:
641-
OBS6: ~/data/OBS6
640+
OBS6:
641+
data:
642+
dkrz:
643+
type: esmvalcore.io.local.LocalDataSource
644+
rootpath: ~/data/OBS6
645+
dirname_template: "Tier{tier}/{dataset}"
646+
filename_template: "{project}_{dataset}_{type}_{version}_{mip}_{short_name}[_.]*nc"
642647
```
643648

644649
If we now run the test recipe on our newly 'CMORized' data,
645650

646651
```bash
647-
esmvaltool run recipe_check_fluxcom.yml --config_dir <directory of config-user.yml>
648-
--log_level debug
652+
esmvaltool run recipe_check_fluxcom.yml --log_level debug
649653
```
650654

651655
it should be able to find the correct file, but it does not succeed yet. The ESMValTool CMOR checker

0 commit comments

Comments
 (0)