Skip to content

Commit

Permalink
add tests; update ChangeLog
Browse files Browse the repository at this point in the history
  • Loading branch information
brian-eaton committed Oct 24, 2023
1 parent 503ac0d commit 3e7282b
Show file tree
Hide file tree
Showing 13 changed files with 260 additions and 60 deletions.
43 changes: 43 additions & 0 deletions cime_config/testdefs/testlist_cam.xml
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,14 @@
<option name="wallclock">00:10:00</option>
</options>
</test>
<test compset="QPC6" grid="ne5pg3_ne5pg3_mg37" name="ERP_D_Ln9" testmods="cam/outfrq9s_rrtmgp">
<machines>
<machine name="izumi" compiler="nag" category="aux_cam"/>
</machines>
<options>
<option name="wallclock">00:10:00</option>
</options>
</test>
<test compset="QPRCEMIP" grid="ne30_ne30_mg17" name="ERP_Ln9_Vnuopc" testmods="cam/outfrq9s">
<machines>
<machine name="cheyenne" compiler="intel" category="prebeta"/>
Expand Down Expand Up @@ -1745,6 +1753,15 @@
<option name="comment">CAM7 dev low top ~40 km</option>
</options>
</test>
<test compset="FLTHIST" grid="ne30pg3_ne30pg3_mg17" name="ERP_D_Ln9" testmods="cam/outfrq9s_rrtmgp">
<machines>
<machine name="cheyenne" compiler="intel" category="aux_cam"/>
</machines>
<options>
<option name="wallclock">00:30:00</option>
<option name="comment">CAM7 dev low top ~40 km</option>
</options>
</test>
<test compset="FMTHIST" grid="ne30pg3_ne30pg3_mg17" name="SMS_D_Ln9" testmods="cam/outfrq9s">
<machines>
<machine name="cheyenne" compiler="intel" category="aux_cam"/>
Expand All @@ -1754,6 +1771,15 @@
<option name="comment">CAM7 dev mid top ~80 km</option>
</options>
</test>
<test compset="FMTHIST" grid="ne30pg3_ne30pg3_mg17" name="SMS_D_Ln9" testmods="cam/outfrq9s_rrtmgp">
<machines>
<machine name="cheyenne" compiler="intel" category="aux_cam"/>
</machines>
<options>
<option name="wallclock">00:20:00</option>
<option name="comment">CAM7 dev mid top ~80 km</option>
</options>
</test>
<test compset="FMTHIST" grid="ne30pg3_ne30pg3_mg17" name="ERP_D_Ln9" testmods="cam/outfrq9s">
<machines>
<machine name="cheyenne" compiler="intel" category="prealpha"/>
Expand Down Expand Up @@ -2678,6 +2704,15 @@
<option name="wallclock">00:40:00</option>
</options>
</test>
<test compset="FW2000climo" grid="ne30pg3_ne30pg3_mg17" name="SMS_Ln9" testmods="cam/outfrq9s_wcm_ne30_rrtmgp">
<machines>
<machine name="cheyenne" compiler="intel" category="waccm"/>
<machine name="cheyenne" compiler="intel" category="aux_cam"/>
</machines>
<options>
<option name="wallclock">00:40:00</option>
</options>
</test>
<test compset="FW2000climo" grid="ne30pg3_ne30pg3_mg17" name="SMS_D_Ln9_Vnuopc" testmods="cam/outfrq9s_wcm_ne30">
<machines>
<machine name="cheyenne" compiler="intel" category="waccm"/>
Expand Down Expand Up @@ -2766,6 +2801,14 @@
<option name="wallclock">00:30:00</option>
</options>
</test>
<test compset="PC6" grid="f09_f09_mg17" name="SMS_Ld5" testmods="cam/cam6_port_f09_rrtmgp">
<machines>
<machine name="izumi" compiler="gnu" category="aux_cam"/>
</machines>
<options>
<option name="wallclock">00:30:00</option>
</options>
</test>

