ESCOMP / POP2-CESM

Parallel Ocean Program (POP2) in CESM
http://www.cesm.ucar.edu/models/cesm2/ocean/
4 stars 24 forks source link

Bad XML entry in namelist_defaults_pop.xml #16

Open mnlevy1981 opened 4 years ago

mnlevy1981 commented 4 years ago

Description of the issue:

The following block of code in bld/namelist_files/namelist_defaults_pop.xml doesn't behave as expected:

<sfwf_weak_restore ocn_grid="gx1v7"  >0.0115</sfwf_weak_restore>
<sfwf_weak_restore ocn_grid="gx1v7"  datm_mode="CORE_IAF_JRA">0.046</sfwf_weak_restore>
<sfwf_weak_restore ocn_grid="gx1v7"  ocn_onedim="TRUE">0.0</sfwf_weak_restore>

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:

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