@@ -148,7 +148,7 @@ scoped name, which allows `atmchange` to uniquely identify the XML node to modif
148
148
$ ./atmquery homme::number_of_subcycles
149
149
namelist_defaults::atmosphere_processes::homme::number_of_subcycles: 1
150
150
$ ./atmchange number_of_subcycles=10
151
- ERROR: number_of_subcycles is ambiguous (use --all to change all matches), matches :
151
+ ERROR: internal_diagnostics_level is ambiguous. Use ANY in the node path to allow multiple matches. Matches :
152
152
namelist_defaults::atmosphere_processes::number_of_subcycles
153
153
namelist_defaults::atmosphere_processes::sc_import::number_of_subcycles
154
154
namelist_defaults::atmosphere_processes::homme::number_of_subcycles
@@ -157,6 +157,7 @@ ERROR: number_of_subcycles is ambiguous (use --all to change all matches), match
157
157
namelist_defaults::atmosphere_processes::physics::mac_aero_mic::tms::number_of_subcycles
158
158
namelist_defaults::atmosphere_processes::physics::mac_aero_mic::shoc::number_of_subcycles
159
159
namelist_defaults::atmosphere_processes::physics::mac_aero_mic::cldFraction::number_of_subcycles
160
+ namelist_defaults::atmosphere_processes::physics::mac_aero_mic::spa::internal_diagnostics_level
160
161
namelist_defaults::atmosphere_processes::physics::mac_aero_mic::p3::number_of_subcycles
161
162
namelist_defaults::atmosphere_processes::physics::rrtmgp::number_of_subcycles
162
163
namelist_defaults::atmosphere_processes::sc_export::number_of_subcycles
@@ -167,7 +168,7 @@ $ ./atmquery homme::number_of_subcycles
167
168
```
168
169
169
170
In some cases, the user may be interested in changing _ all_ nodes with a given name. In that case,
170
- the ` --all ` flag can be used :
171
+ you can use 'ANY' as a node name :
171
172
172
173
``` shell
173
174
$ ./atmquery --grep number_of_subcycles
@@ -183,7 +184,7 @@ $ ./atmquery --grep number_of_subcycles
183
184
p3::number_of_subcycles: 1
184
185
rrtmgp::number_of_subcycles: 1
185
186
sc_export::number_of_subcycles: 1
186
- $ ./atmchange --all number_of_subcycles=3
187
+ $ ./atmchange ANY:: number_of_subcycles=3
187
188
Regenerating /path/to/namelist_scream.xml. Manual edits will be lost.
188
189
$ ./atmquery --grep number_of_subcycles
189
190
atmosphere_processes::number_of_subcycles: 3
@@ -199,6 +200,24 @@ $ ./atmquery --grep number_of_subcycles
199
200
rrtmgp::number_of_subcycles: 3
200
201
sc_export::number_of_subcycles: 3
201
202
```
203
+ In addition, "ANY" can be used in a "scoped" string, to limit the set of matches:
204
+ ``` shell
205
+ $ ./atmchange mac_aero_mic::ANY::number_of_subcycles=1
206
+ Regenerating /path/to/namelist_scream.xml. Manual edits will be lost.
207
+ $ ./atmquery --grep number_of_subcycles
208
+ atmosphere_processes::number_of_subcycles: 3
209
+ sc_import::number_of_subcycles: 3
210
+ homme::number_of_subcycles: 3
211
+ physics::number_of_subcycles: 3
212
+ mac_aero_mic::number_of_subcycles: 1
213
+ tms::number_of_subcycles: 1
214
+ shoc::number_of_subcycles: 1
215
+ cldFraction::number_of_subcycles: 1
216
+ spa::number_of_subcycles: 1
217
+ p3::number_of_subcycles: 1
218
+ rrtmgp::number_of_subcycles: 3
219
+ sc_export::number_of_subcycles: 3
220
+ ```
202
221
203
222
Since the XML file stores constraints on the parameter value (like its type or valid values), attempting to use the
204
223
wrong type will cause an error:
0 commit comments