Skip to content

Commit b511c70

Browse files
authored
Run-time option for climate GHG for radiation (wrf-model#1625)
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" wrf-model#1611. ISSUE: CLWRF tracer gases are not used in RRTMG shortwave code Fixes wrf-model#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](wrf-model#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.
1 parent 8194c66 commit b511c70

20 files changed

+368
-430
lines changed

Makefile

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -546,9 +546,15 @@ em_real : wrf
546546
ln -sf ../../run/CAM_AEROPT_DATA . ; \
547547
ln -sf ../../run/CAMtr_volume_mixing_ratio.RCP4.5 . ; \
548548
ln -sf ../../run/CAMtr_volume_mixing_ratio.RCP6 . ; \
549-
ln -sf ../../run/CAMtr_volume_mixing_ratio.RCP8.5 CAMtr_volume_mixing_ratio ; \
549+
ln -sf ../../run/CAMtr_volume_mixing_ratio.RCP8.5 . ; \
550550
ln -sf ../../run/CAMtr_volume_mixing_ratio.A1B . ; \
551551
ln -sf ../../run/CAMtr_volume_mixing_ratio.A2 . ; \
552+
ln -sf ../../run/CAMtr_volume_mixing_ratio.SSP119 . ; \
553+
ln -sf ../../run/CAMtr_volume_mixing_ratio.SSP126 . ; \
554+
ln -sf ../../run/CAMtr_volume_mixing_ratio.SSP245 . ; \
555+
ln -sf ../../run/CAMtr_volume_mixing_ratio.SSP245 CAMtr_volume_mixing_ratio ; \
556+
ln -sf ../../run/CAMtr_volume_mixing_ratio.SSP370 . ; \
557+
ln -sf ../../run/CAMtr_volume_mixing_ratio.SSP585 . ; \
552558
ln -sf ../../run/CLM_ALB_ICE_DFS_DATA . ; \
553559
ln -sf ../../run/CLM_ALB_ICE_DRC_DATA . ; \
554560
ln -sf ../../run/CLM_ASM_ICE_DFS_DATA . ; \
@@ -611,9 +617,15 @@ em_real : wrf
611617
ln -sf ../../run/CAM_AEROPT_DATA . ; \
612618
ln -sf ../../run/CAMtr_volume_mixing_ratio.RCP4.5 . ; \
613619
ln -sf ../../run/CAMtr_volume_mixing_ratio.RCP6 . ; \
614-
ln -sf ../../run/CAMtr_volume_mixing_ratio.RCP8.5 CAMtr_volume_mixing_ratio ; \
620+
ln -sf ../../run/CAMtr_volume_mixing_ratio.RCP8.5 . ; \
615621
ln -sf ../../run/CAMtr_volume_mixing_ratio.A1B . ; \
616622
ln -sf ../../run/CAMtr_volume_mixing_ratio.A2 . ; \
623+
ln -sf ../../run/CAMtr_volume_mixing_ratio.SSP119 . ; \
624+
ln -sf ../../run/CAMtr_volume_mixing_ratio.SSP126 . ; \
625+
ln -sf ../../run/CAMtr_volume_mixing_ratio.SSP245 . ; \
626+
ln -sf ../../run/CAMtr_volume_mixing_ratio.SSP245 CAMtr_volume_mixing_ratio ; \
627+
ln -sf ../../run/CAMtr_volume_mixing_ratio.SSP370 . ; \
628+
ln -sf ../../run/CAMtr_volume_mixing_ratio.SSP585 . ; \
617629
ln -sf ../../run/CLM_ALB_ICE_DFS_DATA . ; \
618630
ln -sf ../../run/CLM_ALB_ICE_DRC_DATA . ; \
619631
ln -sf ../../run/CLM_ASM_ICE_DFS_DATA . ; \

Registry/Registry.EM_COMMON

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2400,6 +2400,7 @@ rconfig integer compute_radar_ref derived 1 0
24002400
rconfig integer ra_lw_physics namelist,physics max_domains -1 rh "ra_lw_physics" "" ""
24012401
rconfig integer ra_sw_physics namelist,physics max_domains -1 rh "ra_sw_physics" "" ""
24022402
rconfig integer ra_sw_eclipse namelist,physics 1 0 rh "ra_sw_eclipse" "0/1 flag: 1=turn eclipse on" ""
2403+
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"
24032404
rconfig real radt namelist,physics max_domains 0 h "RADT" "" ""
24042405
rconfig real naer namelist,physics max_domains 1e9 rh "NAER" "" ""
24052406
rconfig integer sf_sfclay_physics namelist,physics max_domains -1 rh "sf_sfclay_physics" "" ""

clean

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ if ( "$arg" == '-a' || "$arg" == '-aa' ) then
5757
*/CCN_ACTIVATE.BIN \
5858
*/CAMtr_volume_mixing_ratio.RCP4.5 */CAMtr_volume_mixing_ratio.RCP6 */CAMtr_volume_mixing_ratio.RCP8.5 \
5959
*/CAMtr_volume_mixing_ratio.A1B */CAMtr_volume_mixing_ratio.A2 */CAMtr_volume_mixing_ratio \
60+
*/CAMtr_volume_mixing_ratio.SSP119 */CAMtr_volume_mixing_ratio.SSP126 \
61+
*/CAMtr_volume_mixing_ratio.SSP245 */CAMtr_volume_mixing_ratio.SSP370 \
62+
*/CAMtr_volume_mixing_ratio.SSP585 \
6063
*/CLM_*DATA */RRTMG_LW_DATA */RRTMG_SW_DATA \
6164
*/p3_lookup* */BROADBAND_CLOUD_GODDARD.bin \
6265
*/ozone.formatted */ozone_lat.formatted */ozone_plev.formatted \

dyn_em/module_first_rk_step_part1.F

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ SUBROUTINE first_rk_step_part1 ( grid , config_flags &
438438
& ,progn=config_flags%progn &
439439
#endif
440440
& ,slope_rad=config_flags%slope_rad,topo_shading=config_flags%topo_shading &
441-
& ,shadowmask=grid%shadowmask &
441+
& ,shadowmask=grid%shadowmask,ghg_input=config_flags%ghg_input &
442442
& ,ht=grid%ht,dx=grid%dx,dy=grid%dy,dx2d=grid%dx2d,area2d=grid%area2d &
443443
& ,diffuse_frac=grid%diffuse_frac &
444444
& ,obscur=grid%ECOBSC, mask=grid%ECMASK &

dyn_em/start_em.F

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,6 +1025,7 @@ SUBROUTINE start_domain_em ( grid, allowed_to_read &
10251025
grid%rublten,grid%rvblten,grid%rthblten, &
10261026
grid%rqvblten,grid%rqcblten,grid%rqiblten, &
10271027
grid%rthraten,grid%rthratenlw,grid%rthratensw, &
1028+
grid%this_is_an_ideal_run, &
10281029
!BSINGH - For WRFCuP scheme(11/12/2013)
10291030
grid%cupflag,grid%cldfra_cup,grid%cldfratend_cup, & !wig, 18-Sep-2006
10301031
grid%shall, & !wig, 18-Sep-2006

main/depend.common

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,7 @@ module_physics_init.o : \
516516
module_ra_cam.o \
517517
$(PHYS_CU) $(PHYS_BL) \
518518
module_ra_cam_support.o \
519+
module_ra_clWRF_support.o \
519520
module_ra_sw.o \
520521
module_ra_gsfcsw.o \
521522
module_ra_gfdleta.o \

phys/module_physics_init.F

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ MODULE module_physics_init
1616
#if ( defined( DM_PARALLEL ) && ( ! defined( STUBMPI ) ) )
1717
USE module_dm, ONLY : wrf_dm_max_real
1818
#endif
19+
USE module_ra_clWRF_support
1920

2021
! USE module_ssib_veg , ONLY : init_module_ssib_veg !fds (SSiB constants)
2122
!Local data for CAM's MG MP scheme
@@ -39,6 +40,7 @@ SUBROUTINE phy_init ( id, config_flags, DT, restart, zfull, zhalf, &
3940
RUBLTEN,RVBLTEN,RTHBLTEN, &
4041
RQVBLTEN,RQCBLTEN,RQIBLTEN, &
4142
RTHRATEN,RTHRATENLW,RTHRATENSW, &
43+
this_is_an_ideal_run, &
4244
#if ( EM_CORE == 1 )
4345
!BSINGH - For WRFCuP scheme(11/12/2013)
4446
cupflag,cldfra_cup,cldfratend_cup, & !wig, 18-Sep-2006
@@ -308,7 +310,7 @@ SUBROUTINE phy_init ( id, config_flags, DT, restart, zfull, zhalf, &
308310
INTEGER , INTENT(OUT) ,OPTIONAL :: nyear
309311
REAL , INTENT(OUT) ,OPTIONAL :: nday
310312
311-
LOGICAL, INTENT(IN) :: start_of_simulation
313+
LOGICAL, INTENT(IN) :: start_of_simulation, this_is_an_ideal_run
312314
REAL, INTENT(IN) :: DT, p_top, DX, DY
313315
REAL, DIMENSION(ims:ime,jms:jme), INTENT(INOUT), OPTIONAL :: DX2D, AREA2D
314316
LOGICAL, INTENT(IN) :: restart
@@ -912,6 +914,11 @@ SUBROUTINE phy_init ( id, config_flags, DT, restart, zfull, zhalf, &
912914
INTEGER, OPTIONAL :: irr_ph,irr_freq
913915
!-----------------------------------------------------------------
914916
917+
! Climate GHG file read for radiation
918+
REAL(KIND=8) :: co2dum,n2odum,ch4dum,f11dum,f12dum
919+
CHARACTER(LEN=8) :: name
920+
!-----------------------------------------------------------------
921+
915922
#if ( EM_CORE == 1 )
916923
917924
! Compute 2d grid distance and 2d grid cell area. For use with
@@ -928,6 +935,35 @@ SUBROUTINE phy_init ( id, config_flags, DT, restart, zfull, zhalf, &
928935
end if
929936
#endif
930937
938+
name = " "
939+
IF ( ( config_flags%ghg_input .EQ. 1 ) .AND. &
940+
( .NOT. this_is_an_ideal_run ) ) THEN
941+
IF ( config_flags%ra_lw_physics .EQ. RRTMSCHEME ) THEN
942+
name = "RRTM"
943+
ELSE IF ( config_flags%ra_lw_physics .EQ. CAMLWSCHEME ) THEN
944+
name = "CAM"
945+
ELSE IF ( config_flags%ra_lw_physics .EQ. RRTMG_LWSCHEME ) THEN
946+
name = "RRTMG"
947+
ELSE IF ( config_flags%ra_lw_physics .EQ. RRTMG_LWSCHEME_FAST ) THEN
948+
name = "RRTMG"
949+
END IF
950+
CALL read_CAMgases(julyr,float(julday),.true.,TRIM(name),co2dum,n2odum,ch4dum,f11dum,f12dum)
951+
WRITE(message,*) 'GHG annual values from CAM trace gas file'
952+
CALL wrf_message(TRIM(message))
953+
WRITE(message,*) 'Year = ',julyr,', Julian day = ',julday
954+
CALL wrf_message(TRIM(message))
955+
WRITE(message,*) 'CO2 = ',co2dum,' volume mixing ratio'
956+
CALL wrf_message(TRIM(message))
957+
WRITE(message,*) 'N2O = ',n2odum,' volume mixing ratio'
958+
CALL wrf_message(TRIM(message))
959+
WRITE(message,*) 'CH4 = ',ch4dum,' volume mixing ratio'
960+
CALL wrf_message(TRIM(message))
961+
WRITE(message,*) 'CFC11 = ',f11dum,' volume mixing ratio'
962+
CALL wrf_message(TRIM(message))
963+
WRITE(message,*) 'CFC12 = ',f12dum,' volume mixing ratio'
964+
CALL wrf_message(TRIM(message))
965+
END IF
966+
931967
aercu_opt=config_flags%aercu_opt !PSH/TWG 06/10/16
932968
aercu_fct=config_flags%aercu_fct !PSH/TWG 06/10/16
933969
sf_urban_physics=config_flags%sf_urban_physics

0 commit comments

Comments
 (0)