Skip to content

Commit

Permalink
Run-time option for climate GHG for radiation (#1625)
Browse files Browse the repository at this point in the history
TYPE: enhancement

KEYWORDS: GHG, run-time, radiation, green house gas

SOURCE: internal

DESCRIPTION OF CHANGES:
This PR improves the way to handle green house gases in radiation schemes (CAM, RRTMG, RRTMGF, RRTM). Previously green house gases (GHGs) were either specified to be constant values or read from historical gas concentration datasets (CAMtr). Note that the latter only worked when the WRF code was compiled with the macro flag `-DCLWRFGHG`. This PR modifies the radiation schemes so that input of GHG concentration from CAMtr becomes a run-time option. The old approach of specifying a time invariant value for the GHG concentrations remains available for backward consistency. 

This PR is a reworking of "Run-time option of GHG concentration from various climate RCPs" #1611.

ISSUE: CLWRF tracer gases are not used in RRTMG shortwave code
Fixes #1597

LIST OF MODIFIED FILES:
M       Makefile
M       Registry/Registry.EM_COMMON
M       clean
M       dyn_em/module_first_rk_step_part1.F
M       dyn_em/start_em.F
M       main/depend.common
M       phys/module_physics_init.F
M       phys/module_ra_cam.F
M       phys/module_ra_cam_support.F
M       phys/module_ra_clWRF_support.F
M       phys/module_ra_rrtm.F
M       phys/module_ra_rrtmg_lw.F
M       phys/module_ra_rrtmg_lwf.F
M       phys/module_ra_rrtmg_sw.F
M       phys/module_ra_rrtmg_swf.F
M       phys/module_ra_sw.F
M       phys/module_radiation_driver.F
M       run/README.namelist
M       share/module_check_a_mundo.F
M       share/output_wrf.F

TESTS CONDUCTED:
After all of the commits, testing conducted by Ming Chen:
1. Shown below are differences in T2, LWDNB and SWDNB between RRTMG runs with GHG_INPUT=1 and 
GHG_INPUT=0 after 18 hours of integration. This is a case initialized at 00 UTC 23 February 
2017. We do see impacts caused by GHG changes.  

<img width="372" alt="T2" src="https://user-images.githubusercontent.com/17932265/149973558-4f654474-f107-4118-9ec4-132f43efd59b.png">
<img width="399" alt="LWDNB" src="https://user-images.githubusercontent.com/17932265/149973580-fa0415d0-96d5-4fad-9a5f-7c2d70e73969.png">
<img width="343" alt="SWDNB" src="https://user-images.githubusercontent.com/17932265/149973603-0f1fce93-e944-4d53-aaa4-46d3639365df.png">

2. Results here show the differences in T2 and LWDNB after 1-hour of integration between runs with specified and time-varying  greenhouse gases, respectively. This is a case using RRTMG radiation scheme. 
<img width="435" alt="t2new" src="https://user-images.githubusercontent.com/17932265/150200146-4483eb33-3e3c-452b-a3d7-4dc4e26fda24.png">
<img width="445" alt="lwdnbnew" src="https://user-images.githubusercontent.com/17932265/150200167-fb4ef228-4434-4397-9c30-e17825343b7f.png">
 

RELEASE NOTE: Climatology green house gas (GHG) concentrations from a number of RCPs and newer SSPs are now a run-time option in the WRFV4.4 (previously, they were a compile-time option). This serves two purposes: 1) Since the data files provide compiled global climatological values for co2, n2o, ch4, cfc11 and cfc12 up to 2006 for RCPs and 2014 for SSPs, they are better estimates for historical and current runs. 2) If users have values of their own, they can be easily added to the data file. The user specifies `ghg_input=1` in the physics namelist record for climatology, which is the default in v4.4, or `ghg_input=0` for constant values for backward compatibility. The default file used is CAMtr_volume_mixing_ratio.SSP245, added to the model via PR#[1553](#1553). A simple function for CO2 is now the default when choosing to not use the climo GHG files for RRTM - previously this function is only in RRTMG schemes. This option is only available for radiation schemes of CAM, RRTMG, RRTMGF and RRTM.
  • Loading branch information
