Bad XML entry in namelist_defaults_pop.xml
- Dominant language
- Fortran
- Stars
- 8
- Forks
- 27
- PR merge metrics
- No merged PRs in 30d
Description
### Description of the issue:
The following block of code in `bld/namelist_files/namelist_defaults_pop.xml` doesn't behave as expected:
```
0.0115
0.046
0.0
```
`build-namelist` looks at all entries where every attribute matches, and then takes the value corresponding the entry with the most matches. Unlike in #15, if multiple entries match the same number of attributes, the namelist generation tool defaults to the FIRST item in the list. So in this case, if you run with the `gx1v7` grid, `CORE_IAF_JRA` forcing, and POP in 1D mode, `sfwf_weak_restore = 0.046`. We want `sfwf_weak_restore = 0.0` whenever running in 1D mode, regardless of forcing... so the last two lines in the block above should be swapped.
### Version:
- CESM: 2.1 and the 2.2 development branches
- POP2: `cesm2_1_x_rel` and `master`
Note that JRA forcing is not available in CESM 2.0, so that version of the code is not affected.
### Machine/Environment Description:
Discovered on cheyenne during a code review with @klindsay28 but problem should be evident on any machine
### Any xml/namelist changes or SourceMods:
None
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.