ESCOMP / POP2-CESM

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

dt_count is being set to the correct value for the wrong reasons #28

Open mnlevy1981 opened 4 years ago

mnlevy1981 commented 4 years ago

Description of the issue:

While putting together #27, I was surprised that

<dt_count ocn_grid="gx1v7"  ocn_transient="ssp585ext">48</dt_count>

Took precendence over

<dt_count ocn_ncpl="24" time_mix="robert"  ocn_grid="gx1v7">24</dt_count>

In a run where OCN_NCPL=24 and time_mix_opt = 'robert'. Adding a debug print statement to build-namelist, I realized that time_mix isn't robert, it's 'robert' (with the single quotes); changing to

<dt_count ocn_ncpl="24" time_mix="'robert'"  ocn_grid="gx1v7">24</dt_count>

Produces the expected (though undesired) behavior that 3 matches > 2 matches so dt_count=24. We were getting the correct dt_count in out-of-the-box simulations because

<dt_count ocn_grid="gx1v7"  > 24</dt_count>

I was confused about how this hasn't been noticed with

<dt_count ocn_ncpl="12" time_mix="avg_mix" ocn_grid="gx1v7">23</dt_count>

but apparently we don't test with this option because avg_mix is not a valid value for time_mix_opt (perhaps we should have a testcase for gx1v7 where we set time_mix_opt = "avgfit"?)

Anyway, I think the proper fixes are

  1. Remove the quotes around 'robert' (or 'avgfit') in build-namelist (rather than adding single quotes to namelist defaults, which I just did as a quick / dirty check)
  2. change avg_mix -> avgfit in dt_count definition attributes

And possibly add a leapfrog test to make sure dt_count=23?

Version:

Machine/Environment Description:

I was working on cheyenne when this cropped up

Any xml/namelist changes or SourceMods:

Nope