@@ -22,7 +22,7 @@ keypoints:
2222
2323## The configuration file
2424
25- For the purposes of this tutorial, we will create a directory in our home directory
25+ First, for the purposes of this tutorial, we will create a directory in our home directory
2626called ` esmvaltool_tutorial ` and use that as our working directory. The following steps
2727should do that:
2828
@@ -38,26 +38,28 @@ This is a [YAML file](https://yaml.org/spec/1.2/spec.html).
3838You can get the default configuration file by running:
3939
4040~~~ bash
41- esmvaltool config get_config_user --path= < target_dir >
41+ esmvaltool config get_config_user
4242~~~
43- The default configuration file will be downloaded to the directory specified with
44- the ` --path ` variable. For instance, you can provide the path to your working directory
45- as the ` target_dir ` . If this option is not used, the file will be saved to the default
46- location: ` ~/.esmvaltool/config-user.yml ` , where ` ~ ` is the
43+ The default configuration file will be downloaded to the default location:
44+ ` ~/.config/esmvaltool/config-user.yml ` , where ` ~ ` is the
4745path to your home directory. Note that files and directories starting with a
48- period are "hidden", to see the ` .esmvaltool ` directory in the terminal use
49- ` ls -la ~ ` . Note that if a configuration file by that name already exists in the default
46+ period are "hidden", to see the ` .config ` directory in the terminal use
47+ ` ls -la ~ ` .
48+ With the optional `` --path=<target_dir> `` you could specifiy the directory
49+ in which the configuration file can be saved. For instance, you can provide
50+ the path to your working directory as the ` target_dir ` .
51+ Note, if a configuration file by that name already exists in the default
5052location, the ` get_config_user ` command will not update the file as ESMValTool will not
5153overwrite the file. You will have to move the file first if you want an updated copy of the
52- user configuration file.
54+ default user configuration file.
5355
5456
5557
5658We run a text editor called `` nano `` to have a look inside the configuration file
5759and then modify it if needed:
5860
5961~~~ bash
60- nano ~ /.esmvaltool/config-user.yml
62+ nano ~ /.config/ esmvaltool/config-user.yml
6163~~~
6264
6365Any other editor can be used, e.g.vim.
@@ -120,7 +122,7 @@ using the format: YYYYMMDD_HHMMSS.
120122
121123> ## Set the destination directory
122124>
123- > Let's name our destination directory `` esmvaltool_output `` in the working directory.
125+ > Let's name our destination directory `` esmvaltool_output `` in the current directory.
124126> ESMValTool should write the output to this path, so make sure you have the disk space
125127> to write output to this directory.
126128> How do we set this in the ` config-user.yml ` ?
@@ -172,7 +174,7 @@ rootpath:
172174 default: ~/climate_data
173175` ` `
174176These are typically available in the default configuration file you downloaded, so simply
175- removing the machine specific lines should be sufficient to access input data.
177+ uncommenting the machine specific lines should be sufficient to access input data.
176178
177179> # # Set the correct rootpath
178180>
@@ -236,15 +238,13 @@ quickstart/find_data.html).
236238# # Directory structure for the data from different projects
237239
238240Input data can be from various models, observations and reanalysis data that
239- adhere to the [CF/CMOR standard](https://cmor.llnl.gov/). The ``drs`` setting
240- describes the file structure.
241-
241+ adhere to the [CF/CMOR standard](https://cmor.llnl.gov/).
242242The ``drs`` setting describes the file structure for several projects (e.g.
243243CMIP6, CMIP5, obs4mips, OBS6, OBS) on several key machines
244244(e.g. BADC, CP4CDS, DKRZ, ETHZ, SMHI, BSC). For more
245245information about ``drs``, you can visit the ESMValTool documentation on
246- [Data Reference Syntax (DRS)](https://docs.esmvaltool.org/projects/esmvalcore /
247- en/latest/quickstart/find_data.html#cmor -drs).
246+ [Data Reference Syntax (DRS)](https://docs.esmvaltool.org/projects/ESMValCore /
247+ en/latest/quickstart/find_data.html#explaining -drs-cmip5-or-drs-cmip6 ).
248248
249249> # # Set the correct drs
250250>
@@ -293,24 +293,15 @@ en/latest/quickstart/find_data.html#cmor-drs).
293293
294294> # # Explain the default drs (if working on local machine)
295295>
296- > 1. In the previous exercise, we set the `drs` of CMIP5 data to `default`.
296+ > In the previous exercise, we set the `drs` of CMIP5 data to `default`.
297297> Can you explain why?
298- > 2. Have a look at the directory structure of the `OBS` data.
299- > There is a folder called `Tier1`. What does it mean?
300298>
301299>> # # Solution
302300>>
303- >> 1. `drs: default` is one way to retrieve data from a ROOT directory that has
301+ >> `drs: default` is one way to retrieve data from a ROOT directory that has
304302>> no DRS-like structure. ``default`` indicates that all the files are in a
305303>> folder without any structure.
306304>>
307- >> 2. Observational data are organized in Tiers depending on their level of
308- >> public availability. Therefore the default directory must be structured
309- >> accordingly with sub-directories `TierX` e.g. Tier1, Tier2 or Tier3, even
310- >> when `drs: default`. More details can be found in the
311- [documentation](https://docs.esmvaltool.org/projects/esmvalcore/en/latest/
312- quickstart/find_data.html#observational-data).
313- >>
314305> {: .solution}
315306{: .challenge}
316307
@@ -329,8 +320,8 @@ if you want to feed some additional data (e.g. shape files) to your recipe.
329320> auxiliary_data_dir: ~/auxiliary_data
330321> ```
331322> See more information in ESMValTool
332- [document ](https://docs.esmvaltool.org/projects/ESMValCore/en/latest/quickstart
333- /configure.html?highlight=auxiliary_data#user- configuration-file ).
323+ [documentation ](https://docs.esmvaltool.org/projects/ESMValCore/en/latest/
324+ quickstart /configure.html?highlight=auxiliary_data#top-level- configuration-options ).
334325{: .callout}
335326
336327> # # Number of parallel tasks
@@ -353,12 +344,18 @@ amount of memory available in your system.
353344
354345> # # Make your own configuration file
355346>
356- > It is possible to have several configuration files with different purposes,
357- > for example: config-user_formalised_runs.yml, config-user_debugging.yml.
358- > In this case, you have to pass the path of your own configuration file
359- > as a command-line option when running the ESMValTool.
347+ > Configuration files could live in the user configuration directory, which is
348+ > by default ``~/.config/esmvaltool``. The directory could be also specified
349+ > via the command line argument ``--config_dir``.
360350> We will learn how to do this in the
361351> [next lesson]({{ page.root }}{% link _episodes/04-recipe.md %}).
352+ >
353+ > It is possible to have several configuration files with different purposes,
354+ > for example: config-user_formalised_runs.yml, config-user_debugging.yml.
355+ > In this case, ESMValTool searches for all YAML files within each of the
356+ > configuration directories and merges them together. How this is done is
357+ > exlained [here](https://docs.esmvaltool.org/projects/ESMValCore/en/latest/
358+ > quickstart/configure.html#yaml-files).
362359{: .callout}
363360
364361{% include links.md %}
0 commit comments