<test compset="FHS94" grid="ne5_ne5_mg37" name="ERP_Ln9_Vnuopc" testmods="cam/outfrq9s">
<machines>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
./xmlchange --append CAM_CONFIG_OPTS="-rad rrtmgp"
./xmlchange ROF_NCPL=\$ATM_NCPL
./xmlchange GLC_NCPL=\$ATM_NCPL
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
offline_driver_infile = '$DIN_LOC_ROOT/atm/cam/port/base_cam6_3mode_1deg.doubleCO2.cam.h1.0001-01-01-00000_c170526.nc'
rad_data_fdh = .true.
empty_htapes = .true.
avgflag_pertape = 'A','I'
fincl1 = 'SOLIN', 'QRS', 'FSNS', 'FSNT','FSNSC', 'FSDSC','FSNR','FLNR',
'FSNTOA', 'FSUTOA', 'FSNTOAC', 'FSNTC', 'FSDSC', 'FSDS', 'SWCF',
'QRL', 'FLNS', 'FLDS', 'FLNT', 'LWCF', 'FLUT' ,'FLUTC', 'FLNTC',
'FLNSC', 'FLDSC'
fincl2 = 'SOLIN', 'QRS', 'FSNS', 'FSNT','FSNSC', 'FSDSC','FSNR','FLNR',
'FSNTOA', 'FSUTOA', 'FSNTOAC', 'FSNTC', 'FSDSC', 'FSDS', 'SWCF',
'QRL', 'FLNS', 'FLDS', 'FLNT', 'LWCF', 'FLUT' ,'FLUTC', 'FLNTC',
'FLNSC', 'FLDSC'
rad_data_output = .false.
mfilt=100,100
nhtfrq=-120,73
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
./xmlchange --append CAM_CONFIG_OPTS="-rad rrtmgp"
./xmlchange ROF_NCPL=\$ATM_NCPL
./xmlchange GLC_NCPL=\$ATM_NCPL
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
mfilt=1,1,1,1,1,1
ndens=1,1,1,1,1,1
nhtfrq=9,9,9,9,9,9
inithist='ENDOFRUN'
27 changes: 27 additions & 0 deletions cime_config/testdefs/testmods_dirs/cam/outfrq9s_rrtmgp/user_nl_clm
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
!----------------------------------------------------------------------------------
! Users should add all user specific namelist changes below in the form of
! namelist_var = new_namelist_value
!
! Include namelist variables for drv_flds_in ONLY if -megan and/or -drydep options
! are set in the CLM_NAMELIST_OPTS env variable.
!
! EXCEPTIONS:
! Set use_cndv by the compset you use and the CLM_BLDNML_OPTS -dynamic_vegetation setting
! Set use_vichydro by the compset you use and the CLM_BLDNML_OPTS -vichydro setting
! Set use_cn by the compset you use and CLM_BLDNML_OPTS -bgc setting
! Set use_crop by the compset you use and CLM_BLDNML_OPTS -crop setting
! Set spinup_state by the CLM_BLDNML_OPTS -bgc_spinup setting
! Set irrigate by the CLM_BLDNML_OPTS -irrig setting
! Set dtime with L_NCPL option
! Set fatmlndfrc with LND_DOMAIN_PATH/LND_DOMAIN_FILE options
! Set finidat with RUN_REFCASE/RUN_REFDATE/RUN_REFTOD options for hybrid or branch cases
! (includes $inst_string for multi-ensemble cases)
! Set glc_grid with CISM_GRID option
! Set glc_smb with GLC_SMB option
! Set maxpatch_glcmec with GLC_NEC option
! Set glc_do_dynglacier with GLC_TWO_WAY_COUPLING env variable
!----------------------------------------------------------------------------------
hist_nhtfrq = 9
hist_mfilt = 1
hist_ndens = 1

7 changes: 0 additions & 7 deletions cime_config/usermods_dirs/rrtmgp/shell_commands

This file was deleted.

11 changes: 0 additions & 11 deletions cime_config/usermods_dirs/rrtmgp/user_nl_cam

This file was deleted.

21 changes: 0 additions & 21 deletions cime_config/usermods_dirs/scam_rrtmgp/shell_commands

This file was deleted.

15 changes: 0 additions & 15 deletions cime_config/usermods_dirs/scam_rrtmgp/user_nl_cam

