Skip to content

Commit

Permalink
Merge pull request ESCOMP#537 from cacraigucar/frierson_v2
Browse files Browse the repository at this point in the history
cam6_3_117: Bring in Frierson Simple Model

ESCOMP commit: 6019d2d
  • Loading branch information
cacraigucar authored and Steve Goldhaber committed Aug 24, 2023
1 parent 3f865e3 commit 11d061c
Show file tree
Hide file tree
Showing 9 changed files with 2,456 additions and 10 deletions.
20 changes: 19 additions & 1 deletion bld/build-namelist
Original file line number Diff line number Diff line change
Expand Up @@ -473,10 +473,26 @@ if ($phys eq 'adiabatic') {
++$phys_mode_flags;
}
my $ideal_mode = 0;
if ($phys eq 'kessler' or $phys eq 'held_suarez' or $phys eq 'tj2016') {
if ($phys eq 'kessler' or $phys eq 'held_suarez' or $phys eq 'tj2016' or $phys eq 'grayrad' ) {
$ideal_mode = 1;
++$phys_mode_flags;
}
if ($phys eq 'grayrad' ) {
add_default($nl, 'frierson_albedo');
add_default($nl, 'frierson_c0');
add_default($nl, 'frierson_deltas');
add_default($nl, 'frierson_fb');
add_default($nl, 'frierson_linfrac');
add_default($nl, 'frierson_ri_c');
add_default($nl, 'frierson_tau_eqtr');
add_default($nl, 'frierson_tau_pole');
add_default($nl, 'frierson_tdlt');
add_default($nl, 'frierson_tmin');
add_default($nl, 'frierson_twidth');
add_default($nl, 'frierson_wetdrycoef');
add_default($nl, 'frierson_wind_min');
add_default($nl, 'frierson_z0');
}
if ($phys_mode_flags > 1) {
die "$ProgName - ERROR: Only one of the variables atm_adiabatic, atm_ideal_phys, and aqua_planet can be set .true. \n";
}
Expand Down Expand Up @@ -4858,6 +4874,8 @@ sub check_snapshot_settings {
push (@validList_bc, ("'kessler_tend'"));
} elsif ($phys eq 'tj2016') {
push (@validList_bc, ("'thatcher_jablonowski_precip_tend'"));
} elsif ($phys eq 'grayrad') {
push (@validList_bc, ("'frierson_tend'"));
}
if ($chem ne 'none') {
push (@validList_bc, ("'chem_timestep_tend'"));
Expand Down
31 changes: 31 additions & 0 deletions bld/namelist_files/use_cases/dctest_frierson.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0"?>

<namelist_defaults>

<!-- make planet orbit circular -->
<orb_eccen >0.</orb_eccen>
<orb_obliq >0.</orb_obliq>
<orb_mvelp >0.</orb_mvelp>
<orb_mode>fixed_parameters</orb_mode>

<!-- Force PHIS to be set to zero -->
<use_topo_file>.false.</use_topo_file>

<!-- history output customization -->
<empty_htapes>.true.</empty_htapes>
<nhtfrq>-720</nhtfrq>
<avgflag_pertape>'A'</avgflag_pertape>

<fincl1>
'U:A','T:A','V:A','Q:A','Z3:A','PRECL:A','PRECC:A','PS:A','SST:A','TS:A', 'gray_DTCOND', 'gray_DQCOND', 'gray_EVAPDT', 'gray_EVAPDQ', 'gray_PRECL' , 'gray_PRECC' , 'gray_Tsurf' , 'gray_Qsurf' , 'gray_Cdrag' , 'gray_Zpbl' , 'gray_KVH' , 'gray_KVM' , 'gray_VSE' , 'gray_Zm' , 'gray_Rf' , 'gray_DTV' , 'gray_DUV' , 'gray_DVV' , 'gray_VD01' , 'gray_SHflux', 'gray_LHflux', 'gray_TauU' , 'gray_TauV' , 'gray_QRL' , 'gray_QRS' , 'gray_SWflux', 'gray_LUflux', 'gray_LDflux', 'gray_LWflux', 'gray_LUflux_TOA', 'gray_LDflux_TOA', 'gray_LWflux_TOA'
</fincl1>

<analytic_ic_type>'moist_baroclinic_wave_dcmip2016'</analytic_ic_type>

<ncdata dyn="fv" hgrid="1.9x2.5">atm/cam/inic/fv/FGRAYRAD_f19.cam.i.0051-01-01-00000_c20230510.nc</ncdata>

<test_tracer_names>
'TT_SLOT','TT_GBALL','TT_TANH','TT_EM8','TT_Y2_2','TT_Y32_16'
</test_tracer_names>

</namelist_defaults>
78 changes: 78 additions & 0 deletions doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,6 +1,84 @@

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

Tag name: cam6_3_117
Originator(s): cacraig, patc, islas
Date: June 28, 2023
One-line Summary: Bring in Frierson Simple Model (gray radiation)
Github PR URL: https://github.com/ESCOMP/CAM/pull/537

Purpose of changes (include the issue number and title text for each relevant GitHub issue):
- Frierson gray radiation: https://github.com/ESCOMP/CAM/issues/8

Describe any changes made to build system:
- Add physics option "grayrad"

Describe any changes made to the namelist:
- Introduced namelist settings for Frierson Gray radiation (all prepended with "frierson")

List any changes to the defaults for the boundary datasets: N/A

Describe any substantial timing or memory changes: N/A

Code reviewed by: fvitt, peverwhee, nusbaume

List all files eliminated: N/A

List all files added and what they do:
A bld/namelist_files/use_cases/dctest_frierson.xml
- Add use_case for Gray radiation model

A src/physics/simple/frierson.F90
A src/physics/simple/frierson_cam.F90
- Bring in Frierson code along with the CAM interface code to it

List all existing files that have been modified, and describe the changes:
M bld/build-namelist
- introduce grayrad physics option and accompanying namelist values

M bld/config_files/definition.xml
M bld/configure
- introduce grayrad physics option

M bld/namelist_files/namelist_defaults_cam.xml
M bld/namelist_files/namelist_definition.xml
- introduce grayrad namelist values

M cime_config/config_component.xml
- introduce %GRAYRAD compset qualifier

M cime_config/config_compsets.xml
- introduce FGRAYRAD compset

M cime_config/testdefs/testlist_cam.xml
- introduce prebeta test for FGRAYRAD compset

M src/control/cam_control_mod.F90
M src/control/runtime_opts.F90
M src/physics/simple/physpkg.F90
M src/physics/simple/restart_physics.F90
- mods to support gray radiation

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: all BFB except:
ERP_Ln9_Vnuopc.ne30pg3_ne30pg3_mg17.FW2000climo.cheyenne_intel.cam-outfrq9s_wcm_ne30 (Overall: FAIL) details:
- pre-existing failure

izumi/nag/aux_cam: all BFB except:
DAE_Vnuopc.f45_f45_mg37.FHS94.izumi_nag.cam-dae (Overall: FAIL) details:
- pre-existing failure

izumi/gnu/aux_cam: all BFB

Isla Simpson analyzed the results from these code mods and approved the release of the Gray Radiation option.

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

Tag name:cam6_3_116
Originator(s): cacraig, hannay, jedwards, eaton
Date: June 23, 2023
Expand Down
8 changes: 6 additions & 2 deletions src/control/cam_control_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ module cam_control_mod
logical, protected :: ideal_phys ! true => run Held-Suarez (1994) physics
logical, protected :: kessler_phys ! true => run Kessler physics
logical, protected :: tj2016_phys ! true => run tj2016 physics
logical, protected :: frierson_phys ! true => run frierson physics
logical, protected :: simple_phys ! true => adiabatic or ideal_phys or kessler_phys
! or tj2016
! or tj2016 or frierson
logical, protected :: aqua_planet ! Flag to run model in "aqua planet" mode
logical, protected :: moist_physics ! true => moist physics enabled, i.e.,
! (.not. ideal_phys) .and. (.not. adiabatic)
Expand Down Expand Up @@ -135,8 +136,9 @@ subroutine cam_ctrl_set_physics_type(phys_package)
ideal_phys = trim(phys_package) == 'held_suarez'
kessler_phys = trim(phys_package) == 'kessler'
tj2016_phys = trim(phys_package) == 'tj2016'
frierson_phys = trim(phys_package) == 'grayrad'

simple_phys = adiabatic .or. ideal_phys .or. kessler_phys .or. tj2016_phys
simple_phys = adiabatic .or. ideal_phys .or. kessler_phys .or. tj2016_phys .or. frierson_phys

moist_physics = .not. (adiabatic .or. ideal_phys)

Expand All @@ -154,6 +156,8 @@ subroutine cam_ctrl_set_physics_type(phys_package)
write(iulog,*) 'Run model with Kessler warm-rain physics forcing'
else if (tj2016_phys) then
write(iulog,*) 'Run model with Thatcher-Jablonowski (2016) physics forcing (moist Held-Suarez)'
else if (frierson_phys) then
write(iulog,*) 'Run model with Frierson (2006) physics'
end if
end if

Expand Down
6 changes: 6 additions & 0 deletions src/control/runtime_opts.F90
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ subroutine read_namelist(nlfilename, single_column, scmlat, scmlon)
use rate_diags, only: rate_diags_readnl
use tracers, only: tracers_readnl
use nudging, only: nudging_readnl
#if ( defined SIMPLE )
use frierson_cam, only: frierson_readnl
#endif

use dyn_comp, only: dyn_readnl
use ionosphere_interface,only: ionosphere_readnl
Expand Down Expand Up @@ -195,6 +198,9 @@ subroutine read_namelist(nlfilename, single_column, scmlat, scmlon)
call rate_diags_readnl(nlfilename)
call scam_readnl(nlfilename, single_column, scmlat, scmlon)
call nudging_readnl(nlfilename)
#if ( defined SIMPLE )
call frierson_readnl(nlfilename)
#endif

call dyn_readnl(nlfilename)
call ionosphere_readnl(nlfilename)
Expand Down
Loading

0 comments on commit 11d061c

Please sign in to comment.