Skip to content

Commit

Permalink
(#305) - Explain how to specify booleans in config for cable namelist
Browse files Browse the repository at this point in the history
  • Loading branch information
C. Carouge committed Aug 14, 2024
1 parent ab1d22d commit af02301
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions docs/user_guide/config_options.md
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@ realisations:

: **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`.
: The `patch` key must be a dictionary-like data structure that is compliant with the [`f90nml`][f90nml-github] python package.
: To specify a boolean namelist option, one needs to use the Python booleans, True and False, **not the Fortran booleans**

```yaml
realisations:
Expand All @@ -424,10 +425,12 @@ realisations:
cable:
cable_user:
FWSOIL_SWITCH: "Lai and Ktaul 2000"
litter: True # (2)
```

1. Sets FWSOIL_SWITCH to "Lai and Ktaul 2000" for all science configurations for this branch

2. The Python boolean will be translated to a Fortran boolean when writing to the namelist file

### [patch_remove](#patch_remove)

: **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.
Expand All @@ -449,14 +452,16 @@ realisations:
## science_configurations

: **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.
: To specify a boolean namelist option, one needs to use the Python booleans, True and False, **not the Fortran booleans**

```yaml
science_configurations: [
{ # S0 configuration
cable: {
cable_user: {
GS_SWITCH: "medlyn",
FWSOIL_SWITCH: "Haverd2013"
FWSOIL_SWITCH: "Haverd2013",
litter: True # (1)
}
}
},
Expand All @@ -470,6 +475,7 @@ science_configurations: [
}
]
```
1. The Python boolean will be translated to a Fortran boolean when writing the namelist file.

## codecov

Expand Down

0 comments on commit af02301

Please sign in to comment.