ESCOMP / ESCOMP/POP2-CESM

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

Open
#28 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Fortran
Stars
8
Forks
27
PR merge metrics
No merged PRs in 30d

Description

### Description of the issue:

While putting together #27, I was surprised that

```
48
```

Took precendence over

```
24
```

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

```
24
```

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

```
24
```

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

```
23
```

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)
1. change `avg_mix` -> `avgfit` in `dt_count` definition attributes

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

### Version:
- CESM: 2.1.x (and probably 2.2, though I haven't verified)
- POP2: `cesm2_1_x_rel` (and probably `master`, though I haven't verified)

### Machine/Environment Description:

I was working on `cheyenne` when this cropped up

### Any xml/namelist changes or SourceMods:

Nope

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.