Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle CLM_ACCELERATED_SPINUP option differently #50

Merged
merged 8 commits into from
Nov 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions cime_config/buildnml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,17 @@ def _create_namelists(case, confdir, inst_string, infile, nmlgen, data_list_path
#----------------------------------------------------
config = {}
config['mosart_mode'] = case.get_value("MOSART_MODE")
config['ignore_warn'] = case.get_value("MOSART_IGNORE_WARNINGS")
config['clm_accel'] = case.get_value("CLM_ACCELERATED_SPINUP")
ignore_msg = "\n (Set MOSART_IGNORE_WARNINGS to TRUE with xmlchange in your case to ignore this message and continue anyway)"
if ( config['clm_accel'] != "off" ):
config['mosart_mode'] = "NULL"
case.set_value( "MOSART_MODE", config['mosart_mode'] )
if ( config['mosart_mode'] != "NULL" ):
message = "CLM_ACCELERATED_SPINUP is not off, but MOSART_MODE is not NULL, " + \
"normally you should switch it off to save computer time"
if ( not config['ignore_warn'] ):
expect(False, message+ignore_msg )
else:
logger.warning( "WARNING::"+message )

config['mosart_flood_mode'] = case.get_value("MOSART_FLOOD_MODE")
config['rof_grid'] = case.get_value("ROF_GRID")
Expand Down
9 changes: 9 additions & 0 deletions cime_config/config_component.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@
<desc>mode for mosart model, NULL means mosart is turned off</desc>
</entry>

<entry id="MOSART_IGNORE_WARNINGS">
<type>logical</type>
<valid_values>TRUE,FALSE</valid_values>
<default_value>FALSE</default_value>
<group>run_component_mosart</group>
<file>env_run.xml</file>
<desc>If warnings in namelist setttings from buildnml should be ignored or not</desc>
</entry>

<entry id="MOSART_FLOOD_MODE">
<type>char</type>
<valid_values>ACTIVE,NULL</valid_values>
Expand Down
4 changes: 2 additions & 2 deletions cime_config/testdefs/testlist_mosart.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@
<option name="comment" >Test with MCT and MOSART off</option>
</options>
</test>
<test name="SMS_Lh3" grid="f10_f10_mg37" compset="I2000Clm51Sp" testmods="mosart/clmAccelSpinup">
<test name="SMS_Lh3" grid="f10_f10_mg37" compset="I2000Clm51Sp" testmods="mosart/clmAccelSpinupIgnoreWarn">
<machines>
<machine name="cheyenne" compiler="gnu" category="mosart"></machine>
</machines>
<options>
<option name="wallclock">00:20:00</option>
<option name="comment" >Test with CLM accelerated spinup, which should turn MOSART off</option>
<option name="comment" >Test with CLM accelerated spinup, but ignore warnigns so it will send a warning but still run</option>
</options>
</test>
<test name="SMS_Lh3" grid="1x1_brazil" compset="I2000Clm50Sp" testmods="mosart/mosartGridNull">
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
./xmlchange CLM_ACCELERATED_SPINUP=on
./xmlchange MOSART_IGNORE_WARNINGS=TRUE
14 changes: 14 additions & 0 deletions docs/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
===============================================================
Tag name: mosart1_0_45
Originator(s): erik
Date: Nov 12, 2021
One-line Summary: Handle CLM_ACCELERATED_SPINUP option differently

Handle CLM_ACCELERATED_SPINUP option differently so it doesn't change
MOSART_MODE, but dies (unless the new xml variable MOSART_IGNORE_WARNINGS
is set to TRUE). Also only output information about decomposition from all
PE's only if running with DEBUG compiler options set.

Fixes #48 -- Remove setting of MOSART_MODE from buildnml
Fixes #49 -- Reduce MOSART output to cesm.log

===============================================================
Tag name: mosart1_0_44
Originator(s): erik
Expand Down
5 changes: 4 additions & 1 deletion src/riverroute/RtmMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,11 @@ subroutine Rtmini(flood_active)
character(len=256):: locfn ! local file name
character(len=16384) :: rList ! list of fields for SM multiply
integer :: unitn ! unit for namelist file
#ifdef NDEBUG
integer,parameter :: dbug = 0 ! 0 = none, 1=normal, 2=much, 3=max
#else
integer,parameter :: dbug = 3 ! 0 = none, 1=normal, 2=much, 3=max
#endif
logical :: lexist ! File exists
character(len= 7) :: runtyp(4) ! run type
integer ,allocatable :: gindex(:) ! global index
Expand Down Expand Up @@ -1409,7 +1413,6 @@ subroutine Rtmrun(rstwr,nlend,rdate)
character(len=256) :: filer ! restart file name
integer :: cnt ! counter for gridcells
integer :: ier ! error code
integer,parameter :: dbug = 1 ! local debug flag

! parameters used in negative runoff partitioning algorithm
real(r8) :: river_volume_minimum ! gridcell area multiplied by average river_depth_minimum [m3]
Expand Down