Skip to content

Commit a44e986

Browse files
authored
Merge pull request #306 from CABLE-LSM/305-Explain-how-to-specify-logical-namelist-options-in-the-configyaml-file
Booleans in patch and science_configurations in config.yaml
2 parents d1d6b57 + f599120 commit a44e986

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

docs/user_guide/config_options.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,7 @@ realisations:
414414

415415
: **Default:** unset, _optional key_. :octicons-dash-24: Branch-specific namelist settings for `cable.nml`. Settings specified in `patch` get "patched" to the base namelist settings used for both branches. Any namelist settings specified here will overwrite settings defined in the default namelist file and in the science configurations. This means these settings will be set as stipulated in the `patch` for this branch for all science configurations run by `benchcab`.
416416
: The `patch` key must be a dictionary-like data structure that is compliant with the [`f90nml`][f90nml-github] python package.
417+
: To specify a boolean namelist option, one needs to use the Python booleans, True and False, **not the Fortran booleans**
417418

418419
```yaml
419420
realisations:
@@ -424,10 +425,12 @@ realisations:
424425
cable:
425426
cable_user:
426427
FWSOIL_SWITCH: "Lai and Ktaul 2000"
428+
litter: True # (2)
427429
```
428430

429431
1. Sets FWSOIL_SWITCH to "Lai and Ktaul 2000" for all science configurations for this branch
430-
432+
2. The Python boolean will be translated to a Fortran boolean when writing to the namelist file
433+
431434
### [patch_remove](#patch_remove)
432435

433436
: **Default:** unset, _optional key. :octicons-dash-24: Specifies branch-specific namelist settings to be removed from the `cable.nml` namelist settings. When the `patch_remove` key is specified, the specified namelists are removed from all namelist files for this branch for all science configurations run by `benchcab`. When specifying a namelist parameter in `patch_remove`, the value of the namelist parameter is ignored.
@@ -449,14 +452,16 @@ realisations:
449452
## science_configurations
450453

451454
: **Default:** unset, _optional key_. :octicons-dash-24: User defined science configurations. Science configurations that are specified here will replace [the default science configurations](default_science_configurations.md). In the output filenames, each configuration is identified with S<N\> where N is an integer starting from 0 for the first listed configuration and increasing by 1 for each subsequent configuration.
455+
: To specify a boolean namelist option, one needs to use the Python booleans, True and False, **not the Fortran booleans**
452456

453457
```yaml
454458
science_configurations: [
455459
{ # S0 configuration
456460
cable: {
457461
cable_user: {
458462
GS_SWITCH: "medlyn",
459-
FWSOIL_SWITCH: "Haverd2013"
463+
FWSOIL_SWITCH: "Haverd2013",
464+
litter: True # (1)
460465
}
461466
}
462467
},
@@ -471,6 +476,8 @@ science_configurations: [
471476
]
472477
```
473478

479+
1. The Python boolean will be translated to a Fortran boolean when writing the namelist file.
480+
474481
## codecov
475482

476483
: **Default:** False, _optional key. :octicons-dash-24: Specifies whether to build `benchcab` with code-coverage flags, which can then be used in post-run analysis (`benchcab gen_codecov`).

0 commit comments

Comments
 (0)