|
2 | 2 | title: "CMORization: adding new datasets to ESMValTool" |
3 | 3 | teaching: 15 |
4 | 4 | exercises: 45 |
5 | | -compatibility: ESMValTool v2.13.0 |
| 5 | +compatibility: ESMValTool v2.14.0 |
6 | 6 |
|
7 | 7 | questions: |
8 | 8 | - "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. |
68 | 68 | See the next section on how to obtain data. |
69 | 69 |
|
70 | 70 | 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 %}), |
73 | 73 | we will be using the development installation of ESMValTool. |
74 | 74 |
|
75 | 75 |
|
@@ -123,28 +123,17 @@ run the existing one. There is a specific command available in the ESMValTool to |
123 | 123 | run the CMORizer scripts: |
124 | 124 |
|
125 | 125 | ```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> |
127 | 127 | ``` |
128 | 128 |
|
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 |
130 | 133 | formatting of raw data to a time range. They will be ignored if a specific |
131 | 134 | 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. |
148 | 137 | ``RAWOBS/TierX/dataset-name``. In our case this would be "FLUXCOM". |
149 | 138 |
|
150 | 139 | 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 |
207 | 196 | correctly in our config-user file: |
208 | 197 |
|
209 | 198 | ```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" |
212 | 213 | ``` |
213 | 214 |
|
214 | 215 | You can also see the path where ESMValTool stores the reformatting script: |
@@ -290,8 +291,7 @@ CMORized, ESMValTool will give a warning or error. |
290 | 291 | Try to run the example recipe with |
291 | 292 |
|
292 | 293 | ```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 |
295 | 295 | ``` |
296 | 296 |
|
297 | 297 | 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 |
414 | 414 | errors. However, it doesn't produce any output yet: |
415 | 415 |
|
416 | 416 | ```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 |
418 | 418 | ``` |
419 | 419 |
|
420 | 420 | ### 1. Find the input data |
@@ -637,15 +637,19 @@ upgrading the CMORizer to newer standards here!). Make sure the path to ``OBS6`` |
637 | 637 | is set correctly in our config-user file: |
638 | 638 |
|
639 | 639 | ```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" |
642 | 647 | ``` |
643 | 648 |
|
644 | 649 | If we now run the test recipe on our newly 'CMORized' data, |
645 | 650 |
|
646 | 651 | ```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 |
649 | 653 | ``` |
650 | 654 |
|
651 | 655 | it should be able to find the correct file, but it does not succeed yet. The ESMValTool CMOR checker |
|
0 commit comments