Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Booleans in patch and science_configurations in config.yaml #306

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 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 @@ -471,6 +476,8 @@ science_configurations: [
]
```

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

## codecov

: **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`).
Expand Down
Loading