@@ -22,26 +22,19 @@ keypoints:
2222The `` config-user.yml `` configuration file contains all the global level
2323information needed by ESMValTool to run. This is an [ YAML
2424file] ( https://yaml.org/spec/1.2/spec.html ) . An example configuration file can be
25- found in the root directory of the ESMValTool repository:
26- [ config-user-example.yml] ( https://github.com/ESMValGroup/ESMValTool /blob/master/config-user-example .yml ) .
25+ found in the ESMValCore repository:
26+ [ config-user-example.yml] ( https://github.com/ESMValGroup/ESMValCore /blob/master/esmvalcore/ config-user.yml ) .
2727
28- First, we make a working directory `` esmvaltool_tutorial `` .
29- In a new terminal, run:
28+ You can generate the default configuration file by running:
3029
3130~~~ bash
32- mkdir esmvaltool_tutorial
33- cd esmvaltool_tutorial
31+ esmvaltool config get_config_user
3432~~~
3533
36- Now, we download the configuration file to our working directory. To do that,
37- click on [ this
38- link] ( https://raw.githubusercontent.com/ESMValGroup/ESMValTool/master/config-user-example.yml )
39- to see a raw version of the file, right-click and press `` save as `` , then you
40- can rename it to `` config-user.yml `` and save it into the working directory
41- `` esmvaltool_tutorial `` .
34+ It will save the file to: `` {HOME}/.esmvaltool/config-user.yml `` .
4235
4336Now, let's change our working directory in a terminal window to
44- `` esmvaltool_tutorial `` . Then, we run a text editor called Nano to have a look
37+ `` {HOME}/.esmvaltool `` . Then, we run a text editor called Nano to have a look
4538inside the configuration file:
4639
4740~~~ bash
@@ -50,12 +43,12 @@ inside the configuration file:
5043
5144This file contains the information for:
5245
53- - Rootpath to input data
54- - Directory structure for the data from different projects
55- - Number of tasks that can be run in parallel
46+ - Output settings
5647- Destination directory
5748- Auxiliary data directory
58- - Output settings
49+ - Number of tasks that can be run in parallel
50+ - Rootpath to input data
51+ - Directory structure for the data from different projects
5952
6053> ## Text editor side note
6154>
@@ -67,6 +60,108 @@ This file contains the information for:
6760> and then <kbd >ctrl</kbd > + <kbd >X</kbd > to exit `` nano `` .
6861 {: .callout}
6962
63+ ## Output settings
64+
65+ These settings are used to inform ESMValTool about your preference about
66+ specific actions. You can turn on or off the setting by `` true `` or `` false ``
67+ values. Most of these settings are fairly self-explanatory, ie:
68+
69+ ``` yaml
70+ # Diagnostics create plots? [true]/false
71+ write_plots : true
72+ # Diagnositcs write NetCDF files? [true]/false
73+ write_netcdf : true
74+ # Set the console log level debug, [info], warning, error
75+ log_level : info
76+ # Exit on warning (only for NCL diagnostic scripts)? true/[false]
77+ exit_on_warning : false
78+ # Plot file format? [png]/pdf/ps/eps/epsi
79+ output_file_type : png
80+
81+ ...
82+
83+ # Use netCDF compression true/[false]
84+ compress_netcdf : false
85+ # Save intermediary cubes in the preprocessor true/[false]
86+ save_intermediary_cubes : false
87+ # Remove the preproc dir if all fine
88+ remove_preproc_dir : true
89+
90+ ...
91+
92+ # Path to custom config-developer file, to customise project configurations.
93+ # See config-developer.yml for an example. Set to [null] to use the default
94+ config_developer_file : null
95+ # Get profiling information for diagnostics
96+ # Only available for Python diagnostics
97+ profile_diagnostic : false
98+ ` ` `
99+
100+ ## Destination directory
101+
102+ The destination directory is the rootpath where ESMValTool will store its output folders containing
103+ i.e. figures, data, logs, etc. With every run, ESMValTool automatically generates
104+ a new output folder determined by recipe name, and date and time using
105+ the format: YYYYMMDD_HHMMSS.
106+ This folder contains four further subfolders: ` ` plots` ` , ` ` preproc` ` , ` ` run` ` , ` ` work` ` .
107+
108+ Let's name our destination directory ` ` esmvaltool_output` ` in the working directory:
109+
110+ ` ` ` yaml
111+ output_dir : ./esmvaltool_output
112+ ` ` `
113+
114+ > ## Content of subfolders
115+ >
116+ > - ` ` plots` ` : the location for all plots, split by individual diagnostics and fields.
117+ > - ` ` preproc` ` : this folder contains all the preprocessed data and metadata.yml
118+ interface files. Note that by default this directory will be deleted after
119+ each run because most users will only need the results from the diagnostic scripts.
120+ > - ` ` run` ` : this folder includes all log files, a copy of the recipe,
121+ a summary of the resource usage, and the settings.yml interface files,
122+ resource_usage.txt and temporary files created by the diagnostic scripts.
123+ > - ` ` work` ` : this folder is a place for any diagnostic script results that
124+ are not plots, e.g. files in NetCDF format (depends on the diagnostic script).
125+ >
126+ > We explain more about output in the next
127+ [lesson]({{ page.root }}{% link _episodes/04-recipe.md %})
128+ {: .callout}
129+
130+ ## Auxiliary data directory
131+
132+ The ` ` auxiliary_data_dir` ` setting is the path where any required additional
133+ auxiliary data files are stored. This location allows us to tell the diagnostic
134+ script where to find the files if they can not be downloaded at runtime. This
135+ option should not be used for model or observational datasets, but for data
136+ files (e.g. shape files) used in plotting such as coastline descriptions and so
137+ on.
138+
139+ ` ` ` yaml
140+ auxiliary_data_dir : ~/auxiliary_data
141+ ` ` `
142+
143+ ## Number of parallel tasks
144+
145+ This option enables you to perform parallel processing.
146+ You can choose the number of tasks in parallel as
147+ 1/2/3/4/... or you can set it to ` ` null` ` . That tells
148+ ESMValTool to use the maximum number of available CPUs:
149+
150+ ` ` ` yaml
151+
152+ max_parallel_tasks : null
153+ ` ` `
154+
155+ > ## Set the number of tasks
156+ >
157+ > If you run out of memory, try setting ` ` max_parallel_tasks` ` to 1.
158+ Then, check the amount of memory you need for that by inspecting
159+ the file ` ` run/resource_usage.txt` ` in the output directory.
160+ Using the number there you can increase the number of parallel tasks
161+ again to a reasonable number for the amount of memory available in your system.
162+ {: .callout}
163+
164+
70165## Rootpath to input data
71166
72167ESMValTool uses several categories (in ESMValTool, this is referred to as projects)
@@ -80,17 +175,13 @@ For each category, you can define either one path or several paths as a list.
80175
81176` ` ` yaml
82177rootpath :
83- CMIP3 : [~/cmip3_inputpath1, ~/cmip3_inputpath2]
84178 CMIP5 : [~/cmip5_inputpath1, ~/cmip5_inputpath2]
85- CMIP6 : [~/cmip6_inputpath1, ~/cmip6_inputpath2]
86179 OBS : ~/obs_inputpath
87- OBS6 : ~/obs6_inputpath
88- obs4mips : ~/obs4mips_inputpath
89- ana4mips : ~/ana4mips_inputpath
90- native6 : ~/native6_inputpath
91180 RAWOBS : ~/rawobs_inputpath
92181 default : ~/default_inputpath
182+ CORDEX : ~/default_inputpath
93183` ` `
184+ Site-specific entries for Jasmin, DKRZ and ETHZ are listed at the end of the example configuration file.
94185
95186In this lesson, we will work with data from
96187[CMIP5](https://esgf-node.llnl.gov/projects/cmip5/).
@@ -131,107 +222,12 @@ drs:
131222> [documentation](https://docs.esmvaltool.org/projects/esmvalcore/en/latest/quickstart/find_data.html#cmor-drs).
132223{: .callout}
133224
134- ## Number of parallel tasks
135-
136- This option enables you to perform parallel processing.
137- You can choose the number of tasks in parallel as
138- 1/2/3/4/... or you can set it to ` ` null` ` . That tells
139- ESMValTool to use the maximum number of available CPUs:
140-
141- ` ` ` yaml
142-
143- max_parallel_tasks : null
144- ` ` `
145-
146- > ## Set the number of tasks
147- >
148- > If you run out of memory, try setting ` ` max_parallel_tasks` ` to 1.
149- Then, check the amount of memory you need for that by inspecting
150- the file ` ` run/resource_usage.txt` ` in the output directory.
151- Using the number there you can increase the number of parallel tasks
152- again to a reasonable number for the amount of memory available in your system.
153- {: .callout}
154-
155- ## Destination directory
156-
157- The destination directory is the rootpath where ESMValTool will store its output,
158- i.e. figures, data, logs, etc. With every run, ESMValTool automatically generates
159- a new output folder determined by recipe name, and date and time using
160- the format: YYYYMMDD_HHMMSS.
161- This folder contains four further subfolders: ` ` plots` ` , ` ` preproc` ` , ` ` run` ` , ` ` work` ` .
162-
163- Let's name our destination directory ` ` esmvaltool_output` ` in the working directory:
164-
165- ` ` ` yaml
166- output_dir : ./esmvaltool_output
167- ` ` `
168-
169- > ## Content of subfolders
170- >
171- > - ` ` plots` ` : the location for all plots, split by individual diagnostics and fields.
172- > - ` ` preproc` ` : this folder contains all the preprocessed data and metadata.yml
173- interface files. Note that by default this directory will be deleted after
174- each run because most users will only need the results from the diagnostic scripts.
175- > - ` ` run` ` : this folder includes all log files, a copy of the recipe,
176- a summary of the resource usage, and the settings.yml interface files,
177- resource_usage.txt and temporary files created by the diagnostic scripts.
178- > - ` ` work` ` : this folder is a place for any diagnostic script results that
179- are not plots, e.g. files in NetCDF format (depends on the diagnostic script).
180- >
181- > We explain more about output in the next
182- [lesson]({{ page.root }}{% link _episodes/04-recipe.md %})
183- {: .callout}
184-
185- ## Auxiliary data directory
186-
187- The ` ` auxiliary_data_dir` ` setting is the path where any required additional
188- auxiliary data files are stored. This location allows us to tell the diagnostic
189- script where to find the files if they can not be downloaded at runtime. This
190- option should not be used for model or observational datasets, but for data
191- files (e.g. shape files) used in plotting such as coastline descriptions and so
192- on.
193-
194- ` ` ` yaml
195- auxiliary_data_dir : ~/auxiliary_data
196- ` ` `
197-
198- ## Output settings
199-
200- These settings are used to inform ESMValTool about your preference about
201- specific actions. You can turn on or off the setting by ` ` true` ` or ` ` false` `
202- values. Most of these settings are fairly self-explanatory, ie:
203-
204- ` ` ` yaml
205- # Diagnostics create plots? [true]/false
206- write_plots : true
207- # Diagnositcs write NetCDF files? [true]/false
208- write_netcdf : true
209- # Set the console log level debug, [info], warning, error
210- log_level : info
211- # Exit on warning (only for NCL diagnostic scripts)? true/[false]
212- exit_on_warning : false
213- # Plot file format? [png]/pdf/ps/eps/epsi
214- output_file_type : png
215- # Use netCDF compression true/[false]
216- compress_netcdf : false
217- # Save intermediary cubes in the preprocessor true/[false]
218- save_intermediary_cubes : false
219- # Remove the preproc dir if all fine
220- remove_preproc_dir : true
221- # Path to custom config-developer file, to customise project configurations.
222- # See config-developer.yml for an example. Set to [null] to use the default
223- # config_developer_file: null
224- # Get profiling information for diagnostics
225- # Only available for Python diagnostics
226- profile_diagnostic : false
227- ` ` `
228-
229225> ## Make your own configuration file
230226>
231227> It is possible to have several configuration files with different purposes,
232- > for example: config-user_formalised_runs.yml, config-user_debugging.yml {:
233- > .callout}
234- >
228+ > for example: config-user_formalised_runs.yml, config-user_debugging.yml
229+ {: .callout}
230+
235231> ## Saving preprocessed data
236232>
237233> In the configuration file, which settings are useful to make sure preprocessed
0 commit comments