ESCOMP / ESCOMP/CMEPS

Problem with OCN2WAV_SMAPNAME and WAV2OCN_SMAPNAME in cmeps1.0.19 and following for F compsets if you update cmeps after case created

Open
#508 12 comments 0 reactions 0 assignees View on GitHub
bug CESM only
Dominant language
Fortran
Stars
35
Forks
106
Avg merge
6d 5h
Merged PRs (30d)
4

Description

I found this in a CAM checkout of cam6_4_032 with CMEPS updated to cmeps1.0.20 which is what's being used in cesm3_0_alpha03d. I updated the other submodules to the cesm3_0_alpha03d submodules so everything should be consistent.

The test SMS_D_Ln9.f19_f19_mg17.FWma2000climo.derecho_intel.cam-outfrq9s_waccm_ma_mam4 fails at preview_namelist time in the namelist build of the cmeps namelist as follows, because it's expecting that OCN2WAV_SMAPNAME and WAV2OCN_SMAPNAME will be an XML variable in the case -- and it's not provided for a compset with SWAV.

So I'd expect this to fail with any compset with SWAV. Since, we aren't seeing this problem in cesm3_0_alpha03d testing -- I'm not sure why this shows up here.

```
Calling /glade/derecho/scratch/erik/cam6_4_032/cime/CIME/non_py/src/components/stub_comps_nuopc/sesp/cime_config/buildnml
2024-10-01 15:25:39 cpl
Create namelist for component drv
Calling /glade/derecho/scratch/erik/cam6_4_032/components/cmeps/cime_config/buildnml
Namelist default for variable ocn2wav_smapname refers to unknown XML variable OCN2WAV_SMAPNAME.
Traceback (most recent call last):
File "/glade/derecho/scratch/erik/cam6_4_032/cime/scripts/SMS_D_Ln9.f19_f19_mg17.FWma2000climo.derecho_intel.cam-outfrq9s_waccm_ma_mam4.20241001_150352_n6ytq4/./preview_namelists", line 67, in
_main_func(__doc__)
File "/glade/derecho/scratch/erik/cam6_4_032/cime/scripts/SMS_D_Ln9.f19_f19_mg17.FWma2000climo.derecho_intel.cam-outfrq9s_waccm_ma_mam4.20241001_150352_n6ytq4/./preview_namelists", line 63, in _main_func
case.create_namelists(component=args.component)
File "/glade/derecho/scratch/erik/cam6_4_032/cime/CIME/case/preview_namelists.py", line 90, in create_namelists
import_and_run_sub_or_cmd(
File "/glade/derecho/scratch/erik/cam6_4_032/cime/CIME/utils.py", line 671, in import_and_run_sub_or_cmd
raise e1 from None
File "/glade/derecho/scratch/erik/cam6_4_032/cime/CIME/utils.py", line 667, in import_and_run_sub_or_cmd
run_sub_or_cmd(
File "/glade/derecho/scratch/erik/cam6_4_032/cime/CIME/utils.py", line 712, in run_sub_or_cmd
getattr(mod, subname)(*subargs)
File "/glade/derecho/scratch/erik/cam6_4_032/components/cmeps/cime_config/buildnml", line 694, in buildnml
_create_drv_namelists(case, infile, confdir, nmlgen, files)
File "/glade/derecho/scratch/erik/cam6_4_032/components/cmeps/cime_config/buildnml", line 148, in _create_drv_namelists
nmlgen.init_defaults(infile, config, skip_default_for_groups=["modelio"])
File "/glade/derecho/scratch/erik/cam6_4_032/cime/CIME/nmlgen.py", line 168, in init_defaults
self.add_default(self._definition.get(entry, "id"))
File "/glade/derecho/scratch/erik/cam6_4_032/cime/CIME/nmlgen.py", line 706, in add_default
default = self.get_default(name, allow_none=True)
File "/glade/derecho/scratch/erik/cam6_4_032/cime/CIME/nmlgen.py", line 383, in get_default
default[i] = self.quote_string(scalar)
File "/glade/derecho/scratch/erik/cam6_4_032/cime/CIME/nmlgen.py", line 217, in quote_string
if string == "" or (string[0] not in ('"', "'") or string[0] != string[-1]):
TypeError: 'NoneType' object is not subscriptable
```

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.