From 3c861b04be307f0cb0ee2786f4cb9fc497dce008 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 29 Apr 2019 17:29:51 -0600 Subject: [PATCH] LW RRTMGP cloud-optics working. Also, RRTMGP cloud sampling has been implemented (in progress). --- physics/GFS_rrtmg_pre.F90 | 8 +- physics/rrtmgp_lw_cloud_optics.F90 | 13 +- physics/rrtmgp_lw_main.F90 | 151 ++++--- physics/rrtmgp_sw.xml | 623 +++++++++++++++++++++++++++++ physics/rrtmgp_sw_main.F90 | 7 + 5 files changed, 711 insertions(+), 91 deletions(-) create mode 100644 physics/rrtmgp_sw.xml diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index 9b8b4e82b..2e51e305f 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -707,6 +707,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input ! DJS2019: START ! Compute layer cloud fraction. clwmin = 0.0 + cldcov(:,:) = 0.0 if (.not. Model%lmfshal) then do k = 1, LMK do i = 1, IM @@ -749,9 +750,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input do k=1,lm k1 = k + kd do i=1,im - ! DJS2019: Tbd%phy_f3d(:,:,1) is mean layer temperature, not cloud amount cldcov(i,k1) = Tbd%phy_f3d(i,k,Model%indcld) - cldcov(i,k1) = tracer1(i,k,Model%ntclamt) effrl(i,k1) = Tbd%phy_f3d(i,k,2) effri(i,k1) = Tbd%phy_f3d(i,k,3) effrr(i,k1) = Tbd%phy_f3d(i,k,4) @@ -784,6 +783,11 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input write(58,*) "Model%lgfdlmprad: ",Model%lgfdlmprad write(58,*) "Model%lmfshal: ",Model%lmfshal write(58,*) "Model%lmfdeep2: ",Model%lmfdeep2 + do k = 1, LMK + do i = 1, IM + write(58,'(a19,2i8,f10.2)') " Cloud-cover: ",k,i,cldcov(i,k) + end do + enddo if (Model%imp_physics == 99 .or. Model%imp_physics == 10) then ! zhao/moorthi's prognostic cloud scheme ! or unified cloud and/or with MG microphysics diff --git a/physics/rrtmgp_lw_cloud_optics.F90 b/physics/rrtmgp_lw_cloud_optics.F90 index 7b8c5f6f5..4c69aa70b 100644 --- a/physics/rrtmgp_lw_cloud_optics.F90 +++ b/physics/rrtmgp_lw_cloud_optics.F90 @@ -573,7 +573,7 @@ subroutine rrtmgp_lw_cloud_optics(ncol, nlay, nBandsLW, cld_lwp, cld_ref_liq, cl cld_ref_snow ! Effective radius (snow-flake) (micron) ! Outputs - real(kind_phys),dimension(nBandsLW,ncol,nlay),intent(out) :: & + real(kind_phys),dimension(ncol,nlay,nBandsLW),intent(out) :: & tau_cld ! Local variables @@ -654,7 +654,7 @@ subroutine rrtmgp_lw_cloud_optics(ncol, nlay, nBandsLW, cld_lwp, cld_ref_liq, cl endif ! Cloud optical depth do ib = 1, nBandsLW - tau_cld(ib,ij,ik) = tau_ice(ib) + tau_liq(ib) + tau_rain + tau_snow + tau_cld(ij,ik,ib) = tau_ice(ib) + tau_liq(ib) + tau_rain + tau_snow enddo end do end do @@ -677,7 +677,8 @@ subroutine mcica_subcol_lw(ncol, nlay, ngpts, cld_frac, icseed, dzlyr, de_lgth, cld_frac, & ! Cloud-fraction dzlyr ! Layer thinkness (km) ! Outputs - real(kind_phys),dimension(ngpts,ncol,nlay),intent(out) :: & + !real(kind_phys),dimension(ncol,nlay,ngpts),intent(out) :: & + logical,dimension(ncol,nlay,ngpts),intent(out) :: & cld_frac_mcica ! Local variables type(random_stat) :: stat @@ -800,16 +801,16 @@ subroutine mcica_subcol_lw(ncol, nlay, ngpts, cld_frac, icseed, dzlyr, de_lgth, end select ! ################################################################################### - ! Generate subcolumn cloud mask (0/1 for clear/cloudy) + ! Generate subcolumn cloud mask (.false./.true. for clear/cloudy) ! ################################################################################### do k = 1, nlay tem1 = 1._kind_phys - cld_frac(icol,k) do n = 1, ngpts lcloudy(n,k) = cdfunc(n,k) >= tem1 if (lcloudy(n,k)) then - cld_frac_mcica(n,icol,k) = 1._kind_phys + cld_frac_mcica(icol,k,n) = .true. else - cld_frac_mcica(n,icol,k) = 0._kind_phys + cld_frac_mcica(icol,k,n) = .false. endif enddo enddo diff --git a/physics/rrtmgp_lw_main.F90 b/physics/rrtmgp_lw_main.F90 index 09a092510..b2935087d 100644 --- a/physics/rrtmgp_lw_main.F90 +++ b/physics/rrtmgp_lw_main.F90 @@ -10,6 +10,7 @@ module rrtmgp_lw use mo_rte_kind, only: wl use mo_heating_rates, only: compute_heating_rate use mo_cloud_optics, only: ty_cloud_optics + use mo_cloud_sampling, only: sampled_mask_max_ran, sampled_mask_exp_ran use machine, only: kind_phys use module_radlw_parameters, only: topflw_type, sfcflw_type, proflw_type use physparam, only: ilwcliq,isubclw,iovrlw,ilwrgas,icldflg,ilwrate @@ -46,11 +47,6 @@ module rrtmgp_lw nBandsLW, & ! Number of LW bands nrghice, & ! Number of ice roughness categories ipsdlw0 ! Initial see for McICA - real(kind_phys) :: & - re_ice_min, & ! Minimum ice particle size allowed by RRTGMP - re_ice_max, & ! Maximum ice particle size allowed by RRTGMP - re_liq_min, & ! Minimum liquid particle size allowed by RRTGMP - re_liq_max ! Maximum liquid particle size allowed by RRTGMP integer,allocatable,dimension(:) :: & ngb_LW ! Band index for each g-points @@ -204,7 +200,7 @@ subroutine rrtmgp_lw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) open(59,file='rrtmgp_aux_dump.txt',status='unknown') open(60,file='rrtmgp_aux_tautot.txt',status='unknown') - open(61,file='rrtmgp_aux_taucld.txt',status='unknown') + open(61,file='rrtmgp_lw_aux_taucld.txt',status='unknown') ! Initialize errmsg = '' @@ -684,6 +680,7 @@ subroutine rrtmgp_lw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) call MPI_BCAST(lut_extice, size(lut_extice), kind_phys, mpiroot, mpicomm, ierr) call MPI_BCAST(lut_ssaice, size(lut_ssaice), kind_phys, mpiroot, mpicomm, ierr) call MPI_BCAST(lut_asyice, size(lut_asyice), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims_cldy), size(band_lims_cldy), kind_phys, mpiroot, mpicomm, ierr) endif if (rrtmgp_lw_cld_phys .eq. 2) then call MPI_BCAST(pade_extliq, size(pade_extliq), kind_phys, mpiroot, mpicomm, ierr) @@ -698,31 +695,27 @@ subroutine rrtmgp_lw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) call MPI_BCAST(pade_sizereg_extice), size(pade_sizereg_extice), kind_phys, mpiroot, mpicomm, ierr) call MPI_BCAST(pade_sizereg_ssaice), size(pade_sizereg_ssaice), kind_phys, mpiroot, mpicomm, ierr) call MPI_BCAST(pade_sizereg_asyice), size(pade_sizereg_asyice), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims_cldy), size(band_lims_cldy), kind_phys, mpiroot, mpicomm, ierr) endif - call MPI_BCAST(band_lims_cldy), size(band_lims_cldy), kind_phys, mpiroot, mpicomm, ierr) #endif ! Load tables data for RRTGMP cloud-optics if (rrtmgp_lw_cld_phys .eq. 1) then print*,'RRTMGP_INIT: ',shape(lut_extice) + call check_error_msg(kdist_lw_cldy%set_ice_roughness(nrghice)) call check_error_msg(kdist_lw_cldy%load(band_lims_cldy, radliq_lwr, radliq_upr, & radliq_fac, radice_lwr, radice_upr, radice_fac, lut_extliq, lut_ssaliq, & lut_asyliq, lut_extice, lut_ssaice, lut_asyice)) endif if (rrtmgp_lw_cld_phys .eq. 2) then + print*,'RRTMGP_INIT: ',shape(pade_extice) + call check_error_msg(kdist_lw_cldy%set_ice_roughness(nrghice)) call check_error_msg(kdist_lw_cldy%load(band_lims_cldy, pade_extliq, & pade_ssaliq, pade_asyliq, pade_extice, pade_ssaice, pade_asyice, & pade_sizereg_extliq, pade_sizereg_ssaliq, pade_sizereg_asyliq, & pade_sizereg_extice, pade_sizereg_ssaice, pade_sizereg_asyice)) endif - if ((rrtmgp_lw_cld_phys .gt. 0)) then - re_ice_min = radice_lwr - re_ice_max = radice_upr - re_liq_min = radliq_lwr - re_liq_max = radliq_upr - endif - end subroutine rrtmgp_lw_init ! ######################################################################################### @@ -882,19 +875,22 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr real(kind_phys), dimension(ncol,nlay) :: & vmr_o3, vmr_h2o, cldfrac2, thetaTendClrSky,thetaTendAllSky, cld_ref_liq2, & cld_ref_ice2,tau_snow,tau_rain,coldry,tem0,colamt + real(kind_phys), dimension(ncol,nlay,nBandsLW) :: & + tau_cld + real(kind_phys), dimension(nGptsLW,nlay,ncol) :: & + ipseeds logical,dimension(ncol,nlay) :: & liqmask,icemask - real(kind_phys), dimension(nGptsLW,ncol,nlay) :: & + logical, dimension(ncol,nlay,nGptsLW) :: & cldfracMCICA - real(kind_phys), dimension(:,:,:), allocatable :: & - tau_cld,tau_gpt logical :: & top_at_1=.false. ! RTE+RRTMGP classes type(ty_optical_props_1scl) :: & optical_props_clr, & ! Optical properties for gaseous atmosphere - optical_props_cldy, & ! Optical properties for clouds + optical_props_cldy, & ! Optical properties for clouds (by band) + optical_props_mcica,& ! Optical properties for clouds (sampled) optical_props_aer ! Optical properties for aerosols type(ty_source_func_lw) :: & @@ -968,10 +964,6 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr p_lev2=p_lev p_lev2(:,nlay+1) = kdist_lw_clr%get_press_min()/100. - ! Compute ice/liquid cloud masks, needed by rrtmgp_cloud_optics - liqmask = (cldfrac .gt. 0 .and. cld_lwp .gt. 0) - icemask = (cldfrac .gt. 0 .and. cld_iwp .gt. 0) - ! Conpute diffusivity angle adjustments. ! First need to compute precipitable water in each column tem0 = (1. - vmr_h2o)*amd + vmr_h2o*amw @@ -1001,25 +993,29 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr enddo enddo - ! RRTMGP cloud_optics expects particle size to be in a certain range. bound here - cld_ref_ice2 = cld_ref_ice - where(cld_ref_ice2 .gt. re_ice_max) cld_ref_ice2=re_ice_max - where(cld_ref_ice2 .lt. re_ice_min) cld_ref_ice2=re_ice_min - cld_ref_liq2 = cld_ref_liq - where(cld_ref_liq2 .gt. re_liq_max) cld_ref_liq2=re_liq_max - where(cld_ref_liq2 .lt. re_liq_min) cld_ref_liq2=re_liq_min + ! Compute ice/liquid cloud masks, needed by rrtmgp_cloud_optics + liqmask = (cldfrac .gt. 0 .and. cld_lwp .gt. 0) + icemask = (cldfrac .gt. 0 .and. cld_iwp .gt. 0) - allocate(tau_cld(nBandsLW, ncol, nlay)) - allocate(tau_gpt(ncol, nlay, nGptsLW)) + ! RRTMGP cloud_optics expects particle size to be in a certain range. bound here + if (rrtmgp_lw_cld_phys .gt. 0) then + cld_ref_ice2 = cld_ref_ice + where(cld_ref_ice2 .gt. kdist_lw_cldy%get_max_radius_ice()) cld_ref_ice2=kdist_lw_cldy%get_max_radius_ice() + where(cld_ref_ice2 .lt. kdist_lw_cldy%get_min_radius_ice()) cld_ref_ice2=kdist_lw_cldy%get_min_radius_ice() + cld_ref_liq2 = cld_ref_liq + where(cld_ref_liq2 .gt. kdist_lw_cldy%get_max_radius_liq()) cld_ref_liq2=kdist_lw_cldy%get_max_radius_liq() + where(cld_ref_liq2 .lt. kdist_lw_cldy%get_min_radius_liq()) cld_ref_liq2=kdist_lw_cldy%get_min_radius_liq() + endif ! ####################################################################################### ! Call RRTMGP ! ####################################################################################### ! Allocate space for source functions and gas optical properties - call check_error_msg(sources%alloc( ncol, nlay, kdist_lw_clr)) - call check_error_msg(optical_props_clr%alloc_1scl( ncol, nlay, kdist_lw_clr)) - call check_error_msg(optical_props_cldy%alloc_1scl(ncol, nlay, kdist_lw_clr)) - call check_error_msg(optical_props_aer%alloc_1scl( ncol, nlay, kdist_lw_clr)) + call check_error_msg(sources%alloc( ncol, nlay, kdist_lw_clr)) + call check_error_msg(optical_props_clr%alloc_1scl( ncol, nlay, kdist_lw_clr)) + call check_error_msg(optical_props_cldy%alloc_1scl( ncol, nlay, kdist_lw_cldy)) + call check_error_msg(optical_props_mcica%alloc_1scl(ncol, nlay, kdist_lw_clr)) + call check_error_msg(optical_props_aer%alloc_1scl( ncol, nlay, kdist_lw_clr)) ! Initialize RRTMGP files fluxAllSky%flux_up => flux_up_allSky @@ -1043,14 +1039,14 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr ! 1b) Compute the optical properties of the atmosphere and the Planck source functions ! from pressures, temperatures, and gas concentrations... print*,'Clear-Sky(LW): Optics' - call check_error_msg(kdist_lw_clr%gas_optics( & - p_lay(1:ncol,1:nlay)*100., & - p_lev2(1:ncol,1:nlay+1)*100., & - t_lay(1:ncol,1:nlay), & - skt(1:ncol), & - gas_concs_lw, & - optical_props_clr, & - sources, & + call check_error_msg(kdist_lw_clr%gas_optics( & + p_lay(1:ncol,1:nlay)*100., & + p_lev2(1:ncol,1:nlay+1)*100., & + t_lay(1:ncol,1:nlay), & + skt(1:ncol), & + gas_concs_lw, & + optical_props_clr, & + sources, & tlev = t_lev(1:ncol,1:nlay+1))) ! 1c) Add contribution from aerosols. Also, apply diffusivity angle @@ -1058,8 +1054,8 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr do iCol=1,nCol do iGpt=1,nGptsLW iBand = kdist_lw_clr%convert_gpt2band(iGpt) - optical_props_clr%tau(iCol,1:nlay,iGpt) = optical_props_clr%tau(iCol,1:nlay,iGpt) * secdiff(iBand,iCol) - optical_props_aer%tau(iCol,1:nlay,iGpt) = tau_aer(iCol,1:nlay,iBand) * (1. - ssa_aer(iCol,1:nlay,iBand)) * secdiff(iBand,iCol) + optical_props_clr%tau(iCol,1:nlay,iGpt) = optical_props_clr%tau(iCol,1:nlay,iGpt)! * secdiff(iBand,iCol) + optical_props_aer%tau(iCol,1:nlay,iGpt) = tau_aer(iCol,1:nlay,iBand) * (1. - ssa_aer(iCol,1:nlay,iBand))! * secdiff(iBand,iCol) enddo enddo call check_error_msg(optical_props_aer%increment(optical_props_clr)) @@ -1084,10 +1080,10 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr ! ####################################################################################### ! 2) All-sky fluxes ! ####################################################################################### - ! 2a) Compute in-cloud optics + ! 2a) Compute in-cloud radiative properties print*,'All-Sky(LW): Optics ' - tau_cld(:,:,:) = 0. if (any(cldfrac .gt. 0)) then + ! 2a.i) RRTMG cloud optics ! If using RRTMG cloud-physics. Model can provide either cloud-optics (cld_od) or ! cloud-properties by type (cloud LWP,snow effective radius, etc...) if (rrtmgp_lw_cld_phys .eq. 0) then @@ -1097,84 +1093,73 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr print*,' Using all types too...' call rrtmgp_lw_cloud_optics(ncol, nlay, nBandsLW, cld_lwp, cld_ref_liq, cld_iwp, & cld_ref_ice, cld_rwp, cld_ref_rain, cld_swp, cld_ref_snow, cldfrac, tau_cld) + optical_props_cldy%tau = tau_cld else ! Cloud-optical depth provided. do iCol=1,ncol do iLay=1,nlay if (cldfrac(iCol,iLay) .gt. cldmin) then - tau_cld(:,iCol,iLay) = cld_od(iCol,iLay)*secdiff(:,iCol) + optical_props_cldy%tau(iCol,iLay,:) = cld_od(iCol,iLay)*secdiff(:,iCol) else - tau_cld(:,iCol,iLay) = 0. + optical_props_cldy%tau(iCol,iLay,:) = 0._kind_phys endif end do end do endif endif - ! If using RRTMGP cloud-physics + ! 2a.ii) Use RRTMGP cloud-optics. if (rrtmgp_lw_cld_phys .gt. 0) then - print*,'Using RRTMGP cloud-physics' + print*,'Using RRTMGP cloud-physics',optical_props_cldy%get_ngpt(),optical_props_cldy%get_nband() call check_error_msg(kdist_lw_cldy%cloud_optics(ncol, nlay, nBandsLW, nrghice, & liqmask, icemask, cld_lwp, cld_iwp, cld_ref_liq2, cld_ref_ice2, optical_props_cldy)) - ! Add in contributions from snow and rain - do iCol=1,ncol - do iLay=1,nlay - if (cldfrac(iCol,iLay) .gt. cldmin) then - ! Rain optical-depth - tau_rain(iCol,iLay) = absrain*cld_rwp(iCol,iLay) - ! Snow optical-depth - if (cld_swp(iCol,iLay) .gt. 0. .and. cld_ref_snow(iCol,iLay) .gt. 10.) then - tau_snow(iCol,iLay) = abssnow0*1.05756*cld_swp(iCol,iLay)/cld_ref_snow(iCol,iLay) - else - tau_snow(iCol,iLay) = 0. - endif - endif - enddo - enddo - do iBand=1,nBandsLW - tau_cld(iBand,:,:) = optical_props_cldy%tau(iBand,:,:)+tau_snow+tau_rain - enddo + ! Add in contributions from snow and rain (Need to revisit) + end if endif - ! 2b) Call McICA to generate subcolumns. - tau_gpt(:,:,:) = 0. + ! 2c) Call McICA to generate subcolumns. if (isubclw .gt. 0) then print*,'All-Sky(LW): McICA' cldfrac2 = merge(cldfrac,0.,cldfrac .gt. cldmin) - call mcica_subcol_lw(ncol, nlay, nGptsLW, cldfrac2, ipseed, dzlyr, de_lgth, cldfracMCICA) + !call mcica_subcol_lw(ncol, nlay, nGptsLW, cldfrac2, ipseed, dzlyr, de_lgth, cldfracMCICA) + ipseeds(:,:,:) = ipseed(1) + !select case ( iovrlw ) + !case(2) + call check_error_msg(sampled_mask_max_ran(ipseeds,cldfrac2,cldfracMCICA)) + !end select + ! Map band optical depth to each g-point using McICA do iCol=1,ncol do iLay=1,nLay do iGpt=1,nGptsLW iBand = kdist_lw_clr%convert_gpt2band(iGpt) - if (cldfracMCICA(iGpt,iCol,iLay) .gt. 0.) then - tau_gpt(iCol,iLay,iGpt) = tau_cld(iband,iCol,iLay)*secdiff(iBand,iCol) + if (cldfracMCICA(iCol,iLay,iGpt)) then + optical_props_mcica%tau(iCol,iLay,iGpt) = optical_props_cldy%tau(iCol,iLay,iBand)!*secdiff(iBand,iCol) else - tau_gpt(iCol,iLay,iGpt) = 0. + optical_props_mcica%tau(iCol,iLay,iGpt) = 0._kind_phys endif enddo enddo enddo endif - optical_props_cldy%tau = tau_gpt - ! 2c) Add cloud contribution from the gaseous (clear-sky) atmosphere. + ! 2d) Add cloud contribution from the gaseous (clear-sky) atmosphere. print*,'All-Sky(LW): Increment' - call check_error_msg(optical_props_clr%increment(optical_props_cldy)) + call check_error_msg(optical_props_clr%increment(optical_props_mcica)) - ! 2d) Compute broadband fluxes + ! 2e) Compute broadband fluxes print*,'All-Sky(LW): Fluxes' call check_error_msg(rte_lw( & - optical_props_cldy, & + optical_props_mcica, & top_at_1, & sources, & semiss, & fluxAllSky)) - ! 2e) Compute heating rates + ! 2f) Compute heating rates print*,'All-Sky(LW): Heating-rates' call check_error_msg(compute_heating_rate( & fluxAllSky%flux_up, & @@ -1191,7 +1176,7 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr sum(fluxClrSky%flux_dn(1,iLay:iLay+1))/2.,sum(fluxAllSky%flux_up(1,iLay:iLay+1))/2.,& sum(fluxAllSky%flux_dn(1,iLay:iLay+1))/2. write(60,*) optical_props_clr%tau(1,iLay,:) - write(61,'(16f12.3)') tau_cld(:,1,iLay)!*secdiff(:,1) + write(61,'(16f12.3)') optical_props_cldy%tau(1,iLay,:)!*secdiff(:,1) enddo ! ####################################################################################### ! Copy fluxes from RRTGMP types into model radiation types. @@ -1203,7 +1188,7 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr sfcflx%upfx0 = fluxClrSky%flux_up(:,1) sfcflx%dnfxc = fluxAllSky%flux_dn(:,1) sfcflx%dnfx0 = fluxClrSky%flux_dn(:,1) - cldtau = tau_cld(7,:,:) + cldtau = optical_props_cldy%tau(:,:,7) hlwc = thetaTendAllSky ! Optional output diff --git a/physics/rrtmgp_sw.xml b/physics/rrtmgp_sw.xml new file mode 100644 index 000000000..392894a39 --- /dev/null +++ b/physics/rrtmgp_sw.xml @@ -0,0 +1,623 @@ + + + + + + air_pressure_at_layer_for_radiation_in_hPa + air pressure layer + hPa + p_lay + real + (:,:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + air_pressure_at_interface_for_radiation_in_hPa + air pressure level + hPa + p_lev + real + (:,:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + air_temperature_at_layer_for_radiation + air temperature layer + K + t_lay + real + (:,:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + air_temperature_at_interface_for_radiation + air temperature level + K + t_lev + real + (:,:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + water_vapor_specific_humidity_at_layer_for_radiation + specific humidity layer + kg kg-1 + q_lay + real + (:,:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + ozone_concentration_at_layer_for_radiation + ozone concentration layer + kg kg-1 + o3_lay + real + (:,:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + volume_mixing_ratio_co2 + volume mixing ratio co2 + kg kg-1 + vmr_co2 + real + (:,:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + volume_mixing_ratio_n2o + volume mixing ratio no2 + kg kg-1 + vmr_n2o + real + (:,:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + volume_mixing_ratio_ch4 + volume mixing ratio ch4 + kg kg-1 + vmr_ch4 + real + (:,:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + volume_mixing_ratio_o2 + volume mixing ratio o2 + kg kg-1 + vmr_o2 + real + (:,:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + volume_mixing_ratio_co + volume mixing ratio co + kg kg-1 + vmr_co + real + (:,:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + volume_mixing_ratio_cfc11 + volume mixing ratio cfc11 + kg kg-1 + vmr_cfc11 + real + (:,:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + volume_mixing_ratio_cfc12 + volume mixing ratio cfc12 + kg kg-1 + vmr_cfc12 + real + (:,:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + volume_mixing_ratio_cfc22 + volume mixing ratio cfc22 + kg kg-1 + vmr_cfc22 + real + (:,:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + volume_mixing_ratio_ccl4 + volume mixing ratio ccl4 + kg kg-1 + vmr_ccl4 + real + (:,:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + seed_random_numbers_sw + seed for random number generation for shortwave radiation + none + icseed + integer + (:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + aerosol_optical_depth_for_shortwave_bands_01-16 + aerosol optical depth for shortwave bands 01-16 + none + tau_aer + real + (:,:,:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + aerosol_single_scattering_albedo_for_shortwave_bands_01-16 + aerosol single scattering albedo for shortwave bands 01-16 + frac + ssa_aer + real + (:,:,:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + aerosol_asymmetry_parameter_for_shortwave_bands_01-16 + aerosol asymmetry paramter for shortwave bands 01-16 + none + asy_aer + real + (:,:,:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + surface_albedo_due_to_near_IR_direct + surface albedo due to near IR direct beam + frac + sfcalb_nir_dir + real + (:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + surface_albedo_due_to_near_IR_diffused + surface albedo due to near IR diffused beam + frac + sfcalb_nir_dif + real + (:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + surface_albedo_due_to_UV_and_VIS_direct + surface albedo due to UV+VIS direct beam + frac + sfcalb_uvis_dir + real + (:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + surface_albedo_due_to_UV_and_VIS_diffused + surface albedo due to UV+VIS diffused beam + frac + sfcalb_uvis_dif + real + (:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + layer_thickness_for_radiation + layer thickness + km + dzlyr + real + (:,:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + layer_pressure_thickness_for_radiation + layer pressure thickness + hPa + delpin + real + (:,:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + cloud_decorrelation_length + cloud decorrelation length + km + de_lgth + real + (:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + cosine_of_zenith_angle + cosine of the solar zenit angle + none + cossza + real + (:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + solar_constant + solar constant + W m-2 + solcon + real + + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + daytime_points_dimension + daytime points dimension + nday + nday + integer + + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + daytime_points + daytime points + index + idxday + integer + (:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + horizontal_loop_extent + horizontal dimension + count + ncol + integer + + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + adjusted_vertical_layer_dimension_for_radiation + number of vertical layers for radiation + count + nlay + integer + + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + flag_print + flag to print + flag + lprnt + logical + + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + total_cloud_fraction + total cloud fraction + frac + cldfrac + real + (:,:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + flag_to_calc_sw + flag to calculate SW irradiances + flag + lsswr + logical + + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step + shortwave total sky heating rate + K s-1 + hswc + real + (:,:) + inout + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + sw_fluxes_top_atmosphere + shortwave total sky fluxes at the top of the atm + W m-2 + topflx + topfsw_type + (:) + inout + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + sw_fluxes_sfc + shortwave total sky fluxes at the Earth surface + W m-2 + sfcflx + sfcfsw_type + (:) + inout + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + cloud_optical_depth_layers_at_0.55mu_band + approx .55mu band layer cloud optical depth + none + cldtau + real + (:,:) + inout + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step + shortwave clear sky heating rate + K s-1 + hsw0 + real + (:,:) + inout + T + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + sw_heating_rate_spectral + shortwave total sky heating rate (spectral) + K s-1 + hswb + real + (:,:,:) + inout + T + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + sw_fluxes + sw fluxes total sky / csk and up / down at levels + W m-2 + flxprf + profsw_type + (:,:) + inout + T + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + components_of_surface_downward_shortwave_fluxes + derived type for special components of surface downward shortwave fluxes + W m-2 + fdncmp + cmpfsw_type + (:) + inout + T + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + cloud_liquid_water_path + cloud liquid water path + g m-2 + cld_lwp + real + (:,:) + in + T + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + mean_effective_radius_for_liquid_cloud + mean effective radius for liquid cloud + micron + cld_ref_liq + real + (:,:) + in + T + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + cloud_ice_water_path + cloud ice water path + g m-2 + cld_iwp + real + (:,:) + in + T + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + mean_effective_radius_for_ice_cloud + mean effective radius for ice cloud + micron + cld_ref_ice + real + (:,:) + in + T + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + cloud_rain_water_path + cloud rain water path + g m-2 + cld_rwp + real + (:,:) + in + T + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + mean_effective_radius_for_rain_drop + mean effective radius for rain drop + micron + cld_ref_rain + real + (:,:) + in + T + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + cloud_snow_water_path + cloud snow water path + g m-2 + cld_swp + real + (:,:) + in + T + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + mean_effective_radius_for_snow_flake + mean effective radius for snow flake + micron + cld_ref_snow + real + (:,:) + in + T + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + cloud_optical_depth + cloud optical depth + none + cld_od + real + (:,:) + in + T + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + cloud_single_scattering_albedo + cloud single scattering albedo + frac + cld_ssa + real + (:,:) + in + T + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + cloud_asymmetry_parameter + cloud asymmetry parameter + none + cld_asy + real + (:,:) + in + T + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + + diff --git a/physics/rrtmgp_sw_main.F90 b/physics/rrtmgp_sw_main.F90 index 53f1ae716..603e8b81f 100644 --- a/physics/rrtmgp_sw_main.F90 +++ b/physics/rrtmgp_sw_main.F90 @@ -873,6 +873,10 @@ subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr cld_swp(idxday,1:nLay), cld_ref_snow(idxday,1:nLay), & cldfrac(idxday,1:nLay), & tau_cld, ssa_cld, asy_cld) + write(70,*) 'rrtmgp_sw_cloud_optics' + do iLay=1,nLay + write(70,'(i10,5f12.7)') iLay,cld_lwp(idxday,iLay),cld_ref_liq(idxday,iLay),cld_iwp(idxday,iLay),cld_ref_ice(idxday,iLay),cldfrac(idxday,iLay) + enddo else ! Cloud-optical depth, single scattering albedo, and asymmetry parameter provided. do iDay=1,nDay @@ -896,8 +900,11 @@ subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr do iDay=1,nDay do iLay=1,nlay write(69,'(a5,i2,4f12.3)') '',iLay,p_lay(idxday(iDay),iLay),sum(optical_props_clr%tau(iDay,iLay,:)) + write(70,'(a5,2i8)') 'TAU: ',iDay,iLay write(70,'(16f12.3)') tau_cld(:,1,iLay) + write(70,'(a5,2i8)') 'SSA: ' write(70,'(16f12.3)') ssa_cld(:,1,iLay) + write(70,'(a5,2i8)') 'ASY: ' write(70,'(16f12.3)') asy_cld(:,1,iLay) enddo enddo