Skip to content

Commit

Permalink
Set sasu to -999 for sasu spinup so that the default of the full nyr_…
Browse files Browse the repository at this point in the history
…forcing will be set inside of build-namelist, this will thus do a slow-mode SASU spinup
  • Loading branch information
ekluzek committed Jan 27, 2021
1 parent 973816a commit c39e7c8
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions cime_config/SystemTests/sspmatrixcn.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class SSPMATRIXCN(SystemTestsCommon):
stop_n = [5, thrice, thrice ]
cold = [True, False, False ]
iloop = [-999, -999, -999 ]
sasu = [-999, full, -999 ]
sasu = [-999, -999, -999 ]

def __init__(self, case=None):
"""
Expand Down Expand Up @@ -82,8 +82,9 @@ def __init__(self, case=None):

if ( self.spin[n] == "sasu" ):
expect( self.cold[n] == False, "SASU step should NOT be a cold-start" )
expect( self.sasu[n] > 0, "SASU steps must set SASU cycle" )
expect( self.sasu[n] <= self.nyr_forcing, "SASU cycles can't be greater than a full forcing cycle" )
if ( self.sasu[n] != -999 ):
expect( self.sasu[n] > 0, "SASU steps must set SASU cycle" )
expect( self.sasu[n] <= self.nyr_forcing, "SASU cycles can't be greater than a full forcing cycle" )

expect( yend-ystart+1 == self.nyr_forcing, "Number of years run over MUST correspond to nyr_forcing" )
self._testname = "SSPMATRIX"
Expand Down Expand Up @@ -133,7 +134,8 @@ def append_user_nl(self, caseroot, n=0):
# For matrix spinup steps, set the matrix spinup and other variables associated with it
if ( self.spin[n] == "sasu" ):
contents_to_append = contents_to_append + ", nyr_forcing = "+str(self.nyr_forcing)
contents_to_append = contents_to_append + ", nyr_sasu = " + str(self.sasu[n])
if ( self.sasu[n] != -999 ):
contents_to_append = contents_to_append + ", nyr_sasu = " + str(self.sasu[n])
if ( self.iloop[n] != -999 ):
contents_to_append = contents_to_append + ", iloop_avg = " + str(self.iloop[n])

Expand Down Expand Up @@ -287,7 +289,8 @@ def test_logger( self ):
self.ssp.__logger__(n)
if ( self.ssp.spin[n] == "sasu" ):
logger.info( " SASU spinup is .true." )
logger.info( " nyr_sasu = {}".format(self.ssp.sasu[n]) )
if ( self.ssp.sasu[n] != -999 ):
logger.info( " nyr_sasu = {}".format(self.ssp.sasu[n]) )
if ( self.ssp.iloop[n] != -999 ):
logger.info( " iloop_avg = {}".format(self.ssp.iloop[n]) )

Expand Down

0 comments on commit c39e7c8

Please sign in to comment.