Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

cesm3_0_beta05 MOM buildnml failure; no default value set for DO_GEOTHERMAL?

raeder

Member
What version of the code are you using?
- CESM staff members will mainly provide answers for supported model versions, as outlined in the CESM support policy, and can only provide limited help for versions that are no longer supported. You may ask questions about unsupported versions, but may need to rely on community answers.
- For CESM2.1.2 onwards run the script ./describe_version from the top level of your CESM clone to find the version
- From older model versions, provide the output from running the following commands from the top level of your CESM clone
> git describe
> ./manage_externals/checkout_externals --status --verbose

cesm3_0_beta05-1-g8e7888c in
/glade/work/raeder/Models/cesm3_0_beta05


Have you made any changes to files in the source tree?
- Describe any changes (code, xml files, etc.)
I installed and then removed a DART_interface (developed using POP as an example), which made and used a components/dart directory.
I modified config_archive.xml files; I haven't reached the point of trying to use them yet.

Describe every step you took leading up to the problem:
On derecho:
Downloaded CESM from ESCOMP and checked out the cesm3_0_beta05 tag
Ran git-fleximod.
$ setenv cesmroot /glade/work/raeder/Models/cesm3_0_beta05
$ setenv CIMEROOT /glade/work/raeder/Models/cesm3_0_beta05/cime
$ /glade/work/raeder/Models/cesm3_0_beta05/cime/scripts/create_newcase
--case /glade/work/raeder/Exp/St_MOM_1inst
--machine derecho
--res f19_g17_r05
--project P86850054
--queue main
--walltime 0:10
--pecount 128x1
--ninst 1
-d
--compset G_JRA_RYF
--run-unsupported # This was left over from previous attempts with other compsets. Could it be a problem?

This appeared to work, and it instructed me to run case.setup:
2025-03-17 11:52:25: case.setup starting
---------------------------------------------------
2025-03-17 11:52:27: case.setup success

When I tried to build the case:
2025-03-17 11:53:30: case.build starting
---------------------------------------------------
2025-03-17 11:53:35: case.build error
'DO_GEOTHERMAL


Describe your problem or question:
I've tracked the problem about as far as I can, and am hoping someone can provide context and maybe point to a "user error".

DO_GEOTHERMAL is successfully read from MOM_input.json in MOM's buildnml:prep_input:
'DO_GEOTHERMAL': {'description': '"[Boolean] default = FalsenIf true, apply geothermal heating."n', 'datatype': 'logical', 'units': 'Boolean', 'value': {'$OCN_GRID == "tx2_3v2"': True, '$OCN_GRID == "tx0.25v1"': True}},
But the 'value' is 'None' because the grid I'm trying to use is not one of the two listed,
and apparently no default is set to handle that case, despite what 'description' says.
So DO_GEOTHERMAL is not written to the MOM_input namelist and is not available to fill in $DO_GEOTHERMAL variables,
which happens during the recursive processing of namelist entries. That's when the actual failure happens.

When I add DO_GEOTHERMAL to a user_nl_mom file in my CASEROOT, then the build proceeds to the next variable which has value "None".
There are up to several hundred of these, so I'm guessing that there's some sort of missing initialization procedure,
to give these variables default values in a place where they can be found when needed.
 

altuntas

Alper Altuntas
Moderator
Staff member
gx1v7 is not a supported MOM6-CESM grid. I recommend using our standard grid, tx2_3v2. If you must use gx1v7, you may try copying the MOM_input file from a tx2_3v2 run into the SourceMods/src.mom directory and adjust all grid-specific runtime parameters accordingly, which is a non-trivial task.
 

raeder

Member
gx1v7 is not a supported MOM6-CESM grid. I recommend using our standard grid, tx2_3v2. If you must use gx1v7, you may try copying the MOM_input file from a tx2_3v2 run into the SourceMods/src.mom directory and adjust all grid-specific runtime parameters accordingly, which is a non-trivial task.
@altuntas thanks for that guidance!
I was counting on create_newcase or case.build to tell me if I had chosen invalid resolutions,
but I guess it can't do that yet in this tag.
I looked at all of the supported grids and chose T62_t232 to go with compset G_JRA_RYF.
They line up like this:
# 2000_DATM%JRA-RYF9091_SLND_CICE_MOM6_DROF%JRA-RYF9091_SGLC_SWAV
# a%T62_ l%T62_oi%tx2_3v2_r%null_ g%null_w%null_z%null_m%tx2_3v2
create_newcase seemed happy (once I added --run-unsupported, which surprized me), and so did case.setup.
case.build now doesn't have a problem with DO_GEOTHERMAL , but it ended with
ERROR: assume that rof_cpl_time is always greater than or equal to ocn_cpl_time
Is there another setup step I should have done?
Or is there a manual fix I can do now?
Thanks again,
Kevin
 

altuntas

Alper Altuntas
Moderator
Staff member
While T62_t232 is a supported grid and G_JRA_RYF is a supported compset, they are not recommended to be used together. This is because T62 corresponds to an older (CORE2) DATM grid. Instead, you should use TL319_t232 (the JRA DATM grid) with the G_JRA_RYF compset. This incompatibility is why CIME is prompting you to use the --run-unsupported flag.

Regarding the g17 grid, I am in the process of updating the necessary configurations in ccs_config to notify users that it is not a valid MOM6 grid. Thanks for bringing this to our attention!

As for the ocn_cpl_time error, have you modified any of the coupling timesteps for any component? Could you also share the values of your OCN_NCPL and ROF_NCPL xml variables?

Btw, you'll find a table listing supported and compatible CESM-MOM6 compsets and grids in the following wiki page:
 

raeder

Member
I tried to build a case with TL319_t232 and G_JRA_RYF, but got the same rof_cpl_time error.
I didn't change any coupling times.
OCN_NCPL: 24
ROF_NCPL: 48

I'm guessing the 48 comes from the choice of compset and
components/cmeps/cime_config/config_component_cesm.xml:
<entry id="ROF_NCPL">
<type>integer</type>
<default_value>8</default_value>
<values match="last">
<value compset="_DATM.*_MOM6.*_DROF" >[B]$ATM_NCPL[/B]</value>

In Buildconf/cplconf/nuopc.runconfig I found
atm_cpl_dt = 1800
glc_cpl_dt = 21600
ice_cpl_dt = 1800
lnd_cpl_dt = 1800
ocn_cpl_dt = 3600
restart_n = 6
restart_option = nhours
rof_cpl_dt = 1800
which seem consistent with the x_NCPL.

Thanks for the table of compatible compsets and grids!
And thanks for providing the silver lining for my wandering in the wilderness; that others will find the answers quicker!
 

raeder

Member
I changed the ATM_NCPL to OCN_NCPL in that xml ROF 'compset' line,
to make it consistent with components/cmeps/cime_config/runseq/runseq_general.py:
if rof_cpl_time < ocn_cpl_time:
expect(False, "assume that rof_cpl_time is always greater than or equal to ocn_cpl_time")
The model built successfully, so this looks like a solution, if not the optimal solution.
 
Top