This file was deleted.

161 changes: 161 additions & 0 deletions doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,166 @@
===============================================================

Tag name:
Originator(s): brianpm, courtneyp, eaton
Date:
One-line Summary: Provide RRTMGP as a radiation parameterization
Github PR URL:

Purpose of changes (include the issue number and title text for each relevant GitHub issue):

#255 - Provide RRTMGP as a radiation parameterization
https://github.com/ESCOMP/CAM/issues/255

Describe any changes made to build system:
. '-rad' argument to configure accepts the values 'rrtmgp' and 'rrtmgp_gpu'
to build the RRTMGP code for CPUs or for GPUs.

Describe any changes made to the namelist:
. add variables rrtmgp_coefs_lw_file and rrtmgp_coefs_sw_file to contain
filepaths for the RRTMGP coefficients files.

List any changes to the defaults for the boundary datasets: none

Describe any substantial timing or memory changes:
. performance evaluation of RRTMGP has not yet been done.

Code reviewed by:

List all files eliminated:

src/physics/rrtmg/cloud_rad_props.F90
src/physics/rrtmg/ebert_curry.F90
src/physics/rrtmg/oldcloud.F90
src/physics/rrtmg/slingo.F90
. these cloud optics files which can be shared by rrtmg and rrtmgp are
moved to src/physics/cam

List all files added and what they do:

bld/namelist_files/use_cases/1850_cam5.xml
. use case file for 1850 cam5 physics

cime_config/testdefs/testmods_dirs/cam/cam6_port_f09_rrtmgp/shell_commands
cime_config/testdefs/testmods_dirs/cam/cam6_port_f09_rrtmgp/user_nl_cam
cime_config/testdefs/testmods_dirs/cam/outfrq9s_rrtmgp/shell_commands
cime_config/testdefs/testmods_dirs/cam/outfrq9s_rrtmgp/user_nl_cam
cime_config/testdefs/testmods_dirs/cam/outfrq9s_rrtmgp/user_nl_clm
. for adding RRTMGP to tests

src/physics/cam/cloud_rad_props.F90
src/physics/cam/ebert_curry.F90
src/physics/cam/oldcloud.F90
src/physics/cam/slingo.F90
. these 4 files are shared cloud optics code moved here from src/physics/rrtmg/.
. remove unused code, cleanup unused vars

src/physics/rrtmgp/mcica_subcol_gen.F90
src/physics/rrtmgp/radconstants.F90
src/physics/rrtmgp/radiation.F90
src/physics/rrtmgp/rrtmgp_inputs.F90
. CAM interface code for RRTMGP.

List all existing files that have been modified, and describe the changes:

.gitignore
. add directories src/physics/rrtmgp/{data,ext}

Externals_CAM.cfg
. add external definition for rte-rrtmgp source
. add external definition for rrtmgp data

bld/build-namelist
. set the correct filepaths for the coefficient datasets which are checked
out in the source code directory tree.
. generalize logic to include both rrtmgp and rrtmg when appropriate
. add error check for old cloud optics no longer supported

bld/config_files/definition.xml
. add 'rrtmgp' as valid value for 'rad' configure option

bld/configure
. add rrtmgp and rrtmgp_gpu as valid values for '-rad' argument.
. '-rad rrtmgp_gpu' sets a flag used to add the filepaths for the GPU code
versions to the Filepath file. The '_gpu' suffix is removed before
setting the parameter value for 'rad' in the config_cache.xml file.

bld/namelist_files/namelist_defaults_cam.xml
. the aersol and cloud optics datasets for RRTMG are being reused for
RRTMGP for now

bld/namelist_files/namelist_definition.xml
. add 'rrtmgp' as valid value for 'radiation_scheme'
. add variables rrtmgp_coefs_lw_file and rrtmgp_coefs_sw_file to contain
filepaths for the RRTMGP coefficients files.

