Main menu

Navigation

CAM_CONFIG_OPTS='-carma cirrus'

2 posts / 0 new
Last post
Jamison.Smith@...
CAM_CONFIG_OPTS='-carma cirrus'

Good morning, Forum.

I am new to CESM. I am working with CESM2.1.1. I would like to use the option of sectional microphysics for ice clouds. I make this change via the xmlchange script that resides within cime/scripts.

./xmlchange --append CAM_CONFIG_OPTS="-carma cirrus"

Another important change I have made is setting the DEBUG option.

./xmlchange DEBUG=TRUE

I append the details of creating the newcase and building at the end of this message.

Initially, the code will call endrun because the Morrison-Gettelman (MG) microphysics and the Community Aerosol and Radiation Model for Atmospheres (CARMA) are both trying to calculate tendencies for ice mass mixing ratio. I can solve that problem by writing the MG tendencies as 0.0_r8 and commenting the call to endrun.

The second error occurs when MG microphysics see an insiginifcant ice mass mixing ratio and writes a bad value to mu to force a floating point exception (FPE). I can solve that problem by using the definition of qsmall from micro_mg_utils to prevent CARMA from trying to use a negative integer within the gamma function and producing an FPE.

Here, I am stuck. A relevant excerpt from the cesm.log file shows:

24: ERROR: shr_assert_in_domain: state%t has invalid value   -184402209102479.   

24:  at location:            1           5

24: Expected value to be greater than   0.000000000000000E+000

24: ERROR: Invalid value produced in physics_state by package micro_mg.

Has anyone had success in running CARMA with CESM2?

Thank you.

 

Appended details

./create_newcase --case OneCarmaCirrus --compset F2000climo --res f09_f09_mg17

./xmlchange --append CAM_CONFIG_OPTS="-carma cirrus"

./xmlchange JOB_WALLCLOCK_TIME=0:30:00

./xmlchange DEBUG=TRUE

./xmlchange STOP_N=2

./xmlchange STOP_OPTION=nsteps

./case.setup

./preview_run

 

vi user_nl_cam

 

empty_htapes = .true.

avgflag_pertape = 'I'

nhtfrq = 1

fincl1 = 'PS', 'TS', 'PBLH', 'PRECT', 'T', 'Q', 'CLDLIQ', 'CLDICE'

 

./preview_namelists

 

 

qcmd -l select=1:ncpus=36:mpiprocs=36 -l walltime=0:30:00 -- ./case.build


eaton

The error you reported is trapped by setting the namelist variable
state_debug_checks=.true..  That namelist setting is a side effect of
setting DEBUG=TRUE via the xmlchange command.

The checking is done via the routine physics_state_check which is called
from physics_update after the tendencies have been applied to state.  The
code in physics_state_check is a bunch of calls to shr_assert_in_domain to
check for NaNs and in a separate set of calls the values are checked to lie
in specified ranges.  This same kind of coding can be used in other
locations for more focussed debugging purposes.  My suggestion is to use
code like this to continue tracing where the bad temperature values are
coming from in the microphysics code.  Note that the ptend object with the
name 'micro_mg' is initialized in micro_mg_cam_tend_pack after the call to
micro_mg_tend2_0.  Presumably there's a bad value in packed_tlat which ends
up causing the bad temperature value.

Log in or register to post comments

Who's new

  • opioronald123@...
  • shimura.tomoya....
  • rack.hun.son@...
  • nathalie.schall...
  • sf870222@...