davegill authored Jan 19, 2022
1 parent 8194c66 commit b511c70
Show file tree
Hide file tree
Showing 20 changed files with 368 additions and 430 deletions.
16 changes: 14 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -546,9 +546,15 @@ em_real : wrf
ln -sf ../../run/CAM_AEROPT_DATA . ; \
ln -sf ../../run/CAMtr_volume_mixing_ratio.RCP4.5 . ; \
ln -sf ../../run/CAMtr_volume_mixing_ratio.RCP6 . ; \
ln -sf ../../run/CAMtr_volume_mixing_ratio.RCP8.5 CAMtr_volume_mixing_ratio ; \
ln -sf ../../run/CAMtr_volume_mixing_ratio.RCP8.5 . ; \
ln -sf ../../run/CAMtr_volume_mixing_ratio.A1B . ; \
ln -sf ../../run/CAMtr_volume_mixing_ratio.A2 . ; \
ln -sf ../../run/CAMtr_volume_mixing_ratio.SSP119 . ; \
ln -sf ../../run/CAMtr_volume_mixing_ratio.SSP126 . ; \
ln -sf ../../run/CAMtr_volume_mixing_ratio.SSP245 . ; \
ln -sf ../../run/CAMtr_volume_mixing_ratio.SSP245 CAMtr_volume_mixing_ratio ; \
ln -sf ../../run/CAMtr_volume_mixing_ratio.SSP370 . ; \
ln -sf ../../run/CAMtr_volume_mixing_ratio.SSP585 . ; \
ln -sf ../../run/CLM_ALB_ICE_DFS_DATA . ; \
ln -sf ../../run/CLM_ALB_ICE_DRC_DATA . ; \
ln -sf ../../run/CLM_ASM_ICE_DFS_DATA . ; \
Expand Down Expand Up @@ -611,9 +617,15 @@ em_real : wrf
ln -sf ../../run/CAM_AEROPT_DATA . ; \
ln -sf ../../run/CAMtr_volume_mixing_ratio.RCP4.5 . ; \
ln -sf ../../run/CAMtr_volume_mixing_ratio.RCP6 . ; \
ln -sf ../../run/CAMtr_volume_mixing_ratio.RCP8.5 CAMtr_volume_mixing_ratio ; \
ln -sf ../../run/CAMtr_volume_mixing_ratio.RCP8.5 . ; \
ln -sf ../../run/CAMtr_volume_mixing_ratio.A1B . ; \
ln -sf ../../run/CAMtr_volume_mixing_ratio.A2 . ; \
ln -sf ../../run/CAMtr_volume_mixing_ratio.SSP119 . ; \
ln -sf ../../run/CAMtr_volume_mixing_ratio.SSP126 . ; \
ln -sf ../../run/CAMtr_volume_mixing_ratio.SSP245 . ; \
ln -sf ../../run/CAMtr_volume_mixing_ratio.SSP245 CAMtr_volume_mixing_ratio ; \
ln -sf ../../run/CAMtr_volume_mixing_ratio.SSP370 . ; \
ln -sf ../../run/CAMtr_volume_mixing_ratio.SSP585 . ; \
ln -sf ../../run/CLM_ALB_ICE_DFS_DATA . ; \
ln -sf ../../run/CLM_ALB_ICE_DRC_DATA . ; \
ln -sf ../../run/CLM_ASM_ICE_DFS_DATA . ; \
Expand Down
1 change: 1 addition & 0 deletions Registry/Registry.EM_COMMON
Original file line number Diff line number Diff line change
Expand Up @@ -2400,6 +2400,7 @@ rconfig integer compute_radar_ref derived 1 0
rconfig integer ra_lw_physics namelist,physics max_domains -1 rh "ra_lw_physics" "" ""
rconfig integer ra_sw_physics namelist,physics max_domains -1 rh "ra_sw_physics" "" ""
rconfig integer ra_sw_eclipse namelist,physics 1 0 rh "ra_sw_eclipse" "0/1 flag: 1=turn eclipse on" ""
rconfig integer ghg_input namelist,physics 1 1 rh "ghg_input" "for CAM, RRTM, RRTMG, RRTMG_fast: 0/1 flag: 0=constant (CO2 is a function of year for RRTM*); 1=time-varying GHG from CAMtr climate file"
rconfig real radt namelist,physics max_domains 0 h "RADT" "" ""
rconfig real naer namelist,physics max_domains 1e9 rh "NAER" "" ""
rconfig integer sf_sfclay_physics namelist,physics max_domains -1 rh "sf_sfclay_physics" "" ""
Expand Down
3 changes: 3 additions & 0 deletions clean
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ if ( "$arg" == '-a' || "$arg" == '-aa' ) then
*/CCN_ACTIVATE.BIN \
*/CAMtr_volume_mixing_ratio.RCP4.5 */CAMtr_volume_mixing_ratio.RCP6 */CAMtr_volume_mixing_ratio.RCP8.5 \
*/CAMtr_volume_mixing_ratio.A1B */CAMtr_volume_mixing_ratio.A2 */CAMtr_volume_mixing_ratio \
*/CAMtr_volume_mixing_ratio.SSP119 */CAMtr_volume_mixing_ratio.SSP126 \
*/CAMtr_volume_mixing_ratio.SSP245 */CAMtr_volume_mixing_ratio.SSP370 \
*/CAMtr_volume_mixing_ratio.SSP585 \
*/CLM_*DATA */RRTMG_LW_DATA */RRTMG_SW_DATA \
*/p3_lookup* */BROADBAND_CLOUD_GODDARD.bin \
*/ozone.formatted */ozone_lat.formatted */ozone_plev.formatted \
Expand Down
2 changes: 1 addition & 1 deletion dyn_em/module_first_rk_step_part1.F
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ SUBROUTINE first_rk_step_part1 ( grid , config_flags &
& ,progn=config_flags%progn &
#endif
& ,slope_rad=config_flags%slope_rad,topo_shading=config_flags%topo_shading &
& ,shadowmask=grid%shadowmask &
& ,shadowmask=grid%shadowmask,ghg_input=config_flags%ghg_input &
& ,ht=grid%ht,dx=grid%dx,dy=grid%dy,dx2d=grid%dx2d,area2d=grid%area2d &
& ,diffuse_frac=grid%diffuse_frac &
& ,obscur=grid%ECOBSC, mask=grid%ECMASK &
Expand Down
1 change: 1 addition & 0 deletions dyn_em/start_em.F
Original file line number Diff line number Diff line change
Expand Up @@ -1025,6 +1025,7 @@ SUBROUTINE start_domain_em ( grid, allowed_to_read &
grid%rublten,grid%rvblten,grid%rthblten, &
grid%rqvblten,grid%rqcblten,grid%rqiblten, &
grid%rthraten,grid%rthratenlw,grid%rthratensw, &
grid%this_is_an_ideal_run, &
!BSINGH - For WRFCuP scheme(11/12/2013)
grid%cupflag,grid%cldfra_cup,grid%cldfratend_cup, & !wig, 18-Sep-2006
grid%shall, & !wig, 18-Sep-2006
Expand Down
1 change: 1 addition & 0 deletions main/depend.common
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,7 @@ module_physics_init.o : \
module_ra_cam.o \
$(PHYS_CU) $(PHYS_BL) \
module_ra_cam_support.o \
module_ra_clWRF_support.o \
module_ra_sw.o \
module_ra_gsfcsw.o \
module_ra_gfdleta.o \
Expand Down
38 changes: 37 additions & 1 deletion phys/module_physics_init.F
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ MODULE module_physics_init
#if ( defined( DM_PARALLEL ) && ( ! defined( STUBMPI ) ) )
USE module_dm, ONLY : wrf_dm_max_real
#endif
USE module_ra_clWRF_support

! USE module_ssib_veg , ONLY : init_module_ssib_veg !fds (SSiB constants)
!Local data for CAM's MG MP scheme
Expand All @@ -39,6 +40,7 @@ SUBROUTINE phy_init ( id, config_flags, DT, restart, zfull, zhalf, &
RUBLTEN,RVBLTEN,RTHBLTEN, &
RQVBLTEN,RQCBLTEN,RQIBLTEN, &
RTHRATEN,RTHRATENLW,RTHRATENSW, &
this_is_an_ideal_run, &
#if ( EM_CORE == 1 )
!BSINGH - For WRFCuP scheme(11/12/2013)
cupflag,cldfra_cup,cldfratend_cup, & !wig, 18-Sep-2006
Expand Down Expand Up @@ -308,7 +310,7 @@ SUBROUTINE phy_init ( id, config_flags, DT, restart, zfull, zhalf, &
INTEGER , INTENT(OUT) ,OPTIONAL :: nyear
REAL , INTENT(OUT) ,OPTIONAL :: nday
LOGICAL, INTENT(IN) :: start_of_simulation
LOGICAL, INTENT(IN) :: start_of_simulation, this_is_an_ideal_run
REAL, INTENT(IN) :: DT, p_top, DX, DY
REAL, DIMENSION(ims:ime,jms:jme), INTENT(INOUT), OPTIONAL :: DX2D, AREA2D
LOGICAL, INTENT(IN) :: restart
Expand Down Expand Up @@ -912,6 +914,11 @@ SUBROUTINE phy_init ( id, config_flags, DT, restart, zfull, zhalf, &
INTEGER, OPTIONAL :: irr_ph,irr_freq
!-----------------------------------------------------------------
! Climate GHG file read for radiation
REAL(KIND=8) :: co2dum,n2odum,ch4dum,f11dum,f12dum
CHARACTER(LEN=8) :: name
!-----------------------------------------------------------------
#if ( EM_CORE == 1 )
! Compute 2d grid distance and 2d grid cell area. For use with
Expand All @@ -928,6 +935,35 @@ SUBROUTINE phy_init ( id, config_flags, DT, restart, zfull, zhalf, &
end if
#endif
name = " "
IF ( ( config_flags%ghg_input .EQ. 1 ) .AND. &
( .NOT. this_is_an_ideal_run ) ) THEN
IF ( config_flags%ra_lw_physics .EQ. RRTMSCHEME ) THEN
name = "RRTM"
ELSE IF ( config_flags%ra_lw_physics .EQ. CAMLWSCHEME ) THEN
name = "CAM"
ELSE IF ( config_flags%ra_lw_physics .EQ. RRTMG_LWSCHEME ) THEN
name = "RRTMG"
ELSE IF ( config_flags%ra_lw_physics .EQ. RRTMG_LWSCHEME_FAST ) THEN
name = "RRTMG"
END IF
CALL read_CAMgases(julyr,float(julday),.true.,TRIM(name),co2dum,n2odum,ch4dum,f11dum,f12dum)
WRITE(message,*) 'GHG annual values from CAM trace gas file'
CALL wrf_message(TRIM(message))
WRITE(message,*) 'Year = ',julyr,', Julian day = ',julday
CALL wrf_message(TRIM(message))
WRITE(message,*) 'CO2 = ',co2dum,' volume mixing ratio'
CALL wrf_message(TRIM(message))
WRITE(message,*) 'N2O = ',n2odum,' volume mixing ratio'
CALL wrf_message(TRIM(message))
WRITE(message,*) 'CH4 = ',ch4dum,' volume mixing ratio'
CALL wrf_message(TRIM(message))
WRITE(message,*) 'CFC11 = ',f11dum,' volume mixing ratio'
CALL wrf_message(TRIM(message))
WRITE(message,*) 'CFC12 = ',f12dum,' volume mixing ratio'
CALL wrf_message(TRIM(message))
END IF
aercu_opt=config_flags%aercu_opt !PSH/TWG 06/10/16
aercu_fct=config_flags%aercu_fct !PSH/TWG 06/10/16
sf_urban_physics=config_flags%sf_urban_physics
Expand Down
Loading

0 comments on commit b511c70

Please sign in to comment.