cime_config/testdefs/testlist_cam.xml (aux_cam)
. add aux_cam tests:
ERP_D_Ln9.ne30pg3_ne30pg3_mg17.FLTHIST.cheyenne_intel.cam-outfrq9s_rrtmgp
SMS_Ln9.ne30pg3_ne30pg3_mg17.FW2000climo.cheyenne_intel.cam-outfrq9s_rrtmgp
SMS_D_Ln9.ne30pg3_ne30pg3_mg17.FMTHIST.cheyenne_intel.cam-outfrq9s_rrtmgp
ERP_D_Ln9.ne5pg3_ne5pg3_mg37.QPC6.izumi_nag.cam-outfrq9s_rrtmgp
SMS_Ld5.f09_f09_mg17.PC6.izumi_gnu.cam-cam6_port_f09_rrtmgp

src/chemistry/utils/solar_data.F90
. add solar_htng_spctrl_scl to log file output

src/physics/cam/aer_rad_props.F90
. nrh, ot_length now accessed from phys_prop

src/physics/cam/aerosol_optics_cam.F90
. ot_length now accessed from phys_prop

src/physics/cam/phys_prop.F90
. add the public parameter nrh to this module. Was previously in
radconstants.
. turn off old debug output to log file

src/physics/cam/physpkg.F90
. reorder initialization of solar_data and radiation modules to allow
reading the spectral band boundaries from the input data rather than
requiring them to be hardcoded.

src/physics/cam/rad_constituents.F90
. access ot_length from phys_prop rather than rad_constituents

src/physics/cam_dev/physpkg.F90
. reorder initialization of solar_data and radiation modules to allow
reading the wavenumber band boundaries from the input data rather than
requiring them to be hardcoded.

src/physics/camrt/radconstants.F90
. parameters ot_length and nrh moved to phys_props

src/physics/rrtmg/radconstants.F90
. parameters ot_length and nrh moved to phys_props

src/physics/simple/radconstants.F90
. parameters ot_length and nrh moved to phys_props
. add dummy interface for get_sw_spectral_boundaries

src/physics/spcam/crm/CLUBB/crmx_mt95.f90
. removed 3 non-ascii characters (in comments)

If there were any failures reported from running test_driver.sh on any test
platform, and checkin with these failures has been OK'd by the gatekeeper,
then copy the lines from the td.*.status files for the failed tests to the
appropriate machine below. All failed tests must be justified.

cheyenne/intel/aux_cam:

izumi/nag/aux_cam:

izumi/gnu/aux_cam:

CAM tag used for the baseline comparison tests if different than previous
tag:

Summarize any changes to answers: None.
New RRTMGP option changes answers only when enabled.

===============================================================
===============================================================

Tag name: cam6_3_133
Originator(s): fvitt
Date: 19 Oct 2023
Expand Down
4 changes: 1 addition & 3 deletions src/physics/cam/phys_prop.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1111,9 +1111,7 @@ subroutine bulk_props_init(physprop, nc_id)

type(var_desc_T) :: vid

! ***N.B.*** RRTMGP hasn't set the value of idx_sw_diag when this routine is
! called. The debug option will need to be modified for RRTMGP.
logical :: debug = .true.
logical :: debug = .false.

character(len=*), parameter :: subname = 'bulk_props_init'
!------------------------------------------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions src/physics/spcam/crm/CLUBB/crmx_mt95.f90
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
! A C-program for MT19937, with initialization improved 2002/1/26.
! Coded by Takuji Nishimura and Makoto Matsumoto.

! Code converted to Fortran 95 by José Rui Faustino de Sousa
! Code converted to Fortran 95 by Jose Rui Faustino de Sousa
! Date: 2002-02-01

! Enhanced version by José Rui Faustino de Sousa
! Enhanced version by Jose Rui Faustino de Sousa
! Date: 2003-04-30

! Interface:
Expand Down Expand Up @@ -1310,7 +1310,7 @@ subroutine genrand_res53_7d( r )

end subroutine genrand_res53_7d
! These real versions are due to Isaku Wada, 2002/01/09 added
! Altered by José Sousa genrand_real[1-3] will not return exactely
! Altered by Jose Sousa genrand_real[1-3] will not return exactely
! the same values but should have the same properties and are faster

end module crmx_mt95
Expand Down

0 comments on commit 3e7282b

Please sign in to comment.