-
Notifications
You must be signed in to change notification settings - Fork 0
Home
This is the development repository for CESM3-Planets and contains the latest CESM3 framework updates along with the most current version of CAM-MARS. Please refer to the original CESM-Planets wiki for further information on the project
To get the current version of CESM3 planets
git clone https://github.com/NCAR/CESM3-planets.git CESM3-planets
cd CESM3-planets
git checkout planets3
bin/git-fleximod update
- New Namelist control parameters for CAM Mars
- exo_rad_camtop - specifies top level for computation of fluxes - now default to 1 use with relaxation of S/U/V tendencies to Held Suarez values
- exo_rad_step - model time steps between radiation calls - defaults to 1: called every model step
- mars_use_hs_uv - add diffusive tendency on U and V as calculated by Held Suarez - default is FALSE: don't use HS diffusive tendencies
- mars_relaxation - relax exort dry static energy tendency back to HS tendency between the pressure levels mars_relax_bot_p:mars_relax_top_p. If mars_relax_linear = .FALSE. then it will use mars_relax_tau_sec as the relaxation time constant. If mars_relax_linear = .TRUE. then a linear ramp will be used between the top and bottom pressure levels as specified by mars_relax_tau_top_sec and mars_relax_tau_bot_sec
- mars_relax_fincl - list of values to relax. Placeholder for now and should be left blank. Only dry static energy tendency is relaxed for CAM-Mars when mars_relaxation is set to .true.
- mars_relax_bot_p - bottom pressure limit for relaxation - 20 Pa is about the limit for ExoRT.
- mars_relax_top_p - top pressure limit for relaxation - model top is about 1e-10 Pa
- mars_relax_linear - provides capability to linearly relax solution
- mars_relax_tau_sec - the relaxation time constant used when mars_relax_linear is set to .false. Set it to the model timestep (1800) to relax fully back to HS every timestep
- mars_relax_tau_bot_sec - relaxation time of bottom level when mars_relax_linear is set to .TRUE. The relaxation time constant between the top and bot pressure limits is a linear interpolation between the bot and top time constants.
- mars_relax_tau_top_sec - relaxation time of top level when mars_relax_linear is set to .TRUE.
To debug the HS scheme I would recommend the following setting in user_nl_cam. These settings allow for radiation calculations every timestep using a camtop of 1 but replacing the heating rates with the Held Suarez values above .5mb. Below .5 ExoRT's radiation rates are left alone. These setting will also allow use of the HS diffusion on UV winds.
exo_rad_step = 1
mars_use_hs_uv = .true.
mars_relaxation = .true.
mars_relax_fincl = ''
mars_relax_tau_sec = 1800.
mars_relax_bot_p = 50
mars_relax_top_p = 1e-20
mars_relax_linear = .false.
mars_relax_tau_bot_sec = 864000.
mars_relax_tau_top_sec = 172800.
exo_rad_camtop = 1
-
New ne3 initial data and updated script below to run this coarse resolution. The namelist interpolation parameters were modified to put out a 10degree lat/lon file containing instantaneous history every timestep. The history files can quickly be viewed with ncview or another netcdf viewer. Looking at the Temperature variable from timestep 0 thru 2 it is apparent that the heating rates are driving the Temperature very low in the bottom layer of the atmosphere in a band along the equator. You can see the same issue in the next few levels up but not quite as bad. The model blows up around time step 3 when the temperature becomes negative.
-
One recommended change for debugging which is not included in the checkout code is to enable a radiation calculation every timestep. Modify components/cam/src/physics/exo-rt/ext/source/exoplanet_mod.F90 and set
exo_rad_step = 1
-
After modifying the radiation timestep to be 1 the model should be writing radiation diagnostics every time step although the variables only have values at time step 0.
-
camtop in exo-rt/radiation.F90 was set to 31 to be below the .02mb pressure limit for exo-rt. Although the heating rates are still driving the temperature to bad values after at about 3 time steps.
-
Updated exo-rt/radiation.F90 to make sure QRS and QRL were carried in the physics buffer with units of J/Kg/s. Those heating rates are written out to the history tape in K/s after first dividing by cpair to convert the units.
-
QRS and QRL: The quantity Q*dp is carried by the physics buffer across time steps. It is converted to Q (dry static energy tendency) before being passed to radheat_tend by dividing by PDEL. radheat_tend pushes the QRS/QRL heating rates into the ptend%s variable which alters the temperature when physics_update is called in src/physics/simple/physpkg.F90
-
We need to verify that exo-rt is initializing correctly. It would help to have Erik look at the log files to see if the exo-rt output looks reasonable during initialization.
There is a new interface to the ExoRT radiation library that was originally part of an exoplanet version of CAM. ExoRT and ExoCAM are currently being maintained by Eric Wolf.
The new interface sits below the physics/exo-rt directory and follows CAM's radiation API. ExoRT can be chosen as CAM's radiation package via the configuration routine and could eventually be swapped in place of RRTMG or any other CAM supported radiation package. For now though we are only using ExoRT for a developing a Mars simulation and the interface is currently hardwired to expect 3 advected, radiatively active constituents H2O, CO2 and N2. There are a number of new placeholder compsets for using ExoRT with the different versions of CAM physics but none of them is being worked on until the radiation has been validated.
In order to validate ExoRT and provide a simple framework for working on Mars physics parameterizations, we added a simple model setup for Mars along with a corresponding compset FMARSEXORT. The simple model framework allows ExoRT to be run and tested alone. As mentioned above, CAM-Mars currently expects 3 advected constituents H2O, CO2, and N2 that will be read from the initial condition file. CAM's radiation interface is a little klunky and I had to jump through a few hoops to use these 3 consitituents in the simulation.
- modify configure to bump the number of advected components by 2 when mars is selected
- add the names to the gaslist array in the radconstants.F90 file.
- modify the radiation namelist reading routine to not return if we are using the exort radiation package
- add the gasses to the rad_climate namelist
- call cnst_add for the gasses in the mars_cam.F90 simple model interface file.
- add CO2 and N2 mixing ratios to the Initial condition file.
A simple model mars experiment can be built and run up to the point where ExoRT is executed but the state returned from the driver is bad and the model dies noting a bad temperature value.
Since there is no surface model yet I added a surface init routine to the simple mars interface that sets reasonable surface temperature and the direct/indirect albedo values for input into ExoRT. These should be removed when we are ready to add a land model to the configuration which will prognose these variables.
A sample script for running a simple model ExoRT coarse resolution (ne3) case on a single processor in debug mode. The ne3 initial condition file is on the NCAR cgd filesystem.
#!/bin/csh -fv
set echo
#**********************************************************************
# Run SCAM with a single IOP
# This script will build and run one IOP
# If a user wishes to run more than one IOP, use create_scam6_iop_multi
#
# Usage:
# ./create_scam6_iop <IOP> # where IOP name is from list below
# - or -
# ./create_scam6_iop # IOP is specified in the script below
#**********************************************************************
#### BEWARE OF ###
# - Have to blow away case directory to rebuild.
#------------------
# User sets options in this section
#------------------
### Case Name
set CASETITLE=cesm_planets.003
### Full path of cesm source code and case (output) directories (see examples)
set CESMDIR=/project/amp/jet/collections/test/CESM3-planets
set CAMDIR=${CESMDIR}/components/cam
set CASEDIR=/project/amp/$USER/cases
### Set location of user source mods (if any)
setenv this_dir `pwd`
setenv usrsrc ${this_dir}/mods/$CASETITLE
### Standard Run Settings
set RES=ne3_ne3_mg37
set COMPSET=FMARSEXORT
set COMPILER=intel
#------------------
# User should not need to set any options in this section
#------------------
cd $CASEDIR
##set MODSDIR = $CESMDIR/components/cam/cime_config/usermods_dirs
#Create full casename
set CASENAME=${COMPSET}.${RES}.${CASETITLE}
#------------------
# create case
#------------------
$CESMDIR/cime/scripts/create_newcase --compset $COMPSET --res $RES --compiler $COMPILER --case $CASEDIR/$CASENAME --run-unsupported --pecount 1
cd $CASEDIR/$CASENAME
### Set build and run directories to be under case directory.
set RUNDIR=${CASEDIR}/${CASENAME}/run
./xmlchange RUNDIR=$RUNDIR
./xmlchange EXEROOT=${CASEDIR}/${CASENAME}/bld
#------------------
# USER XMLCHANGE OPTIONS HERE
#------------------
./xmlchange DEBUG='TRUE'
./xmlchange STOP_OPTION=nsteps
./xmlchange STOP_N=2 # Total timesteps for run f(dt)
#------------------
# Setup Case
#------------------
./case.setup
#------------------
# source mods: copy them into case directory
#------------------
#/bin/cp ${usrsrc}/* SourceMods/src.cam/
#------------------
# Add all user specific cam namelist changes here
#
# Users should add all user specific namelist changes below in the form of
# namelist_var = new_namelist_value
# Namelist settings which appear in usermods_dir and here will use the values
# specified below
# Other namelist settings from usermods_dirs will be unchanged
# Output can also be specified here (e.g. fincl1)
#------------------
cat >> user_nl_cam << EOF
se_statefreq = 1
nhtfrq = 1,1
interpolate_output = .true.,.true.,.true.
interpolate_nlat = 18,18,18
interpolate_nlon = 36,36,36
ncdata = '/fs/cgd/csm/inputdata/atm/cam/inic/se/CAM_Mars_ne3np4.HS.no-topo_241016.nc'
se_nsplit = 8
se_rsplit = 4
se_hypervis_subcycle = 8
se_hypervis_subcycle_q = 1
mfilt = 144
write_nstep0 = .true.
avgflag_pertape(1) = 'I'
gravit = 3.72
sday = 88642.0
mwdry = 43.34
cpair = 735.0
rearth = 3.38992e6
co2vmr = 0.97
ch4vmr= 0.
n2ovmr= 0.
f11vmr= 0.
f12vmr= 0.
n2vmr= 0.03
rad_climate = 'A:CO2:CO2','A:Q:H2O','A:N2:N2'
water_species_in_air = 'Q'
EOF
#------------------
# Build
#------------------
./case.build
### make timing dir kludge [REMOVE WHEN FIXED]
mkdir -p $RUNDIR/timing/checkpoints
#------------------
# Choose type of job submission (batch or interactive)
#------------------
### Submit to Queue (If you have one)
./case.submit