From 9a47ad3fe56cdc479d644df6f1d8a9dc51a468c9 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 12 Dec 2019 14:19:48 -0700 Subject: [PATCH] Added aerosol and cloud-sampling schemes. --- physics/GFS_rrtmgp_lw_pre.F90 | 24 +--- physics/GFS_rrtmgp_lw_pre.meta | 18 --- physics/GFS_rrtmgp_pre.F90 | 44 +++---- physics/GFS_rrtmgp_sw_pre.F90 | 37 +----- physics/GFS_rrtmgp_sw_pre.meta | 17 --- physics/rrtmgp_lw_aerosol_optics.F90 | 97 ++++++++++++++ physics/rrtmgp_lw_aerosol_optics.meta | 166 +++++++++++++++++++++++ physics/rrtmgp_lw_cloud_optics.F90 | 80 ++--------- physics/rrtmgp_lw_cloud_optics.meta | 37 +----- physics/rrtmgp_lw_cloud_sampling.F90 | 112 ++++++++++++++++ physics/rrtmgp_lw_cloud_sampling.meta | 93 +++++++++++++ physics/rrtmgp_sw_aerosol_optics.F90 | 115 ++++++++++++++++ physics/rrtmgp_sw_aerosol_optics.meta | 182 ++++++++++++++++++++++++++ physics/rrtmgp_sw_cloud_optics.F90 | 83 ++---------- physics/rrtmgp_sw_cloud_optics.meta | 37 +----- physics/rrtmgp_sw_cloud_sampling.F90 | 119 +++++++++++++++++ physics/rrtmgp_sw_cloud_sampling.meta | 109 +++++++++++++++ 17 files changed, 1039 insertions(+), 331 deletions(-) create mode 100644 physics/rrtmgp_lw_aerosol_optics.F90 create mode 100644 physics/rrtmgp_lw_aerosol_optics.meta create mode 100644 physics/rrtmgp_lw_cloud_sampling.F90 create mode 100644 physics/rrtmgp_lw_cloud_sampling.meta create mode 100644 physics/rrtmgp_sw_aerosol_optics.F90 create mode 100644 physics/rrtmgp_sw_aerosol_optics.meta create mode 100644 physics/rrtmgp_sw_cloud_sampling.F90 create mode 100644 physics/rrtmgp_sw_cloud_sampling.meta diff --git a/physics/GFS_rrtmgp_lw_pre.F90 b/physics/GFS_rrtmgp_lw_pre.F90 index 04c75ba5f..34f9e5b53 100644 --- a/physics/GFS_rrtmgp_lw_pre.F90 +++ b/physics/GFS_rrtmgp_lw_pre.F90 @@ -10,11 +10,6 @@ module GFS_rrtmgp_lw_pre GFS_radtend_type ! Radiation tendencies needed in physics use module_radiation_surface, only: & setemis ! Routine to compute surface-emissivity - use module_radiation_aerosols, only: & - NF_AESW, & ! Number of optical-fields in SW output (3=tau+g+omega) - NF_AELW, & ! Number of optical-fields in LW output (3=tau+g+omega) - setaer, & ! Routine to compute aerosol radiative properties (tau,g,omega) - NSPC1 ! Number of species for vertically integrated aerosol optical-depth use mo_gas_optics_rrtmgp, only: & ty_gas_optics_rrtmgp @@ -35,8 +30,7 @@ end subroutine GFS_rrtmgp_lw_pre_init !! \htmlinclude GFS_rrtmgp_lw_pre.html !! subroutine GFS_rrtmgp_lw_pre_run (Model, Grid, Sfcprop, Statein, ncol, p_lay, p_lev, & - tv_lay, relhum, tracer, lw_gas_props, Radtend, aerosolslw, aerodp, sfc_emiss_byband, & - errmsg, errflg) + tv_lay, relhum, tracer, lw_gas_props, Radtend, sfc_emiss_byband, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & @@ -63,10 +57,6 @@ subroutine GFS_rrtmgp_lw_pre_run (Model, Grid, Sfcprop, Statein, ncol, p_lay, ! Outputs type(GFS_radtend_type), intent(inout) :: & Radtend ! DDT: FV3-GFS radiation tendencies - real(kind_phys), dimension(ncol,Model%levs,lw_gas_props%get_nband(),NF_AELW), intent(out) ::& - aerosolslw ! Aerosol radiative properties in each SW band. - real(kind_phys), dimension(ncol,NSPC1), intent(inout) :: & - aerodp ! Vertical integrated optical depth for various aerosol species real(kind_phys), dimension(lw_gas_props%get_nband(),ncol), intent(out) :: & sfc_emiss_byband ! Surface emissivity in each band character(len=*), intent(out) :: & @@ -74,10 +64,6 @@ subroutine GFS_rrtmgp_lw_pre_run (Model, Grid, Sfcprop, Statein, ncol, p_lay, integer, intent(out) :: & errflg ! Error flag - ! Local - real(kind_phys), dimension(ncol, Model%levs, Model%rrtmgp_nBandsSW, NF_AESW) :: & - aerosolssw2 - ! Initialize CCPP error handling variables errmsg = '' errflg = 0 @@ -95,14 +81,6 @@ subroutine GFS_rrtmgp_lw_pre_run (Model, Grid, Sfcprop, Statein, ncol, p_lay, sfc_emiss_byband(iBand,1:NCOL) = Radtend%semis(1:NCOL) enddo - ! ####################################################################################### - ! Call module_radiation_aerosols::setaer(),to setup aerosols property profile - ! ####################################################################################### - call setaer(p_lev, p_lay, Statein%prslk(1:NCOL,:), tv_lay, relhum, & - Sfcprop%slmsk, tracer, Grid%xlon, Grid%xlat, ncol, Model%levs, Model%levs+1, & - .true., Model%lslwr, aerosolssw2, aerosolslw, aerodp) - - end subroutine GFS_rrtmgp_lw_pre_run ! ######################################################################################### diff --git a/physics/GFS_rrtmgp_lw_pre.meta b/physics/GFS_rrtmgp_lw_pre.meta index aed2b1a6c..78cdfa2d4 100644 --- a/physics/GFS_rrtmgp_lw_pre.meta +++ b/physics/GFS_rrtmgp_lw_pre.meta @@ -102,24 +102,6 @@ type = ty_gas_optics_rrtmgp intent = in optional = F -[aerodp] - standard_name = atmosphere_optical_thickness_due_to_ambient_aerosol_particles - long_name = vertical integrated optical depth for various aerosol species - units = none - dimensions = (horizontal_dimension,number_of_species_for_aerosol_optical_depth) - type = real - kind = kind_phys - intent = inout - optional = F -[aerosolslw] - standard_name = RRTMGP_aerosol_optical_properties_for_longwave_bands_01_16 - long_name = aerosol optical properties for longwave bands 01-16 - units = various - dimensions = (horizontal_dimension,vertical_dimension, number_of_lw_bands_rrtmgp,number_of_aerosol_output_fields_for_longwave_radiation) - type = real - kind = kind_phys - intent = out - optional = F [sfc_emiss_byband] standard_name = surface_emissivity_in_each_RRTMGP_LW_band long_name = surface emissivity in each RRTMGP LW band diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index f75e251e7..05c853fd3 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -251,7 +251,7 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, relhum(iCol,iLay) = max( 0._kind_phys, min( 1._kind_phys, max(QMIN, q_lay(iCol,iLay))/qs ) ) qs_lay(iCol,iLay) = qs tv_lay(iCol,iLay) = t_lay(iCol,iLay) * (1._kind_phys + fvirt*q_lay(iCol,iLay)) - deltaZ(iCol,iLay) = (rog) * abs(log(p_lev(iCol,iLay)) - log(p_lev(iCol,iLay+1))) * tv_lay(iCol,iLay) + deltaZ(iCol,iLay) = (rog*0.001) * abs(log(p_lev(iCol,iLay)) - log(p_lev(iCol,iLay+1))) * tv_lay(iCol,iLay) enddo enddo @@ -347,29 +347,29 @@ subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_ integer, intent(in) :: & ncol ! Number of horizontal gridpoints real(kind_phys), dimension(ncol, Model%levs, 2:Model%ntrac),intent(in) :: & - tracer ! + tracer ! Cloud condensate amount in layer by type () real(kind_phys), dimension(ncol,Model%levs), intent(in) :: & - p_lay, & ! - t_lay, & ! - tv_lay, & ! - relhum, & ! - qs_lay, & ! - q_lay, & ! - deltaZ, & ! - deltaP + p_lay, & ! Pressure @ model layer centers (Pa) + t_lay, & ! Temperature @ layer centers (K) + tv_lay, & ! Virtual temperature @ layer centers (K) + relhum, & ! Relative humidity @ layer centers(1) + qs_lay, & ! Saturation specific humidity @ layer center (kg/kg) + q_lay, & ! Specific humidity @ layer centers(kg/kg) + deltaZ, & ! Layer thickness (km) + deltaP ! Layer thickness (Pa) real(kind_phys), dimension(ncol,Model%levs+1), intent(in) :: & - p_lev ! + p_lev ! Pressure @ model layer interface (Pa) ! Outputs real(kind_phys), dimension(ncol, Model%levs, NF_CLDS),intent(out) :: & - clouds ! + clouds ! Cloud properties (NCOL,Model%levs,NF_CLDS) integer,dimension(ncol,3), intent(out) :: & - mbota, & ! - mtopa ! + mbota, & ! Vertical indices for low, mid, hi cloud bases (NCOL,3) + mtopa ! Vertical indices for low, mid, hi cloud tops (NCOL,3) real(kind_phys), dimension(ncol), intent(out) ::& - de_lgth ! + de_lgth ! Clouds decorrelation length (km) real(kind_phys), dimension(ncol, 5), intent(out) :: & - cldsa ! + cldsa ! Fraction of clouds for low, mid, hi, tot, bl (NCOL,5) ! Local variables real(kind_phys), dimension(ncol, Model%levs, Model%ncnd) :: cld_condensate @@ -499,7 +499,7 @@ subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_ Grid%xlat, & ! IN - Latitude (radians) Grid%xlon, & ! IN - Longitude (radians) Sfcprop%slmsk, & ! IN - Land/Sea mask () - deltaZ, & ! IN - Layer thickness (m) + deltaZ, & ! IN - Layer thickness (km) deltaP/100., & ! IN - Layer thickness (hPa) NCOL, & ! IN - Number of horizontal gridpoints MODEL%LEVS, & ! IN - Number of model layers @@ -529,7 +529,7 @@ subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_ Grid%xlat, & ! IN - Latitude (radians) Grid%xlon, & ! IN - Longitude (radians) Sfcprop%slmsk, & ! IN - Land/Sea mask () - deltaZ, & ! IN - Layer thickness (m) + deltaZ, & ! IN - Layer thickness (km) deltaP/100., & ! IN - Layer thickness (hPa) NCOL, & ! IN - Number of horizontal gridpoints MODEL%LEVS, & ! IN - Number of model layers @@ -565,7 +565,7 @@ subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_ Grid%xlat, & ! IN - Latitude (radians) Grid%xlon, & ! IN - Longitude (radians) Sfcprop%slmsk, & ! IN - Land/Sea mask () - deltaZ, & ! IN - Layer thickness (m) + deltaZ, & ! IN - Layer thickness (km) deltaP/100., & ! IN - Layer thickness (hPa) NCOL, & ! IN - Number of horizontal gridpoints MODEL%LEVS, & ! IN - Number of model layers @@ -597,7 +597,7 @@ subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_ Grid%xlon, & ! IN - Longitude (radians) Sfcprop%slmsk, & ! IN - Land/Sea mask () cldcov, & ! IN - Layer cloud fraction (used if uni_cld=.true.) - deltaZ, & ! IN - Layer thickness (m) + deltaZ, & ! IN - Layer thickness (km) deltaP/100., & ! IN - Layer thickness (hPa) NCOL, & ! IN - Number of horizontal gridpoints MODEL%LEVS, & ! IN - Number of model layers @@ -618,7 +618,7 @@ subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_ Grid%xlat, & ! IN - Latitude (radians) Grid%xlon, & ! IN - Longitude (radians) Sfcprop%slmsk, & ! IN - Land/Sea mask () - deltaZ, & ! IN - Layer thickness (m) + deltaZ, & ! IN - Layer thickness (km) deltaP/100., & ! IN - Layer thickness (hPa) NCOL, & ! IN - Number of horizontal gridpoints MODEL%LEVS, & ! IN - Number of model layers @@ -649,7 +649,7 @@ subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_ Grid%xlat, & ! IN - Latitude (radians) Grid%xlon, & ! IN - Longitude (radians) Sfcprop%slmsk, & ! IN - Land/Sea mask () - deltaZ, & ! IN - Layer thickness (m) + deltaZ, & ! IN - Layer thickness (km) deltaP/100., & ! IN - Layer thickness (hPa) Model%ntrac-1, & ! IN - Number of tracers Model%ntcw-1, & ! IN - Tracer index for cloud condensate (or liquid water) diff --git a/physics/GFS_rrtmgp_sw_pre.F90 b/physics/GFS_rrtmgp_sw_pre.F90 index 613322bf7..6987c3e4a 100644 --- a/physics/GFS_rrtmgp_sw_pre.F90 +++ b/physics/GFS_rrtmgp_sw_pre.F90 @@ -15,13 +15,6 @@ module GFS_rrtmgp_sw_pre use module_radiation_surface, only: & NF_ALBD, & ! Number of surface albedo categories (4; nir-direct, nir-diffuse, uvvis-direct, uvvis-diffuse) setalb ! Routine to compute surface albedo - ! DJS2019: This radiation_aerosols_module is a whole-lotta mess that needs some love. As it stands now, it's - ! entirely dependent on RRTMG legacy code. - use module_radiation_aerosols, only: & - NF_AESW, & ! Number of optical-fields in SW output (3=tau+g+omega) - NF_AELW, & ! Number of optical-fields in LW output (3=tau+g+omega) - setaer, & ! Routine to compute aerosol radiative properties (tau,g,omega) - NSPC1 ! Number of species for vertically integrated aerosol optical-depth use surface_perturbation, only: & cdfnor ! Routine to compute CDF (used to compute percentiles) use mo_gas_optics_rrtmgp, only: & @@ -44,8 +37,8 @@ end subroutine GFS_rrtmgp_sw_pre_init !! subroutine GFS_rrtmgp_sw_pre_run(Model, Grid, Sfcprop, Statein, ncol, p_lay, p_lev, & tv_lay, relhum, tracer, sw_gas_props, nday, idxday, alb1d, sfc_alb_nir_dir, & - sfc_alb_nir_dif, sfc_alb_uvvis_dir, sfc_alb_uvvis_dif, RadTend, Coupling, aerosolssw,& - aerodp, errmsg, errflg) + sfc_alb_nir_dif, sfc_alb_uvvis_dir, sfc_alb_uvvis_dif, RadTend, Coupling, & + errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & @@ -85,10 +78,6 @@ subroutine GFS_rrtmgp_sw_pre_run(Model, Grid, Sfcprop, Statein, ncol, p_lay, p_ Radtend ! DDT: FV3-GFS radiation tendencies type(GFS_coupling_type), intent(inout) :: & Coupling ! DDT: FV3-GFS coupling arrays - real(kind_phys), dimension(ncol,Model%levs,sw_gas_props%get_nband(),NF_AESW), intent(out) ::& - aerosolssw ! Aerosol radiative properties in each SW band. - real(kind_phys), dimension(ncol,NSPC1), intent(inout) :: & - aerodp ! Vertical integrated optical depth for various aerosol species character(len=*), intent(out) :: & errmsg ! Error message integer, intent(out) :: & @@ -97,10 +86,6 @@ subroutine GFS_rrtmgp_sw_pre_run(Model, Grid, Sfcprop, Statein, ncol, p_lay, p_ ! Local variables integer :: i, j, iCol, iBand, iLay real(kind_phys), dimension(ncol, NF_ALBD) :: sfcalb - real(kind_phys), dimension(ncol, Model%levs, sw_gas_props%get_nband(), NF_AESW) :: & - aerosolssw2 - real(kind_phys), dimension(ncol, Model%levs, Model%rrtmgp_nBandsLW, NF_AELW) :: & - aerosolslw ! Initialize CCPP error handling variables errmsg = '' @@ -159,24 +144,6 @@ subroutine GFS_rrtmgp_sw_pre_run(Model, Grid, Sfcprop, Statein, ncol, p_lay, p_ sfc_alb_uvvis_dif(iBand,1:NCOL) = sfcalb(1:NCOL,4) enddo - ! ####################################################################################### - ! Call module_radiation_aerosols::setaer(),to setup aerosols property profile - ! ####################################################################################### - call setaer(p_lev, p_lay, Statein%prslk(1:NCOL,:), tv_lay, relhum, Sfcprop%slmsk, tracer, & - Grid%xlon, Grid%xlat, NCOL, Model%levs, Model%levs+1, Model%lsswr, .true., & - aerosolssw2, aerosolslw, aerodp) - - ! Store aerosol optical properties - ! SW. - ! For RRTMGP SW the bands are now ordered from [IR(band) -> nIR -> UV], in RRTMG the - ! band ordering was [nIR -> UV -> IR(band)] - aerosolssw(1:NCOL,:,1,1) = aerosolssw2(1:NCOL,:,sw_gas_props%get_nband(),1) - aerosolssw(1:NCOL,:,1,2) = aerosolssw2(1:NCOL,:,sw_gas_props%get_nband(),2) - aerosolssw(1:NCOL,:,1,3) = aerosolssw2(1:NCOL,:,sw_gas_props%get_nband(),3) - aerosolssw(1:NCOL,:,2:sw_gas_props%get_nband(),1) = aerosolssw2(1:NCOL,:,1:sw_gas_props%get_nband()-1,1) - aerosolssw(1:NCOL,:,2:sw_gas_props%get_nband(),2) = aerosolssw2(1:NCOL,:,1:sw_gas_props%get_nband()-1,2) - aerosolssw(1:NCOL,:,2:sw_gas_props%get_nband(),3) = aerosolssw2(1:NCOL,:,1:sw_gas_props%get_nband()-1,3) - end subroutine GFS_rrtmgp_sw_pre_run ! ######################################################################################### diff --git a/physics/GFS_rrtmgp_sw_pre.meta b/physics/GFS_rrtmgp_sw_pre.meta index c377abe9d..73df740e1 100644 --- a/physics/GFS_rrtmgp_sw_pre.meta +++ b/physics/GFS_rrtmgp_sw_pre.meta @@ -171,23 +171,6 @@ type = integer intent = out optional = F -[aerosolssw] - standard_name = RRTMGP_aerosol_optical_properties_for_shortwave_bands_01_16 - long_name = aerosol optical properties for shortwave bands 01-16 - units = various - dimensions = (horizontal_dimension,vertical_dimension, number_of_sw_bands_rrtmgp, number_of_aerosol_output_fields_for_shortwave_radiation) - type = real - intent = out - kind = kind_phys -[aerodp] - standard_name = atmosphere_optical_thickness_due_to_ambient_aerosol_particles - long_name = vertical integrated optical depth for various aerosol species - units = none - dimensions = (horizontal_dimension,number_of_species_for_aerosol_optical_depth) - type = real - kind = kind_phys - intent = inout - optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/rrtmgp_lw_aerosol_optics.F90 b/physics/rrtmgp_lw_aerosol_optics.F90 new file mode 100644 index 000000000..bc6295e44 --- /dev/null +++ b/physics/rrtmgp_lw_aerosol_optics.F90 @@ -0,0 +1,97 @@ +module rrtmgp_lw_aerosol_optics + use machine, only: kind_phys + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp + use mo_optical_props, only: ty_optical_props_1scl + use rrtmgp_aux, only: check_error_msg + use module_radiation_aerosols, only: & + NF_AESW, & ! Number of optical-fields in SW output (3=tau+g+omega) + NF_AELW, & ! Number of optical-fields in LW output (3=tau+g+omega) + setaer, & ! Routine to compute aerosol radiative properties (tau,g,omega) + NSPC1 ! Number of species for vertically integrated aerosol optical-depth + use netcdf + + public rrtmgp_lw_aerosol_optics_init, rrtmgp_lw_aerosol_optics_run, rrtmgp_lw_aerosol_optics_finalize +contains + + ! ######################################################################################### + ! SUBROUTINE rrtmgp_lw_aerosol_optics_init() + ! ######################################################################################### + subroutine rrtmgp_lw_aerosol_optics_init() + end subroutine rrtmgp_lw_aerosol_optics_init + + ! ######################################################################################### + ! SUBROUTINE rrtmgp_lw_aerosol_optics_run() + ! ######################################################################################### +!! \section arg_table_rrtmgp_lw_aerosol_optics_run +!! \htmlinclude rrtmgp_lw_aerosol_optics.html +!! + subroutine rrtmgp_lw_aerosol_optics_run(doLWrad, nCol, nLev, nTracer, p_lev, p_lay, p_lk, & + tv_lay, relhum, lsmask, tracer, lon, lat, lw_gas_props, sw_gas_props, & + aerodp, lw_optical_props_aerosol, errmsg, errflg) + + ! Inputs + logical, intent(in) :: & + doLWrad ! Logical flag for longwave radiation call + integer, intent(in) :: & + nCol, & ! Number of horizontal grid points + nLev, & ! Number of vertical layers + nTracer ! Number of tracers + real(kind_phys), dimension(nCol), intent(in) :: & + lon, & ! Longitude + lat, & ! Latitude + lsmask ! Land/sea/sea-ice mask + real(kind_phys), dimension(nCol,Nlev),intent(in) :: & + p_lay, & ! Pressure @ layer-centers (Pa) + tv_lay, & ! Virtual-temperature @ layer-centers (K) + relhum, & ! Relative-humidity @ layer-centers + p_lk ! Exner function @ layer-centers (1) + real(kind_phys), dimension(nCol, nLev, nTracer),intent(in) :: & + tracer ! trace gas concentrations + real(kind_phys), dimension(nCol,nLev+1),intent(in) :: & + p_lev ! Pressure @ layer-interfaces (Pa) + type(ty_gas_optics_rrtmgp),intent(in) :: & + sw_gas_props ! RRTMGP DDT: spectral information for SW calculation + type(ty_gas_optics_rrtmgp),intent(in) :: & + lw_gas_props ! RRTMGP DDT: spectral information for LW calculation + + ! Outputs + real(kind_phys), dimension(nCol,NSPC1), intent(inout) :: & + aerodp ! Vertical integrated optical depth for various aerosol species + type(ty_optical_props_1scl),intent(out) :: & + lw_optical_props_aerosol ! RRTMGP DDT: Longwave aerosol optical properties (tau) + integer, intent(out) :: & + errflg ! + character(len=*), intent(out) :: & + errmsg ! + + ! Local variables + real(kind_phys), dimension(nCol, nLev, lw_gas_props%get_nband(), NF_AELW) :: & + aerosolslw ! + real(kind_phys), dimension(nCol, nLev, sw_gas_props%get_nband(), NF_AESW) :: & + aerosolssw + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + if (.not. doLWrad) return + + ! Call module_radiation_aerosols::setaer(),to setup aerosols property profile + call setaer(p_lev, p_lay, p_lk, tv_lay, relhum, lsmask, tracer, lon, lat, ncol, nLev, & + nLev+1, .true., .true., aerosolssw, aerosolslw, aerodp) + + ! Allocate RRTMGP DDT: Aerosol optics [nCol,nlev,nBands] + call check_error_msg('rrtmgp_lw_aerosol_optics_run',lw_optical_props_aerosol%alloc_1scl( & + ncol, nlev, lw_gas_props%get_band_lims_wavenumber())) + + ! Copy aerosol optical information to RRTMGP DDT + lw_optical_props_aerosol%tau = aerosolslw(:,:,:,1) * (1. - aerosolslw(:,:,:,2)) + + end subroutine rrtmgp_lw_aerosol_optics_run + + ! ######################################################################################### + ! SUBROUTINE rrtmgp_lw_aerosol_optics_finalize() + ! ######################################################################################### + subroutine rrtmgp_lw_aerosol_optics_finalize() + end subroutine rrtmgp_lw_aerosol_optics_finalize +end module rrtmgp_lw_aerosol_optics diff --git a/physics/rrtmgp_lw_aerosol_optics.meta b/physics/rrtmgp_lw_aerosol_optics.meta new file mode 100644 index 000000000..ea123e236 --- /dev/null +++ b/physics/rrtmgp_lw_aerosol_optics.meta @@ -0,0 +1,166 @@ +[ccpp-arg-table] + name = rrtmgp_lw_aerosol_optics_run + type = scheme +[doLWrad] + standard_name = flag_to_calc_lw + long_name = logical flags for lw radiation calls + units = flag + dimensions = () + type = logical + intent = in + optional = F +[ncol] + standard_name = horizontal_loop_extent + long_name = horizontal dimension + units = count + dimensions = () + type = integer + intent = in + optional = F +[nLev] + standard_name = vertical_dimension + long_name = number of vertical levels + units = count + dimensions = () + type = integer + intent = in + optional = F +[nTracer] + standard_name = number_of_tracers + long_name = number of tracers + units = count + dimensions = () + type = integer + intent = in + optional = F +[p_lev] + standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa + long_name = air pressure at vertical interface for radiation calculation + units = hPa + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[p_lay] + standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa + long_name = air pressure at vertical layer for radiation calculation + units = hPa + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[p_lk] + standard_name = dimensionless_exner_function_at_model_layers + long_name = dimensionless Exner function at model layer centers + units = none + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[tv_lay] + standard_name = virtual_temperature + long_name = layer virtual temperature + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[relhum] + standard_name = relative_humidity + long_name = layer relative humidity + units = frac + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[lsmask] + standard_name = sea_land_ice_mask_real + long_name = landmask: sea/land/ice=0/1/2 + units = flag + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[tracer] + standard_name = chemical_tracers + long_name = chemical tracers + units = g g-1 + dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) + type = real + kind = kind_phys + intent = in + optional = F +[lon] + standard_name = longitude + long_name = longitude + units = radians + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[lat] + standard_name = latitude + long_name = latitude + units = radians + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[lw_gas_props] + standard_name = coefficients_for_lw_gas_optics + long_name = DDT containing spectral information for RRTMGP LW radiation scheme + units = DDT + dimensions = () + intent = in + type = ty_gas_optics_rrtmgp + optional = F +[sw_gas_props] + standard_name = coefficients_for_sw_gas_optics + long_name = DDT containing spectral information for RRTMGP SW radiation scheme + units = DDT + dimensions = () + type = ty_gas_optics_rrtmgp + intent = in + optional = F +[aerodp] + standard_name = atmosphere_optical_thickness_due_to_ambient_aerosol_particles + long_name = vertical integrated optical depth for various aerosol species + units = none + dimensions = (horizontal_dimension,number_of_species_for_aerosol_optical_depth) + type = real + kind = kind_phys + intent = inout + optional = F +[lw_optical_props_aerosol] + standard_name = longwave_optical_properties_for_aerosols + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_1scl + intent = out + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F \ No newline at end of file diff --git a/physics/rrtmgp_lw_cloud_optics.F90 b/physics/rrtmgp_lw_cloud_optics.F90 index f30f540a5..794b679ef 100644 --- a/physics/rrtmgp_lw_cloud_optics.F90 +++ b/physics/rrtmgp_lw_cloud_optics.F90 @@ -351,22 +351,15 @@ end subroutine rrtmgp_lw_cloud_optics_init ! ######################################################################################### ! SUBROUTINE rrtmgp_lw_cloud_optics_run() ! ######################################################################################### - subroutine rrtmgp_lw_cloud_optics_run(Model, ncol, ipsdlw0, icseed_lw, cld_frac, cld_lwp, & - cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, & - lw_cloud_props, lw_gas_props, aerosolslw, & - cldtaulw, lw_optical_props_clouds, lw_optical_props_aerosol, errmsg, errflg) + subroutine rrtmgp_lw_cloud_optics_run(Model, ncol, cld_frac, cld_lwp, cld_reliq, cld_iwp, & + cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, lw_cloud_props, lw_gas_props, & + cldtaulw, lw_optical_props_cloudsByBand, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & Model ! DDT containing FV3-GFS model control parameters integer, intent(in) :: & - ncol, & ! Number of horizontal gridpoints - ipsdlw0 ! Initial permutation seed for McICA - integer,intent(in),dimension(ncol) :: & - icseed_lw ! auxiliary special cloud related array when module - ! variable isubclw=2, it provides permutation seed - ! for each column profile that are used for generating - ! random numbers. when isubclw /=2, it will not be used. + ncol ! Number of horizontal gridpoints real(kind_phys), dimension(ncol,model%levs),intent(in) :: & cld_frac, & ! Total cloud fraction by layer cld_lwp, & ! Cloud liquid water path @@ -381,29 +374,19 @@ subroutine rrtmgp_lw_cloud_optics_run(Model, ncol, ipsdlw0, icseed_lw, cld_frac, lw_cloud_props ! type(ty_gas_optics_rrtmgp),intent(in) :: & lw_gas_props - real(kind_phys), intent(in),dimension(ncol, model%levs, lw_gas_props%get_nband(),3) :: & - aerosolslw ! ! Outputs real(kind_phys), dimension(ncol,Model%levs), intent(out) :: & - cldtaulw ! approx 10.mu band layer cloud optical depth + cldtaulw ! approx 10.mu band layer cloud optical depth type(ty_optical_props_1scl),intent(out) :: & - lw_optical_props_clouds, & ! - lw_optical_props_aerosol ! + lw_optical_props_cloudsByBand ! integer, intent(out) :: & - errflg ! + errflg ! character(len=*), intent(out) :: & - errmsg ! + errmsg ! ! Local variables - integer :: iCol - integer,dimension(ncol) :: ipseed_lw logical,dimension(ncol,model%levs) :: liqmask, icemask - type(ty_optical_props_1scl) :: lw_optical_props_cloudsByBand - type(random_stat) :: rng_stat - real(kind_phys), dimension(lw_gas_props%get_ngpt(),model%levs,ncol) :: rng3D - real(kind_phys), dimension(lw_gas_props%get_ngpt()*model%levs) :: rng1D - logical, dimension(ncol,model%levs,lw_gas_props%get_ngpt()) :: cldfracMCICA real(kind_phys), dimension(ncol,model%levs,lw_gas_props%get_nband()) :: & tau_cld @@ -412,19 +395,6 @@ subroutine rrtmgp_lw_cloud_optics_run(Model, ncol, ipsdlw0, icseed_lw, cld_frac, errflg = 0 if (.not. Model%lslwr) return - - ! ####################################################################################### - ! Change random number seed value for each radiation invocation (isubclw =1 or 2). - ! ####################################################################################### - if(isubclw == 1) then ! advance prescribed permutation seed - do iCol = 1, nCol - ipseed_lw(iCol) = ipsdlw0 + iCol - enddo - elseif (isubclw == 2) then ! use input array of permutaion seeds - do iCol = 1, nCol - ipseed_lw(iCol) = icseed_lw(iCol) - enddo - endif ! ####################################################################################### ! Compute ice/liquid cloud masks, needed by rrtmgp_cloud_optics @@ -433,22 +403,11 @@ subroutine rrtmgp_lw_cloud_optics_run(Model, ncol, ipsdlw0, icseed_lw, cld_frac, icemask = (cld_frac .gt. 0 .and. cld_iwp .gt. 0) ! ####################################################################################### - ! Allocate space for RRTMGP DDTs containing cloud and aerosol radiative properties + ! Allocate space for RRTMGP DDTs containing cloud radiative properties ! ####################################################################################### ! Cloud optics [nCol,model%levs,nBands] call check_error_msg('rrtmgp_lw_cloud_optics_run',lw_optical_props_cloudsByBand%alloc_1scl(& ncol, model%levs, lw_gas_props%get_band_lims_wavenumber())) - ! Aerosol optics [nCol,model%levs,nBands] - call check_error_msg('rrtmgp_lw_cloud_optics_run',lw_optical_props_aerosol%alloc_1scl( & - ncol, model%levs, lw_gas_props%get_band_lims_wavenumber())) - ! Cloud optics [nCol,model%levs,nGpts] - call check_error_msg('rrtmgp_lw_cloud_optics_run',lw_optical_props_clouds%alloc_1scl( & - ncol, model%levs, lw_gas_props)) - - ! ####################################################################################### - ! Copy aerosol optical information to RRTMGP DDT - ! ####################################################################################### - lw_optical_props_aerosol%tau = aerosolslw(:,:,:,1) * (1. - aerosolslw(:,:,:,2)) ! ####################################################################################### ! Compute cloud-optics for RTE. @@ -478,27 +437,6 @@ subroutine rrtmgp_lw_cloud_optics_run(Model, ncol, ipsdlw0, icseed_lw, cld_frac, endif endif - ! ####################################################################################### - ! Call McICA to generate subcolumns. - ! ####################################################################################### - ! Call RNG. Mersennse Twister accepts 1D array, so loop over columns and collapse along G-points - ! and layers. ([nGpts,model%levs,nColumn]-> [nGpts*model%levs]*nColumn) - do iCol=1,ncol - call random_setseed(ipseed_lw(icol),rng_stat) - call random_number(rng1D,rng_stat) - rng3D(:,:,iCol) = reshape(source = rng1D,shape=[lw_gas_props%get_ngpt(),model%levs]) - enddo - - ! Call McICA - select case ( iovrlw ) - ! Maximumn-random - case(1) - call check_error_msg('rrtmgp_lw_cloud_optics_run',sampled_mask_max_ran(rng3D,cld_frac,cldfracMCICA)) - end select - - ! Map band optical depth to each g-point using McICA - call check_error_msg('rrtmgp_lw_cloud_optics_run',draw_samples(cldfracMCICA,lw_optical_props_cloudsByBand,lw_optical_props_clouds)) - ! GFS_RRTMGP_POST_RUN() requires the LW optical depth ~10microns cldtaulw = lw_optical_props_cloudsByBand%tau(:,:,7) diff --git a/physics/rrtmgp_lw_cloud_optics.meta b/physics/rrtmgp_lw_cloud_optics.meta index 53ea2bb2a..60daf2666 100644 --- a/physics/rrtmgp_lw_cloud_optics.meta +++ b/physics/rrtmgp_lw_cloud_optics.meta @@ -79,22 +79,6 @@ type = integer intent = in optional = F -[ipsdlw0] - standard_name = initial_permutation_seed_lw - long_name = initial seed for McICA LW - units = none - dimensions = () - type = integer - intent = in - optional = F -[icseed_lw] - standard_name = seed_random_numbers_lw_for_RRTMGP - long_name = seed for random number generation for longwave radiation - units = none - dimensions = (horizontal_dimension) - type = integer - intent = in - optional = F [cld_frac] standard_name = total_cloud_fraction long_name = layer total cloud fraction @@ -183,15 +167,6 @@ intent = in type = ty_cloud_optics optional = F -[aerosolslw] - standard_name = RRTMGP_aerosol_optical_properties_for_longwave_bands_01_16 - long_name = aerosol optical properties for longwave bands 01-16 - units = various - dimensions = (horizontal_dimension,vertical_dimension, number_of_lw_bands_rrtmgp,number_of_aerosol_output_fields_for_longwave_radiation) - type = real - kind = kind_phys - intent = in - optional = F [cldtaulw] standard_name = RRTMGP_cloud_optical_depth_layers_at_10mu_band long_name = approx 10mu band layer cloud optical depth @@ -201,16 +176,8 @@ kind = kind_phys intent = out optional = F -[lw_optical_props_clouds] - standard_name = longwave_optical_properties_for_cloudy_atmosphere - long_name = Fortran DDT containing RRTMGP optical properties - units = DDT - dimensions = () - type = ty_optical_props_1scl - intent = out - optional = F -[lw_optical_props_aerosol] - standard_name = longwave_optical_properties_for_aerosols +[lw_optical_props_cloudsByBand] + standard_name = longwave_optical_properties_for_cloudy_atmosphere_by_band long_name = Fortran DDT containing RRTMGP optical properties units = DDT dimensions = () diff --git a/physics/rrtmgp_lw_cloud_sampling.F90 b/physics/rrtmgp_lw_cloud_sampling.F90 new file mode 100644 index 000000000..60d13e6f1 --- /dev/null +++ b/physics/rrtmgp_lw_cloud_sampling.F90 @@ -0,0 +1,112 @@ +module rrtmgp_lw_cloud_sampling + use machine, only: kind_phys + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp + use physparam, only: isubcsw, iovrsw + use mo_optical_props, only: ty_optical_props_1scl + use mo_cloud_sampling, only: sampled_mask_max_ran, sampled_mask_exp_ran, draw_samples + use mersenne_twister, only: random_setseed, random_number, random_stat + use rrtmgp_aux, only: check_error_msg + use netcdf + +contains + + ! ######################################################################################### + ! SUBROUTINE mcica_init + ! ######################################################################################### + subroutine rrtmgp_lw_cloud_sampling_init() + end subroutine rrtmgp_lw_cloud_sampling_init + + ! ######################################################################################### + ! SUBROTUINE rrtmgp_lw_cloud_sampling_run() + ! ######################################################################################### +!! \section arg_table_rrtmgp_lw_cloud_sampling_run +!! \htmlinclude rrtmgp_lw_cloud_sampling.html +!! + subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, cld_frac,& + lw_gas_props, lw_optical_props_cloudsByBand, lw_optical_props_clouds, errmsg, errflg) + + ! Inputs + logical, intent(in) :: & + doLWrad ! Logical flag for shortwave radiation call + integer, intent(in) :: & + nCol, & ! Number of horizontal gridpoints + nLev, & ! Number of vertical layers + ipsdlw0 ! Initial permutation seed for McICA + integer,intent(in),dimension(ncol) :: & + icseed_lw ! auxiliary special cloud related array when module + ! variable isubclw=2, it provides permutation seed + ! for each column profile that are used for generating + ! random numbers. when isubclw /=2, it will not be used. + real(kind_phys), dimension(ncol,nLev),intent(in) :: & + cld_frac ! Total cloud fraction by layer + type(ty_gas_optics_rrtmgp),intent(in) :: & + lw_gas_props ! RRTMGP DDT: K-distribution data + type(ty_optical_props_1scl),intent(in) :: & + lw_optical_props_cloudsByBand ! RRTMGP DDT: Shortwave optical properties (cloudy atmosphere) + + ! Outputs + character(len=*), intent(out) :: & + errmsg ! Error message + integer, intent(out) :: & + errflg ! Error code + type(ty_optical_props_1scl),intent(out) :: & + lw_optical_props_clouds ! RRTMGP DDT: Shortwave optical properties (cloudy atmosphere) + + ! Local variables + integer :: iCol + integer,dimension(ncol) :: ipseed_lw + type(random_stat) :: rng_stat + real(kind_phys), dimension(lw_gas_props%get_ngpt(),nLev,ncol) :: rng3D + real(kind_phys), dimension(lw_gas_props%get_ngpt()*nLev) :: rng1D + logical, dimension(ncol,nLev,lw_gas_props%get_ngpt()) :: cldfracMCICA + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + if (.not. doLWrad) return + + ! Allocate space RRTMGP DDTs [nCol,nLev,nGpt] + call check_error_msg('rrtmgp_lw_cloud_sampling_run',& + lw_optical_props_clouds%alloc_1scl(nCol, nLev, lw_gas_props)) + + ! Change random number seed value for each radiation invocation (isubclw =1 or 2). + if(isubclw == 1) then ! advance prescribed permutation seed + do iCol = 1, ncol + ipseed_lw(iCol) = ipsdlw0 + iCol + enddo + elseif (isubclw == 2) then ! use input array of permutaion seeds + do iCol = 1, ncol + ipseed_lw(iCol) = icseed_lw(iCol) + enddo + endif + + ! Call McICA to generate subcolumns. + ! Call RNG. Mersennse Twister accepts 1D array, so loop over columns and collapse along G-points + ! and layers. ([nGpts,nLev,nColumn]-> [nGpts*nLev]*nColumn) + do iCol=1,ncol + call random_setseed(ipseed_lw(icol),rng_stat) + call random_number(rng1D,rng_stat) + rng3D(:,:,iCol) = reshape(source = rng1D,shape=[lw_gas_props%get_ngpt(),nLev]) + enddo + + ! Call McICA + select case ( iovrlw ) + ! Maximumn-random + case(1) + call check_error_msg('rrtmgp_lw_cloud_sampling_run',sampled_mask_max_ran(rng3D,cld_frac,cldfracMCICA)) + end select + + ! Map band optical depth to each g-point using McICA + call check_error_msg('rrtmgp_lw_cloud_sampling_run',draw_samples(& + cldfracMCICA,lw_optical_props_cloudsByBand,lw_optical_props_clouds)) + + end subroutine rrtmgp_lw_cloud_sampling_run + + ! ######################################################################################### + ! SUBROTUINE rrtmgp_lw_cloud_sampling_finalize() + ! ######################################################################################### + subroutine rrtmgp_lw_cloud_sampling_finalize() + end subroutine rrtmgp_lw_cloud_sampling_finalize + +end module rrtmgp_lw_cloud_sampling diff --git a/physics/rrtmgp_lw_cloud_sampling.meta b/physics/rrtmgp_lw_cloud_sampling.meta new file mode 100644 index 000000000..79d28d929 --- /dev/null +++ b/physics/rrtmgp_lw_cloud_sampling.meta @@ -0,0 +1,93 @@ +[ccpp-arg-table] + name = rrtmgp_lw_cloud_sampling_run + type = scheme +[doLWrad] + standard_name = flag_to_calc_lw + long_name = logical flags for lw radiation calls + units = flag + dimensions = () + type = logical + intent = in + optional = F +[ncol] + standard_name = horizontal_loop_extent + long_name = horizontal dimension + units = count + dimensions = () + type = integer + intent = in + optional = F +[nLev] + standard_name = vertical_dimension + long_name = number of vertical levels + units = count + dimensions = () + type = integer + intent = in + optional = F +[ipsdlw0] + standard_name = initial_permutation_seed_lw + long_name = initial seed for McICA LW + units = none + dimensions = () + type = integer + intent = in + optional = F +[icseed_lw] + standard_name = seed_random_numbers_lw_for_RRTMGP + long_name = seed for random number generation for longwave radiation + units = none + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[cld_frac] + standard_name = total_cloud_fraction + long_name = layer total cloud fraction + units = frac + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[lw_gas_props] + standard_name = coefficients_for_lw_gas_optics + long_name = DDT containing spectral information for RRTMGP LW radiation scheme + units = DDT + dimensions = () + type = ty_gas_optics_rrtmgp + intent = in + optional = F +[lw_optical_props_cloudsByBand] + standard_name = longwave_optical_properties_for_cloudy_atmosphere_by_band + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_1scl + intent = in + optional = F +[lw_optical_props_clouds] + standard_name = longwave_optical_properties_for_cloudy_atmosphere + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_1scl + intent = out + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F \ No newline at end of file diff --git a/physics/rrtmgp_sw_aerosol_optics.F90 b/physics/rrtmgp_sw_aerosol_optics.F90 new file mode 100644 index 000000000..566ecba68 --- /dev/null +++ b/physics/rrtmgp_sw_aerosol_optics.F90 @@ -0,0 +1,115 @@ +module rrtmgp_sw_aerosol_optics + use machine, only: kind_phys + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp + use mo_optical_props, only: ty_optical_props_2str + use rrtmgp_aux, only: check_error_msg + use module_radiation_aerosols, only: & + NF_AESW, & ! Number of optical-fields in SW output (3=tau+g+omega) + NF_AELW, & ! Number of optical-fields in LW output (3=tau+g+omega) + setaer, & ! Routine to compute aerosol radiative properties (tau,g,omega) + NSPC1 ! Number of species for vertically integrated aerosol optical-depth + use netcdf + + public rrtmgp_sw_aerosol_optics_init, rrtmgp_sw_aerosol_optics_run, rrtmgp_sw_aerosol_optics_finalize +contains + + ! ######################################################################################### + ! SUBROUTINE rrtmgp_sw_aerosol_optics_init() + ! ######################################################################################### + subroutine rrtmgp_sw_aerosol_optics_init() + end subroutine rrtmgp_sw_aerosol_optics_init + + ! ######################################################################################### + ! SUBROUTINE rrtmgp_sw_aerosol_optics_run() + ! ######################################################################################### +!! \section arg_table_rrtmgp_sw_aerosol_optics_run +!! \htmlinclude rrtmgp_sw_aerosol_optics.html +!! + subroutine rrtmgp_sw_aerosol_optics_run(doSWrad, nCol, nLev, nTracer, nDay, idxday, p_lev,& + p_lay, p_lk, tv_lay, relhum, lsmask, tracer, lon, lat, lw_gas_props, sw_gas_props, & + aerodp, sw_optical_props_aerosol, errmsg, errflg) + + ! Inputs + logical, intent(in) :: & + doSWrad ! Logical flag for shortwave radiation call + integer, intent(in) :: & + nCol, & ! Number of horizontal grid points + nDay, & ! Number of daylit points + nLev, & ! Number of vertical layers + nTracer ! Number of tracers + integer,intent(in),dimension(nCol) :: & + idxday ! Indices for daylit points. + real(kind_phys), dimension(nCol), intent(in) :: & + lon, & ! Longitude + lat, & ! Latitude + lsmask ! Land/sea/sea-ice mask + real(kind_phys), dimension(nCol,Nlev),intent(in) :: & + p_lay, & ! Pressure @ layer-centers (Pa) + tv_lay, & ! Virtual-temperature @ layer-centers (K) + relhum, & ! Relative-humidity @ layer-centers + p_lk ! Exner function @ layer-centers (1) + real(kind_phys), dimension(nCol, nLev, nTracer),intent(in) :: & + tracer ! trace gas concentrations + real(kind_phys), dimension(nCol,nLev+1),intent(in) :: & + p_lev ! Pressure @ layer-interfaces (Pa) + type(ty_gas_optics_rrtmgp),intent(in) :: & + sw_gas_props ! RRTMGP DDT: spectral information for SW calculation + type(ty_gas_optics_rrtmgp),intent(in) :: & + lw_gas_props ! RRTMGP DDT: spectral information for LW calculation + + ! Outputs + real(kind_phys), dimension(nCol,NSPC1), intent(inout) :: & + aerodp ! Vertical integrated optical depth for various aerosol species + type(ty_optical_props_2str),intent(out) :: & + sw_optical_props_aerosol ! RRTMGP DDT: Longwave aerosol optical properties (tau) + integer, intent(out) :: & + errflg ! + character(len=*), intent(out) :: & + errmsg ! + + ! Local variables + real(kind_phys), dimension(nCol, nLev, lw_gas_props%get_nband(), NF_AELW) :: & + aerosolslw ! + real(kind_phys), dimension(nCol, nLev, sw_gas_props%get_nband(), NF_AESW) :: & + aerosolssw, aerosolssw2 + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + if (.not. doSWrad) return + if (nDay .gt. 0) then + + ! Call module_radiation_aerosols::setaer(),to setup aerosols property profile + call setaer(p_lev, p_lay, p_lk, tv_lay, relhum, lsmask, tracer, lon, lat, nCol, nLev, & + nLev+1, .true., .true., aerosolssw2, aerosolslw, aerodp) + + ! Store aerosol optical properties + ! SW. + ! For RRTMGP SW the bands are now ordered from [IR(band) -> nIR -> UV], in RRTMG the + ! band ordering was [nIR -> UV -> IR(band)] + aerosolssw(1:nCol,:,1,1) = aerosolssw2(1:nCol,:,sw_gas_props%get_nband(),1) + aerosolssw(1:nCol,:,1,2) = aerosolssw2(1:nCol,:,sw_gas_props%get_nband(),2) + aerosolssw(1:nCol,:,1,3) = aerosolssw2(1:nCol,:,sw_gas_props%get_nband(),3) + aerosolssw(1:nCol,:,2:sw_gas_props%get_nband(),1) = aerosolssw2(1:nCol,:,1:sw_gas_props%get_nband()-1,1) + aerosolssw(1:nCol,:,2:sw_gas_props%get_nband(),2) = aerosolssw2(1:nCol,:,1:sw_gas_props%get_nband()-1,2) + aerosolssw(1:nCol,:,2:sw_gas_props%get_nband(),3) = aerosolssw2(1:nCol,:,1:sw_gas_props%get_nband()-1,3) + + ! Allocate RRTMGP DDT: Aerosol optics [nCol,nlev,nBands] + call check_error_msg('rrtmgp_sw_aerosol_optics_run',sw_optical_props_aerosol%alloc_2str( & + nDay, nlev, sw_gas_props%get_band_lims_wavenumber())) + + ! Copy aerosol optical information to RRTMGP DDT + sw_optical_props_aerosol%tau = aerosolssw(idxday(1:nday),:,:,1) + sw_optical_props_aerosol%ssa = aerosolssw(idxday(1:nday),:,:,2) + sw_optical_props_aerosol%g = aerosolssw(idxday(1:nday),:,:,3) + endif + + end subroutine rrtmgp_sw_aerosol_optics_run + + ! ######################################################################################### + ! SUBROUTINE rrtmgp_sw_aerosol_optics_finalize() + ! ######################################################################################### + subroutine rrtmgp_sw_aerosol_optics_finalize() + end subroutine rrtmgp_sw_aerosol_optics_finalize +end module rrtmgp_sw_aerosol_optics diff --git a/physics/rrtmgp_sw_aerosol_optics.meta b/physics/rrtmgp_sw_aerosol_optics.meta new file mode 100644 index 000000000..20240327f --- /dev/null +++ b/physics/rrtmgp_sw_aerosol_optics.meta @@ -0,0 +1,182 @@ +[ccpp-arg-table] + name = rrtmgp_sw_aerosol_optics_run + type = scheme +[doSWrad] + standard_name = flag_to_calc_sw + long_name = logical flags for sw radiation calls + units = flag + dimensions = () + type = logical + intent = in + optional = F +[ncol] + standard_name = horizontal_loop_extent + long_name = horizontal dimension + units = count + dimensions = () + type = integer + intent = in + optional = F +[nLev] + standard_name = vertical_dimension + long_name = number of vertical levels + units = count + dimensions = () + type = integer + intent = in + optional = F +[nTracer] + standard_name = number_of_tracers + long_name = number of tracers + units = count + dimensions = () + type = integer + intent = in + optional = F +[nday] + standard_name = daytime_points_dimension + long_name = daytime points dimension + units = count + dimensions = () + type = integer + intent = in + optional = F +[idxday] + standard_name = daytime_points + long_name = daytime points + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[p_lev] + standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa + long_name = air pressure at vertical interface for radiation calculation + units = hPa + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[p_lay] + standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa + long_name = air pressure at vertical layer for radiation calculation + units = hPa + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[p_lk] + standard_name = dimensionless_exner_function_at_model_layers + long_name = dimensionless Exner function at model layer centers + units = none + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[tv_lay] + standard_name = virtual_temperature + long_name = layer virtual temperature + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[relhum] + standard_name = relative_humidity + long_name = layer relative humidity + units = frac + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[lsmask] + standard_name = sea_land_ice_mask_real + long_name = landmask: sea/land/ice=0/1/2 + units = flag + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[tracer] + standard_name = chemical_tracers + long_name = chemical tracers + units = g g-1 + dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) + type = real + kind = kind_phys + intent = in + optional = F +[lon] + standard_name = longitude + long_name = longitude + units = radians + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[lat] + standard_name = latitude + long_name = latitude + units = radians + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[lw_gas_props] + standard_name = coefficients_for_lw_gas_optics + long_name = DDT containing spectral information for RRTMGP LW radiation scheme + units = DDT + dimensions = () + intent = in + type = ty_gas_optics_rrtmgp + optional = F +[sw_gas_props] + standard_name = coefficients_for_sw_gas_optics + long_name = DDT containing spectral information for RRTMGP SW radiation scheme + units = DDT + dimensions = () + type = ty_gas_optics_rrtmgp + intent = in + optional = F +[aerodp] + standard_name = atmosphere_optical_thickness_due_to_ambient_aerosol_particles + long_name = vertical integrated optical depth for various aerosol species + units = none + dimensions = (horizontal_dimension,number_of_species_for_aerosol_optical_depth) + type = real + kind = kind_phys + intent = inout + optional = F +[sw_optical_props_aerosol] + standard_name = shortwave_optical_properties_for_aerosols + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_2str + intent = out + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F \ No newline at end of file diff --git a/physics/rrtmgp_sw_cloud_optics.F90 b/physics/rrtmgp_sw_cloud_optics.F90 index 2f09d7859..10c837622 100644 --- a/physics/rrtmgp_sw_cloud_optics.F90 +++ b/physics/rrtmgp_sw_cloud_optics.F90 @@ -6,8 +6,6 @@ module rrtmgp_sw_cloud_optics use mo_cloud_optics, only: ty_cloud_optics use physparam, only: isubcsw, iovrsw use mo_optical_props, only: ty_optical_props_2str - use mo_cloud_sampling, only: sampled_mask_max_ran, sampled_mask_exp_ran, draw_samples - use mersenne_twister, only: random_setseed, random_number, random_stat use mo_rrtmg_sw_cloud_optics, only: rrtmg_sw_cloud_optics use rrtmgp_aux, only: check_error_msg use netcdf @@ -349,25 +347,18 @@ end subroutine rrtmgp_sw_cloud_optics_init !! \section arg_table_rrtmgp_sw_cloud_optics_run !! \htmlinclude rrtmgp_sw_cloud_optics.html !! - subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, icseed_sw, cld_frac, cld_lwp, & - cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, aerosolssw, & - sw_cloud_props, sw_gas_props, ipsdsw0, nday, idxday, sw_optical_props_clouds, & - sw_optical_props_aerosol, cldtausw, errmsg, errflg) + subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, cld_frac, cld_lwp, cld_reliq, cld_iwp, & + cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, sw_cloud_props, sw_gas_props, & + nday, idxday, sw_optical_props_cloudsByBand, cldtausw, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & Model integer, intent(in) :: & ncol, & ! Number of horizontal gridpoints - nday, & ! Number of daylit points. - ipsdsw0 ! Initial permutation seed for McICA + nday ! Number of daylit points. integer,intent(in),dimension(ncol) :: & idxday ! Indices for daylit points. - integer,intent(in),dimension(ncol) :: & - icseed_sw ! auxiliary special cloud related array when module - ! variable isubcsw=2, it provides permutation seed - ! for each column profile that are used for generating - ! random numbers. when isubcsw /=2, it will not be used. real(kind_phys), dimension(ncol,model%levs),intent(in) :: & cld_frac, & ! Total cloud fraction by layer cld_lwp, & ! Cloud liquid water path @@ -382,8 +373,6 @@ subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, icseed_sw, cld_frac, cld_lwp, sw_cloud_props ! RRTMGP DDT: type(ty_gas_optics_rrtmgp),intent(in) :: & sw_gas_props ! RRTMGP DDT: K-distribution data - real(kind_phys), intent(in),dimension(ncol, model%levs, sw_gas_props%get_nband(),3) :: & - aerosolssw ! Shortwave aerosol optical properties, by band (tau,ssa,g) ! Outputs character(len=*), intent(out) :: & @@ -391,20 +380,12 @@ subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, icseed_sw, cld_frac, cld_lwp, integer, intent(out) :: & errflg ! Error code type(ty_optical_props_2str),intent(out) :: & - sw_optical_props_clouds, & ! RRTMGP DDT: Shortwave optical properties (cloudy atmosphere) - sw_optical_props_aerosol ! RRTMGP DDT: Shortwave optical properties (aerosols) + sw_optical_props_cloudsByBand ! RRTMGP DDT: Shortwave optical properties (cloudy atmosphere) real(kind_phys), dimension(ncol,Model%levs), intent(out) :: & cldtausw ! approx 10.mu band layer cloud optical depth ! Local variables - integer :: iCol - integer,dimension(ncol) :: ipseed_sw logical,dimension(nday,model%levs) :: liqmask, icemask - type(ty_optical_props_2str) :: sw_optical_props_cloudsByBand - type(random_stat) :: rng_stat - real(kind_phys), dimension(sw_gas_props%get_ngpt(),model%levs,ncol) :: rng3D - real(kind_phys), dimension(sw_gas_props%get_ngpt()*model%levs) :: rng1D - logical, dimension(ncol,model%levs,sw_gas_props%get_ngpt()) :: cldfracMCICA real(kind_phys), dimension(nday,model%levs,sw_gas_props%get_nband()) :: & tau_cld, ssa_cld, asy_cld @@ -422,25 +403,12 @@ subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, icseed_sw, cld_frac, cld_lwp, icemask = (cld_frac(idxday(1:nday),:) .gt. 0 .and. cld_iwp(idxday(1:nday),:) .gt. 0) ! ####################################################################################### - ! Allocate space for RRTMGP DDTs containing cloud and aerosol radiative properties + ! Allocate space for RRTMGP DDTs containing cloud radiative properties ! ####################################################################################### ! Cloud optics [nday,model%levs,nBands] call check_error_msg('rrtmgp_sw_cloud_optics_run',sw_optical_props_cloudsByBand%alloc_2str(& nday, model%levs, sw_gas_props%get_band_lims_wavenumber())) - ! Aerosol optics [nday,model%levs,nBands] - call check_error_msg('rrtmgp_sw_cloud_optics_run',sw_optical_props_aerosol%alloc_2str( & - nday, model%levs, sw_gas_props%get_band_lims_wavenumber())) - ! Cloud optics [nday,model%levs,nGpt] - call check_error_msg('rrtmgp_sw_cloud_optics_run',sw_optical_props_clouds%alloc_2str( & - nday, model%levs, sw_gas_props)) - - ! ####################################################################################### - ! Copy aerosol optical information to RRTMGP DDT - ! ####################################################################################### - sw_optical_props_aerosol%tau = aerosolssw(idxday(1:nday),:,:,1) - sw_optical_props_aerosol%ssa = aerosolssw(idxday(1:nday),:,:,2) - sw_optical_props_aerosol%g = aerosolssw(idxday(1:nday),:,:,3) - + ! ####################################################################################### ! Compute cloud-optics for RTE. ! ####################################################################################### @@ -458,7 +426,7 @@ subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, icseed_sw, cld_frac, cld_lwp, cld_reliq(idxday(1:nday),:), & ! IN - Cloud liquid effective radius cld_reice(idxday(1:nday),:), & ! IN - Cloud ice effective radius sw_optical_props_cloudsByBand)) ! OUT - RRTMGP DDT: Shortwave optical properties, - ! in each band (tau,ssa,g) + ! in each band (tau,ssa,g) else ! RRTMG cloud-optics if (any(cld_frac .gt. 0)) then @@ -477,41 +445,6 @@ subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, icseed_sw, cld_frac, cld_lwp, endif endif - ! ####################################################################################### - ! Change random number seed value for each radiation invocation (isubcsw =1 or 2). - ! ####################################################################################### - if(isubcsw == 1) then ! advance prescribed permutation seed - do iCol = 1, ncol - ipseed_sw(iCol) = ipsdsw0 + iCol - enddo - elseif (isubcsw == 2) then ! use input array of permutaion seeds - do iCol = 1, ncol - ipseed_sw(iCol) = icseed_sw(iCol) - enddo - endif - - ! ####################################################################################### - ! Call McICA to generate subcolumns. - ! ####################################################################################### - ! Call RNG. Mersennse Twister accepts 1D array, so loop over columns and collapse along G-points - ! and layers. ([nGpts,model%levs,nColumn]-> [nGpts*model%levs]*nColumn) - do iCol=1,ncol - call random_setseed(ipseed_sw(icol),rng_stat) - call random_number(rng1D,rng_stat) - rng3D(:,:,iCol) = reshape(source = rng1D,shape=[sw_gas_props%get_ngpt(),model%levs]) - enddo - - ! Call McICA - select case ( iovrsw ) - ! Maximumn-random - case(1) - call check_error_msg('rrtmgp_sw_cloud_optics_run',sampled_mask_max_ran(rng3D,cld_frac,cldfracMCICA)) - end select - - ! Map band optical depth to each g-point using McICA - call check_error_msg('rrtmgp_sw_cloud_optics_run',draw_samples(& - cldfracMCICA(idxday(1:nDay),:,:),sw_optical_props_cloudsByBand,sw_optical_props_clouds)) - ! GFS_RRTMGP_POST_RUN() requires the SW optical depth ~0.55microns cldtausw(idxday(1:nDay),:) = sw_optical_props_cloudsByBand%tau(:,:,11) endif diff --git a/physics/rrtmgp_sw_cloud_optics.meta b/physics/rrtmgp_sw_cloud_optics.meta index 0e0e968ab..283270081 100644 --- a/physics/rrtmgp_sw_cloud_optics.meta +++ b/physics/rrtmgp_sw_cloud_optics.meta @@ -160,23 +160,6 @@ kind = kind_phys intent = in optional = F -[icseed_sw] - standard_name = seed_random_numbers_sw_for_RRTMGP - long_name = seed for random number generation for shortwave radiation - units = none - dimensions = (horizontal_dimension) - type = integer - intent = in - optional = F -[aerosolssw] - standard_name = RRTMGP_aerosol_optical_properties_for_shortwave_bands_01_16 - long_name = aerosol optical properties for shortwave bands 01-16 - units = various - dimensions = (horizontal_dimension,vertical_dimension,number_of_lw_bands_rrtmgp,number_of_aerosol_output_fields_for_shortwave_radiation) - type = real - kind = kind_phys - intent = in - optional = F [sw_cloud_props] standard_name = coefficients_for_sw_cloud_optics long_name = DDT containing spectral information for cloudy RRTMGP SW radiation scheme @@ -193,14 +176,6 @@ type = ty_gas_optics_rrtmgp intent = in optional = F -[ipsdsw0] - standard_name = initial_permutation_seed_sw - long_name = initial seed for McICA SW - units = none - dimensions = () - type = integer - intent = in - optional = F [nday] standard_name = daytime_points_dimension long_name = daytime points dimension @@ -217,16 +192,8 @@ type = integer intent = in optional = F -[sw_optical_props_clouds] - standard_name = shortwave_optical_properties_for_cloudy_atmosphere - long_name = Fortran DDT containing RRTMGP optical properties - units = DDT - dimensions = () - type = ty_optical_props_2str - intent = out - optional = F -[sw_optical_props_aerosol] - standard_name = shortwave_optical_properties_for_aerosols +[sw_optical_props_cloudsByBand] + standard_name = shortwave_optical_properties_for_cloudy_atmosphere_by_band long_name = Fortran DDT containing RRTMGP optical properties units = DDT dimensions = () diff --git a/physics/rrtmgp_sw_cloud_sampling.F90 b/physics/rrtmgp_sw_cloud_sampling.F90 new file mode 100644 index 000000000..504e5f733 --- /dev/null +++ b/physics/rrtmgp_sw_cloud_sampling.F90 @@ -0,0 +1,119 @@ +module rrtmgp_sw_cloud_sampling + use machine, only: kind_phys + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp + use physparam, only: isubcsw, iovrsw + use mo_optical_props, only: ty_optical_props_2str + use mo_cloud_sampling, only: sampled_mask_max_ran, sampled_mask_exp_ran, draw_samples + use mersenne_twister, only: random_setseed, random_number, random_stat + use rrtmgp_aux, only: check_error_msg + use netcdf + +contains + + ! ######################################################################################### + ! SUBROUTINE mcica_init + ! ######################################################################################### + subroutine rrtmgp_sw_cloud_sampling_init() + end subroutine rrtmgp_sw_cloud_sampling_init + + ! ######################################################################################### + ! SUBROTUINE rrtmgp_sw_cloud_sampling_run() + ! ######################################################################################### +!! \section arg_table_rrtmgp_sw_cloud_sampling_run +!! \htmlinclude rrtmgp_sw_cloud_sampling.html +!! + subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxday, & + icseed_sw, cld_frac, sw_gas_props, sw_optical_props_cloudsByBand, & + sw_optical_props_clouds, errmsg, errflg) + + ! Inputs + logical, intent(in) :: & + doSWrad ! Logical flag for shortwave radiation call + integer, intent(in) :: & + nCol, & ! Number of horizontal gridpoints + nDay, & ! Number of daylit points. + nLev, & ! Number of vertical layers + ipsdsw0 ! Initial permutation seed for McICA + integer,intent(in),dimension(ncol) :: & + idxday ! Indices for daylit points. + integer,intent(in),dimension(ncol) :: & + icseed_sw ! auxiliary special cloud related array when module + ! variable isubcsw=2, it provides permutation seed + ! for each column profile that are used for generating + ! random numbers. when isubcsw /=2, it will not be used. + real(kind_phys), dimension(ncol,nLev),intent(in) :: & + cld_frac ! Total cloud fraction by layer + type(ty_gas_optics_rrtmgp),intent(in) :: & + sw_gas_props ! RRTMGP DDT: K-distribution data + type(ty_optical_props_2str),intent(in) :: & + sw_optical_props_cloudsByBand ! RRTMGP DDT: Shortwave optical properties (cloudy atmosphere) + + ! Outputs + character(len=*), intent(out) :: & + errmsg ! Error message + integer, intent(out) :: & + errflg ! Error code + type(ty_optical_props_2str),intent(out) :: & + sw_optical_props_clouds ! RRTMGP DDT: Shortwave optical properties (cloudy atmosphere) + + ! Local variables + integer :: iCol + integer,dimension(ncol) :: ipseed_sw + type(random_stat) :: rng_stat + real(kind_phys), dimension(sw_gas_props%get_ngpt(),nLev,ncol) :: rng3D + real(kind_phys), dimension(sw_gas_props%get_ngpt()*nLev) :: rng1D + logical, dimension(ncol,nLev,sw_gas_props%get_ngpt()) :: cldfracMCICA + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + if (.not. doSWrad) return + if (nDay .gt. 0) then + + ! Allocate space RRTMGP DDTs [nday,nLev,nGpt] + call check_error_msg('rrtmgp_sw_cloud_sampling_run',sw_optical_props_clouds%alloc_2str( & + nday, nLev, sw_gas_props)) + + ! Change random number seed value for each radiation invocation (isubcsw =1 or 2). + if(isubcsw == 1) then ! advance prescribed permutation seed + do iCol = 1, ncol + ipseed_sw(iCol) = ipsdsw0 + iCol + enddo + elseif (isubcsw == 2) then ! use input array of permutaion seeds + do iCol = 1, ncol + ipseed_sw(iCol) = icseed_sw(iCol) + enddo + endif + + ! Call McICA to generate subcolumns. + ! Call RNG. Mersennse Twister accepts 1D array, so loop over columns and collapse along G-points + ! and layers. ([nGpts,nLev,nColumn]-> [nGpts*nLev]*nColumn) + do iCol=1,ncol + call random_setseed(ipseed_sw(icol),rng_stat) + call random_number(rng1D,rng_stat) + rng3D(:,:,iCol) = reshape(source = rng1D,shape=[sw_gas_props%get_ngpt(),nLev]) + enddo + + ! Call McICA + select case ( iovrsw ) + ! Maximumn-random + case(1) + call check_error_msg('rrtmgp_sw_cloud_sampling_run',sampled_mask_max_ran(rng3D,cld_frac,cldfracMCICA)) + end select + + ! Map band optical depth to each g-point using McICA + call check_error_msg('rrtmgp_sw_cloud_sampling_run',draw_samples(& + cldfracMCICA(idxday(1:nDay),:,:),sw_optical_props_cloudsByBand,sw_optical_props_clouds)) + + endif + + end subroutine rrtmgp_sw_cloud_sampling_run + + ! ######################################################################################### + ! SUBROTUINE rrtmgp_sw_cloud_sampling_finalize() + ! ######################################################################################### + subroutine rrtmgp_sw_cloud_sampling_finalize() + end subroutine rrtmgp_sw_cloud_sampling_finalize + +end module rrtmgp_sw_cloud_sampling diff --git a/physics/rrtmgp_sw_cloud_sampling.meta b/physics/rrtmgp_sw_cloud_sampling.meta new file mode 100644 index 000000000..1ffe9ba84 --- /dev/null +++ b/physics/rrtmgp_sw_cloud_sampling.meta @@ -0,0 +1,109 @@ +[ccpp-arg-table] + name = rrtmgp_sw_cloud_sampling_run + type = scheme +[doSWrad] + standard_name = flag_to_calc_sw + long_name = logical flags for sw radiation calls + units = flag + dimensions = () + type = logical + intent = in + optional = F +[ncol] + standard_name = horizontal_loop_extent + long_name = horizontal dimension + units = count + dimensions = () + type = integer + intent = in + optional = F +[nday] + standard_name = daytime_points_dimension + long_name = daytime points dimension + units = count + dimensions = () + type = integer + intent = in + optional = F +[nLev] + standard_name = vertical_dimension + long_name = number of vertical levels + units = count + dimensions = () + type = integer + intent = in + optional = F +[ipsdsw0] + standard_name = initial_permutation_seed_sw + long_name = initial seed for McICA SW + units = none + dimensions = () + type = integer + intent = in + optional = F +[idxday] + standard_name = daytime_points + long_name = daytime points + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[icseed_sw] + standard_name = seed_random_numbers_sw_for_RRTMGP + long_name = seed for random number generation for shortwave radiation + units = none + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[cld_frac] + standard_name = total_cloud_fraction + long_name = layer total cloud fraction + units = frac + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[sw_gas_props] + standard_name = coefficients_for_sw_gas_optics + long_name = DDT containing spectral information for RRTMGP SW radiation scheme + units = DDT + dimensions = () + type = ty_gas_optics_rrtmgp + intent = in + optional = F +[sw_optical_props_cloudsByBand] + standard_name = shortwave_optical_properties_for_cloudy_atmosphere_by_band + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_2str + intent = in + optional = F +[sw_optical_props_clouds] + standard_name = shortwave_optical_properties_for_cloudy_atmosphere + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_2str + intent = out + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F \ No newline at end of file