diff --git a/physics/GFS_rrtmgp_lw.F90 b/physics/GFS_rrtmgp_lw.F90 index d8e2d0336..c14481543 100644 --- a/physics/GFS_rrtmgp_lw.F90 +++ b/physics/GFS_rrtmgp_lw.F90 @@ -1,7 +1,6 @@ ! ########################################################################################### ! ########################################################################################### module GFS_rrtmgp_lw - use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp_type use mo_gas_concentrations, only: ty_gas_concs use mo_fluxes, only: ty_fluxes_broadband use mo_fluxes_byband, only: ty_fluxes_byband @@ -9,7 +8,8 @@ module GFS_rrtmgp_lw use mo_source_functions, only: ty_source_func_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_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp_type + use mo_cloud_optics, only: ty_cloud_optics_type use mo_cloud_sampling, only: sampled_mask_max_ran, sampled_mask_exp_ran, draw_samples use machine, only: kind_phys use module_radlw_parameters, only: topflw_type, sfcflw_type, proflw_type @@ -56,10 +56,10 @@ module GFS_rrtmgp_lw ! Classes used by rte+rrtmgp !type(ty_gas_optics_rrtmgp) :: & ! kdist_lw - type(ty_cloud_optics) :: & - kdist_lw_cldy + !type(ty_cloud_optics) :: & + ! kdist_lw_cldy type(ty_gas_concs) :: & - gas_concs_lw + gas_concentrations public GFS_rrtmgp_lw_init, GFS_rrtmgp_lw_run, GFS_rrtmgp_lw_finalize contains @@ -67,18 +67,20 @@ module GFS_rrtmgp_lw ! GFS_rrtmgp_lw_init ! ######################################################################################### !! \section arg_table_GFS_rrtmgp_lw_init Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |-----------------|------------------------------------------|--------------------------------------------------------------------|-------|------|---------------------------|-----------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | mpirank | mpi_rank | current MPI rank | index | 0 | integer | | in | F | -!! | mpiroot | mpi_root | master MPI rank | index | 0 | integer | | in | F | -!! | mpicomm | mpi_comm | MPI communicator | index | 0 | integer | | in | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp_type | | inout | F | +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |--------------------|-------------------------------------------------|---------------------------------------------------------------------------|-------|------|---------------------------|-----------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | mpirank | mpi_rank | current MPI rank | index | 0 | integer | | in | F | +!! | mpiroot | mpi_root | master MPI rank | index | 0 | integer | | in | F | +!! | mpicomm | mpi_comm | MPI communicator | index | 0 | integer | | in | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp_type | | inout | F | +!! | kdist_lw_cldy | K_distribution_file_for_cloudy_RRTMGP_LW_scheme | DDT containing spectral information for cloudy RRTMGP LW radiation scheme | DDT | 0 | ty_cloud_optics_type | | inout | F | !! ! ######################################################################################### - subroutine GFS_rrtmgp_lw_init(Model,mpicomm, mpirank, mpiroot, kdist_lw, errmsg, errflg) + subroutine GFS_rrtmgp_lw_init(Model,mpicomm, mpirank, mpiroot, kdist_lw, kdist_lw_cldy, & + errmsg, errflg) use netcdf #ifdef MPI @@ -94,6 +96,11 @@ subroutine GFS_rrtmgp_lw_init(Model,mpicomm, mpirank, mpiroot, kdist_lw, errmsg, mpiroot ! Master MPI rank type(ty_gas_optics_rrtmgp_type),intent(inout) :: & kdist_lw + type(ty_cloud_optics_type),intent(inout) :: & + kdist_lw_cldy +! type(ty_gas_concs_type),intent(inout) :: & +! gas_concentrations + ! Outputs character(len=*), intent(out) :: & errmsg ! Error message @@ -500,9 +507,9 @@ subroutine GFS_rrtmgp_lw_init(Model,mpicomm, mpirank, mpiroot, kdist_lw, errmsg, ! Initialize gas concentrations and gas optics class with data do iGas=1,nGases - call check_error_msg(gas_concs_lw%set_vmr(active_gases(iGas), 0._kind_phys)) + call check_error_msg(gas_concentrations%set_vmr(active_gases(iGas), 0._kind_phys)) enddo - call check_error_msg(kdist_lw%load(gas_concs_lw, gas_names, key_species, band2gpt, & + call check_error_msg(kdist_lw%load(gas_concentrations, gas_names, key_species, band2gpt, & band_lims, press_ref, press_ref_trop, temp_ref, temp_ref_p, temp_ref_t, & vmr_ref, kmajor, kminor_lower, kminor_upper, gas_minor,identifier_minor, & minor_gases_lower, minor_gases_upper, minor_limits_gpt_lower, & @@ -774,12 +781,13 @@ end subroutine GFS_rrtmgp_lw_init !! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp_type | | in | F | +!! | kdist_lw_cldy | K_distribution_file_for_cloudy_RRTMGP_LW_scheme | DDT containing spectral information for cloudy RRTMGP LW radiation scheme | DDT | 0 | ty_cloud_optics_type | | inout | F | !! ! ######################################################################################### subroutine GFS_rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr_n2o, & ! IN vmr_ch4, vmr_o2, vmr_co, vmr_cfc11, vmr_cfc12, vmr_cfc22, vmr_ccl4, icseed, tau_aer, & ! IN ssa_aer, sfc_emiss, skt, dzlyr, delpin, de_lgth, ncol, nlay, lprint, cldfrac, lslwr, & ! IN - kdist_lw, & + kdist_lw, kdist_lw_cldy, & hlwc, topflx, sfcflx, cldtau, & ! OUT hlw0, hlwb, flxprf, & ! OPT(out) cld_lwp, cld_ref_liq, cld_iwp, cld_ref_ice, cld_rwp, cld_ref_rain, cld_swp, & ! OPT(in) @@ -799,6 +807,10 @@ subroutine GFS_rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, lslwr ! Flag to calculate RRTMGP LW? (1) type(ty_gas_optics_rrtmgp_type),intent(in) :: & kdist_lw ! DDT containing LW spectral information + type(ty_cloud_optics_type),intent(in) :: & + kdist_lw_cldy +! type(ty_gas_concs_type),intent(inout) :: & +! gas_concentrations real(kind_phys), dimension(ncol), intent(in) :: & sfc_emiss, & ! Surface emissivity (1) skt, & ! Surface(skin) temperature (K) @@ -1018,13 +1030,13 @@ subroutine GFS_rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, ! ####################################################################################### ! Set gas concentrations ! ####################################################################################### - call gas_concs_lw%reset() - call check_error_msg(gas_concs_lw%set_vmr('o2', vmr_o2)) - call check_error_msg(gas_concs_lw%set_vmr('co2', vmr_co2)) - call check_error_msg(gas_concs_lw%set_vmr('ch4', vmr_ch4)) - call check_error_msg(gas_concs_lw%set_vmr('n2o', vmr_n2o)) - call check_error_msg(gas_concs_lw%set_vmr('h2o', vmr_h2o)) - call check_error_msg(gas_concs_lw%set_vmr('o3', vmr_o3)) + call gas_concentrations%reset() + call check_error_msg(gas_concentrations%set_vmr('o2', vmr_o2)) + call check_error_msg(gas_concentrations%set_vmr('co2', vmr_co2)) + call check_error_msg(gas_concentrations%set_vmr('ch4', vmr_ch4)) + call check_error_msg(gas_concentrations%set_vmr('n2o', vmr_n2o)) + call check_error_msg(gas_concentrations%set_vmr('h2o', vmr_h2o)) + call check_error_msg(gas_concentrations%set_vmr('o3', vmr_o3)) ! ####################################################################################### ! Copy aerosol to RRTMGP DDT @@ -1096,7 +1108,7 @@ subroutine GFS_rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, ! ####################################################################################### call check_error_msg(rte_lw( & kdist_lw, & - gas_concs_lw, & + gas_concentrations, & p_lay(1:ncol,1:nlay), & t_lay(1:ncol,1:nlay), & p_lev(1:ncol,1:nlay+1), & diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index 6d6916b8b..fcc4cf0fe 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -77,13 +77,14 @@ end subroutine GFS_rrtmgp_pre_init !! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp_type | | in | F | +!! | kdist_sw | K_distribution_file_for_RRTMGP_SW_scheme | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp_type | | in | F | !! ! Attention - the output arguments lm, im, lmk, lmp must not be set ! in the CCPP version - they are defined in the interstitial_create routine ! ######################################################################################### subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Cldprop, Coupling, & ! IN Radtend, & ! INOUT - lm, im, lmk, lmp, kdist_lw, & ! IN + lm, im, lmk, lmp, kdist_lw, kdist_sw, & ! IN kd, kt, kb, raddt, delp, dz, plvl, plyr, tlvl, tlyr, tsfg, tsfa, qlyr, olyr, & ! OUT gasvmr_co2, gasvmr_n2o, gasvmr_ch4, gasvmr_o2, gasvmr_co, gasvmr_cfc11, & ! OUT gasvmr_cfc12, gasvmr_cfc22, gasvmr_ccl4, gasvmr_cfc113, faersw1, faersw2, faersw3, & ! OUT @@ -138,14 +139,9 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Cldprop, Coup progclduni ! Unified cloud-scheme use surface_perturbation, only: & cdfnor ! Routine to compute CDF (used to compute percentiles) - ! RRTMGP stuff + ! RRTMGP types use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp_type - use GFS_rrtmgp_lw, only: & - nBandsLW!, & ! Number of LW bands in RRTMGP - !kdist_lw ! DDT contining LW spectral information - use GFS_rrtmgp_sw, only: & - nBandsSW, & ! Number of SW bands in RRTMGP - kdist_sw ! DDT contining SW spectral information + implicit none ! Inputs @@ -158,7 +154,9 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Cldprop, Coup type(GFS_cldprop_type), intent(in) :: Cldprop type(GFS_coupling_type), intent(in) :: Coupling integer, intent(in) :: im, lm, lmk, lmp - type(ty_gas_optics_rrtmgp_type),intent(in) :: kdist_lw + type(ty_gas_optics_rrtmgp_type),intent(in) :: & + kdist_lw, & ! RRTMGP DDT containing spectral information for LW calculation + kdist_sw ! RRTMGP DDT containing spectral information for SW calculation ! Outputs integer, intent(out) :: kd, kt, kb @@ -172,9 +170,9 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Cldprop, Coup clouds6, clouds7, clouds8, clouds9 real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+1+LTP), intent(out) :: & plvl, tlvl - real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,nBandsSW), intent(out) :: & + real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,kdist_sw%get_nband()), intent(out) :: & faersw1, faersw2, faersw3 - real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,nBandsLW), intent(out) :: & + real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,kdist_lw%get_nband()), intent(out) :: & faerlw1, faerlw2, faerlw3 real(kind_phys), dimension(size(Grid%xlon,1),NSPC1), intent(out) :: & aerodp @@ -200,8 +198,8 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Cldprop, Coup real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,2:Model%ntrac) :: tracer1 real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NF_CLDS) :: clouds real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NF_VGAS) :: gasvmr - real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,nBandsSW,NF_AESW)::faersw - real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,nBandsLW,NF_AELW)::faerlw + real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,kdist_sw%get_nband(),NF_AESW)::faersw + real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,kdist_lw%get_nband(),NF_AELW)::faerlw ! Initialize CCPP error handling variables errmsg = '' @@ -468,16 +466,16 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Cldprop, Coup ! SW. ! For RRTMGP SW the bands are now ordered from [IR(band) -> nIR -> UV], in RRTMG the ! band ordering was [nIR -> UV -> IR(band)] - faersw1(1:IM,1:LMK,1) = faersw(1:IM,1:LMK,nBandsSW,1) - faersw2(1:IM,1:LMK,1) = faersw(1:IM,1:LMK,nBandsSW,2) - faersw3(1:IM,1:LMK,1) = faersw(1:IM,1:LMK,nBandsSW,3) - faersw1(1:IM,1:LMK,2:nBandsSW) = faersw(1:IM,1:LMK,1:nBandsSW-1,1) - faersw2(1:IM,1:LMK,2:nBandsSW) = faersw(1:IM,1:LMK,1:nBandsSW-1,2) - faersw3(1:IM,1:LMK,2:nBandsSW) = faersw(1:IM,1:LMK,1:nBandsSW-1,3) + faersw1(1:IM,1:LMK,1) = faersw(1:IM,1:LMK,kdist_sw%get_nband(),1) + faersw2(1:IM,1:LMK,1) = faersw(1:IM,1:LMK,kdist_sw%get_nband(),2) + faersw3(1:IM,1:LMK,1) = faersw(1:IM,1:LMK,kdist_sw%get_nband(),3) + faersw1(1:IM,1:LMK,2:kdist_sw%get_nband()) = faersw(1:IM,1:LMK,1:kdist_sw%get_nband()-1,1) + faersw2(1:IM,1:LMK,2:kdist_sw%get_nband()) = faersw(1:IM,1:LMK,1:kdist_sw%get_nband()-1,2) + faersw3(1:IM,1:LMK,2:kdist_sw%get_nband()) = faersw(1:IM,1:LMK,1:kdist_sw%get_nband()-1,3) ! LW - faerlw1(1:IM,1:LMK,1:nBandsLW) = faerlw(1:IM,1:LMK,1:nBandsLW,1) - faerlw2(1:IM,1:LMK,1:nBandsLW) = faerlw(1:IM,1:LMK,1:nBandsLW,2) - faerlw3(1:IM,1:LMK,1:nBandsLW) = faerlw(1:IM,1:LMK,1:nBandsLW,3) + faerlw1(1:IM,1:LMK,1:kdist_lw%get_nband()) = faerlw(1:IM,1:LMK,1:kdist_lw%get_nband(),1) + faerlw2(1:IM,1:LMK,1:kdist_lw%get_nband()) = faerlw(1:IM,1:LMK,1:kdist_lw%get_nband(),2) + faerlw3(1:IM,1:LMK,1:kdist_lw%get_nband()) = faerlw(1:IM,1:LMK,1:kdist_lw%get_nband(),3) ! Obtain cloud information for radiation calculations ! (clouds,cldsa,mtopa,mbota) diff --git a/physics/GFS_rrtmgp_sw.F90 b/physics/GFS_rrtmgp_sw.F90 index e4aa55b4b..f761306db 100644 --- a/physics/GFS_rrtmgp_sw.F90 +++ b/physics/GFS_rrtmgp_sw.F90 @@ -5,7 +5,8 @@ module GFS_rrtmgp_sw use physparam, only: iovrsw, icldflg, iswcliq, isubcsw use machine, only: kind_phys use mo_rte_kind, only: wl - use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp_type + use mo_cloud_optics, only: ty_cloud_optics_type use mo_gas_concentrations, only: ty_gas_concs use mo_fluxes, only: ty_fluxes_broadband use mo_fluxes_byband, only: ty_fluxes_byband @@ -16,7 +17,6 @@ module GFS_rrtmgp_sw use mo_rrtmgp_sw_cloud_optics, only: rrtmgp_sw_cloud_optics,mcica_subcol_sw 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_cloud_optics, only: ty_cloud_optics use mo_rrtmgp_clr_all_sky, only: rte_sw implicit none @@ -55,12 +55,12 @@ module GFS_rrtmgp_sw ipsdsw0 ! Initial seed for McICA ! Classes used by rte+rrtmgp - type(ty_gas_optics_rrtmgp) :: & - kdist_sw - type(ty_cloud_optics) :: & - kdist_sw_cldy +! type(ty_gas_optics_rrtmgp_type) :: & +! kdist_sw +! type(ty_cloud_optics) :: & +! kdist_sw_cldy type(ty_gas_concs) :: & - gas_concs_sw + gas_concentrations public GFS_rrtmgp_sw_init, GFS_rrtmgp_sw_run, GFS_rrtmgp_sw_finalize contains @@ -68,17 +68,20 @@ module GFS_rrtmgp_sw ! GFS_rrtmgp_sw_init ! ######################################################################################### !! \section arg_table_GFS_rrtmgp_sw_init Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |-----------------|---------------------------|---------------------------------------------------------|-------|------|------------------|-----------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | mpirank | mpi_rank | current MPI rank | index | 0 | integer | | in | F | -!! | mpiroot | mpi_root | master MPI rank | index | 0 | integer | | in | F | -!! | mpicomm | mpi_comm | MPI communicator | index | 0 | integer | | in | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |-----------------|-------------------------------------------------|--------------------------------------------------------------------|-------|------|---------------------------|-----------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | mpirank | mpi_rank | current MPI rank | index | 0 | integer | | in | F | +!! | mpiroot | mpi_root | master MPI rank | index | 0 | integer | | in | F | +!! | mpicomm | mpi_comm | MPI communicator | index | 0 | integer | | in | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | kdist_sw | K_distribution_file_for_RRTMGP_SW_scheme | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp_type | | inout | F | +!! | kdist_sw_cldy | K_distribution_file_for_cloudy_RRTMGP_SW_scheme | DDT containing spectral information for cloudy RRTMGP SW radiation scheme | DDT | 0 | ty_cloud_optics_type | | inout | F | !! ! ######################################################################################### - subroutine GFS_rrtmgp_sw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) + subroutine GFS_rrtmgp_sw_init(Model,mpicomm, mpirank, mpiroot, kdist_sw, kdist_sw_cldy, & + errmsg, errflg) use netcdf #ifdef MPI use mpi @@ -90,6 +93,12 @@ subroutine GFS_rrtmgp_sw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) mpicomm, & ! MPI communicator mpirank, & ! Current MPI rank mpiroot ! Master MPI rank + type(ty_gas_optics_rrtmgp_type) :: & + kdist_sw ! RRTMGP DDT containing SW spectral information + type(ty_cloud_optics_type) :: & + kdist_sw_cldy +! type(ty_gas_concs_type),intent(inout) :: & +! gas_concentrations ! Outputs character(len=*), intent(out) :: & errmsg ! Error message @@ -495,9 +504,9 @@ subroutine GFS_rrtmgp_sw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) ! Initialize gas concentrations and gas optics class with data do iGas=1,nGases - call check_error_msg(gas_concs_sw%set_vmr(active_gases(iGas), 0._kind_phys)) + call check_error_msg(gas_concentrations%set_vmr(active_gases(iGas), 0._kind_phys)) enddo - call check_error_msg(kdist_sw%load(gas_concs_sw, gas_names_sw, key_species_sw, band2gpt_sw, & + call check_error_msg(kdist_sw%load(gas_concentrations, gas_names_sw, key_species_sw, band2gpt_sw, & band_lims_sw, press_ref_sw, press_ref_trop_sw, temp_ref_sw, temp_ref_p_sw, temp_ref_t_sw, & vmr_ref_sw, kmajor_sw, kminor_lower_sw, kminor_upper_sw, gas_minor_sw,identifier_minor_sw, & minor_gases_lower_sw, minor_gases_upper_sw, minor_limits_gpt_lower_sw, & @@ -719,70 +728,72 @@ end subroutine GFS_rrtmgp_sw_init ! GFS_RRTMGP_SW_RUN ! ######################################################################################### !! \section arg_table_GFS_rrtmgp_sw_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |-----------------|------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------|---------|------|-------------|-----------|--------|----------| -!! | p_lay | air_pressure_at_layer_for_radiation_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | -!! | p_lev | air_pressure_at_interface_for_radiation_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | -!! | t_lay | air_temperature_at_layer_for_radiation | air temperature layer | K | 2 | real | kind_phys | in | F | -!! | t_lev | air_temperature_at_interface_for_radiation | air temperature level | K | 2 | real | kind_phys | in | F | -!! | q_lay | water_vapor_specific_humidity_at_layer_for_radiation | specific humidity layer | kg kg-1 | 2 | real | kind_phys | in | F | -!! | o3_lay | ozone_concentration_at_layer_for_radiation | ozone concentration layer | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_co2 | volume_mixing_ratio_co2 | volume mixing ratio co2 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_n2o | volume_mixing_ratio_n2o | volume mixing ratio no2 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_ch4 | volume_mixing_ratio_ch4 | volume mixing ratio ch4 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_o2 | volume_mixing_ratio_o2 | volume mixing ratio o2 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_co | volume_mixing_ratio_co | volume mixing ratio co | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_cfc11 | volume_mixing_ratio_cfc11 | volume mixing ratio cfc11 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_cfc12 | volume_mixing_ratio_cfc12 | volume mixing ratio cfc12 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_cfc22 | volume_mixing_ratio_cfc22 | volume mixing ratio cfc22 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_ccl4 | volume_mixing_ratio_ccl4 | volume mixing ratio ccl4 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | icseed | seed_random_numbers_sw | seed for random number generation for shortwave radiation | none | 1 | integer | | in | F | -!! | tau_aer | aerosol_optical_depth_for_longwave_bands_01-16 | aerosol optical depth for shortwave bands 01-16 | none | 3 | real | kind_phys | in | F | -!! | ssa_aer | aerosol_single_scattering_albedo_for_longwave_bands_01-16 | aerosol single scattering albedo for shortwave bands 01-16 | frac | 3 | real | kind_phys | in | F | -!! | asy_aer | aerosol_asymmetry_parameter_for_shortwave_bands_01-16 | aerosol asymmetry paramter for shortwave bands 01-16 | none | 3 | real | kind_phys | in | F | -!! | sfcalb_nir_dir | surface_albedo_due_to_near_IR_direct | surface albedo due to near IR direct beam | frac | 1 | real | kind_phys | in | F | -!! | sfcalb_nir_dif | surface_albedo_due_to_near_IR_diffused | surface albedo due to near IR diffused beam | frac | 1 | real | kind_phys | in | F | -!! | sfcalb_uvis_dir | surface_albedo_due_to_UV_and_VIS_direct | surface albedo due to UV+VIS direct beam | frac | 1 | real | kind_phys | in | F | -!! | sfcalb_uvis_dif | surface_albedo_due_to_UV_and_VIS_diffused | surface albedo due to UV+VIS diffused beam | frac | 1 | real | kind_phys | in | F | -!! | dzlyr | layer_thickness_for_radiation | layer thickness | km | 2 | real | kind_phys | in | F | -!! | delpin | layer_pressure_thickness_for_radiation | layer pressure thickness | hPa | 2 | real | kind_phys | in | F | -!! | de_lgth | cloud_decorrelation_length | cloud decorrelation length | km | 1 | real | kind_phys | in | F | -!! | cossza | cosine_of_zenith_angle | cosine of the solar zenit angle | none | 1 | real | kind_phys | in | F | -!! | solcon | solar_constant | solar constant | W m-2 | 0 | real | kind_phys | in | F | -!! | nday | daytime_points_dimension | daytime points dimension | count | 0 | integer | | in | F | -!! | idxday | daytime_points | daytime points | index | 1 | integer | | in | F | -!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | -!! | nlay | adjusted_vertical_layer_dimension_for_radiation | number of vertical layers for radiation | count | 0 | integer | | in | F | -!! | lprint | flag_print | flag to print | flag | 0 | logical | | in | F | -!! | cldfrac | total_cloud_fraction | total cloud fraction | frac | 2 | real | kind_phys | in | F | -!! | lsswr | flag_to_calc_sw | flag to calculate SW irradiances | flag | 0 | logical | | in | F | -!! | hswc | tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step | shortwave total sky heating rate | K s-1 | 2 | real | kind_phys | inout | F | -!! | topflx | sw_fluxes_top_atmosphere | shortwave total sky fluxes at the top of the atm | W m-2 | 1 | topfsw_type | | inout | F | -!! | sfcflx | sw_fluxes_sfc | shortwave total sky fluxes at the Earth surface | W m-2 | 1 | sfcfsw_type | | inout | F | -!! | cldtau | cloud_optical_depth_layers_at_0.55mu_band | approx .55mu band layer cloud optical depth | none | 2 | real | kind_phys | inout | F | -!! | hsw0 | tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step | shortwave clear sky heating rate | K s-1 | 2 | real | kind_phys | inout | T | -!! | hswb | sw_heating_rate_spectral | shortwave total sky heating rate (spectral) | K s-1 | 3 | real | kind_phys | inout | T | -!! | flxprf | sw_fluxes | sw fluxes total sky / csk and up / down at levels | W m-2 | 2 | profsw_type | | inout | T | -!! | fdncmp | components_of_surface_downward_shortwave_fluxes | derived type for special components of surface downward shortwave fluxes | W m-2 | 1 | cmpfsw_type | | inout | T | -!! | cld_lwp | cloud_liquid_water_path | cloud liquid water path | g m-2 | 2 | real | kind_phys | in | T | -!! | cld_ref_liq | mean_effective_radius_for_liquid_cloud | mean effective radius for liquid cloud | micron | 2 | real | kind_phys | in | T | -!! | cld_iwp | cloud_ice_water_path | cloud ice water path | g m-2 | 2 | real | kind_phys | in | T | -!! | cld_ref_ice | mean_effective_radius_for_ice_cloud | mean effective radius for ice cloud | micron | 2 | real | kind_phys | in | T | -!! | cld_rwp | cloud_rain_water_path | cloud rain water path | g m-2 | 2 | real | kind_phys | in | T | -!! | cld_ref_rain | mean_effective_radius_for_rain_drop | mean effective radius for rain drop | micron | 2 | real | kind_phys | in | T | -!! | cld_swp | cloud_snow_water_path | cloud snow water path | g m-2 | 2 | real | kind_phys | in | T | -!! | cld_ref_snow | mean_effective_radius_for_snow_flake | mean effective radius for snow flake | micron | 2 | real | kind_phys | in | T | -!! | cld_od | cloud_optical_depth | cloud optical depth | none | 2 | real | kind_phys | in | T | -!! | cld_ssa | cloud_single_scattering_albedo | cloud single scattering albedo | frac | 2 | real | kind_phys | in | T | -!! | cld_asy | cloud_asymmetry_parameter | cloud asymmetry parameter | none | 2 | real | kind_phys | in | T | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |-----------------|------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------|---------|------|---------------------------|-----------|--------|----------| +!! | p_lay | air_pressure_at_layer_for_radiation_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | +!! | p_lev | air_pressure_at_interface_for_radiation_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | +!! | t_lay | air_temperature_at_layer_for_radiation | air temperature layer | K | 2 | real | kind_phys | in | F | +!! | t_lev | air_temperature_at_interface_for_radiation | air temperature level | K | 2 | real | kind_phys | in | F | +!! | q_lay | water_vapor_specific_humidity_at_layer_for_radiation | specific humidity layer | kg kg-1 | 2 | real | kind_phys | in | F | +!! | o3_lay | ozone_concentration_at_layer_for_radiation | ozone concentration layer | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_co2 | volume_mixing_ratio_co2 | volume mixing ratio co2 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_n2o | volume_mixing_ratio_n2o | volume mixing ratio no2 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_ch4 | volume_mixing_ratio_ch4 | volume mixing ratio ch4 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_o2 | volume_mixing_ratio_o2 | volume mixing ratio o2 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_co | volume_mixing_ratio_co | volume mixing ratio co | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_cfc11 | volume_mixing_ratio_cfc11 | volume mixing ratio cfc11 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_cfc12 | volume_mixing_ratio_cfc12 | volume mixing ratio cfc12 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_cfc22 | volume_mixing_ratio_cfc22 | volume mixing ratio cfc22 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_ccl4 | volume_mixing_ratio_ccl4 | volume mixing ratio ccl4 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | icseed | seed_random_numbers_sw | seed for random number generation for shortwave radiation | none | 1 | integer | | in | F | +!! | tau_aer | aerosol_optical_depth_for_longwave_bands_01-16 | aerosol optical depth for shortwave bands 01-16 | none | 3 | real | kind_phys | in | F | +!! | ssa_aer | aerosol_single_scattering_albedo_for_longwave_bands_01-16 | aerosol single scattering albedo for shortwave bands 01-16 | frac | 3 | real | kind_phys | in | F | +!! | asy_aer | aerosol_asymmetry_parameter_for_shortwave_bands_01-16 | aerosol asymmetry paramter for shortwave bands 01-16 | none | 3 | real | kind_phys | in | F | +!! | sfcalb_nir_dir | surface_albedo_due_to_near_IR_direct | surface albedo due to near IR direct beam | frac | 1 | real | kind_phys | in | F | +!! | sfcalb_nir_dif | surface_albedo_due_to_near_IR_diffused | surface albedo due to near IR diffused beam | frac | 1 | real | kind_phys | in | F | +!! | sfcalb_uvis_dir | surface_albedo_due_to_UV_and_VIS_direct | surface albedo due to UV+VIS direct beam | frac | 1 | real | kind_phys | in | F | +!! | sfcalb_uvis_dif | surface_albedo_due_to_UV_and_VIS_diffused | surface albedo due to UV+VIS diffused beam | frac | 1 | real | kind_phys | in | F | +!! | dzlyr | layer_thickness_for_radiation | layer thickness | km | 2 | real | kind_phys | in | F | +!! | delpin | layer_pressure_thickness_for_radiation | layer pressure thickness | hPa | 2 | real | kind_phys | in | F | +!! | de_lgth | cloud_decorrelation_length | cloud decorrelation length | km | 1 | real | kind_phys | in | F | +!! | cossza | cosine_of_zenith_angle | cosine of the solar zenit angle | none | 1 | real | kind_phys | in | F | +!! | solcon | solar_constant | solar constant | W m-2 | 0 | real | kind_phys | in | F | +!! | nday | daytime_points_dimension | daytime points dimension | count | 0 | integer | | in | F | +!! | idxday | daytime_points | daytime points | index | 1 | integer | | in | F | +!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | +!! | nlay | adjusted_vertical_layer_dimension_for_radiation | number of vertical layers for radiation | count | 0 | integer | | in | F | +!! | lprint | flag_print | flag to print | flag | 0 | logical | | in | F | +!! | cldfrac | total_cloud_fraction | total cloud fraction | frac | 2 | real | kind_phys | in | F | +!! | lsswr | flag_to_calc_sw | flag to calculate SW irradiances | flag | 0 | logical | | in | F | +!! | hswc | tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step | shortwave total sky heating rate | K s-1 | 2 | real | kind_phys | inout | F | +!! | topflx | sw_fluxes_top_atmosphere | shortwave total sky fluxes at the top of the atm | W m-2 | 1 | topfsw_type | | inout | F | +!! | sfcflx | sw_fluxes_sfc | shortwave total sky fluxes at the Earth surface | W m-2 | 1 | sfcfsw_type | | inout | F | +!! | cldtau | cloud_optical_depth_layers_at_0.55mu_band | approx .55mu band layer cloud optical depth | none | 2 | real | kind_phys | inout | F | +!! | hsw0 | tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step | shortwave clear sky heating rate | K s-1 | 2 | real | kind_phys | inout | T | +!! | hswb | sw_heating_rate_spectral | shortwave total sky heating rate (spectral) | K s-1 | 3 | real | kind_phys | inout | T | +!! | flxprf | sw_fluxes | sw fluxes total sky / csk and up / down at levels | W m-2 | 2 | profsw_type | | inout | T | +!! | fdncmp | components_of_surface_downward_shortwave_fluxes | derived type for special components of surface downward shortwave fluxes | W m-2 | 1 | cmpfsw_type | | inout | T | +!! | cld_lwp | cloud_liquid_water_path | cloud liquid water path | g m-2 | 2 | real | kind_phys | in | T | +!! | cld_ref_liq | mean_effective_radius_for_liquid_cloud | mean effective radius for liquid cloud | micron | 2 | real | kind_phys | in | T | +!! | cld_iwp | cloud_ice_water_path | cloud ice water path | g m-2 | 2 | real | kind_phys | in | T | +!! | cld_ref_ice | mean_effective_radius_for_ice_cloud | mean effective radius for ice cloud | micron | 2 | real | kind_phys | in | T | +!! | cld_rwp | cloud_rain_water_path | cloud rain water path | g m-2 | 2 | real | kind_phys | in | T | +!! | cld_ref_rain | mean_effective_radius_for_rain_drop | mean effective radius for rain drop | micron | 2 | real | kind_phys | in | T | +!! | cld_swp | cloud_snow_water_path | cloud snow water path | g m-2 | 2 | real | kind_phys | in | T | +!! | cld_ref_snow | mean_effective_radius_for_snow_flake | mean effective radius for snow flake | micron | 2 | real | kind_phys | in | T | +!! | cld_od | cloud_optical_depth | cloud optical depth | none | 2 | real | kind_phys | in | T | +!! | cld_ssa | cloud_single_scattering_albedo | cloud single scattering albedo | frac | 2 | real | kind_phys | in | T | +!! | cld_asy | cloud_asymmetry_parameter | cloud asymmetry parameter | none | 2 | real | kind_phys | in | T | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | kdist_sw | K_distribution_file_for_RRTMGP_SW_scheme | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp_type | | in | F | +!! | kdist_sw_cldy | K_distribution_file_for_cloudy_RRTMGP_SW_scheme | DDT containing spectral information for cloudy RRTMGP SW radiation scheme | DDT | 0 | ty_cloud_optics_type | | inout | F | !! - subroutine GFS_rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr_n2o, & ! IN + subroutine GFS_rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr_n2o, & ! IN vmr_ch4, vmr_o2, vmr_co, vmr_cfc11, vmr_cfc12, vmr_cfc22, vmr_ccl4, icseed, tau_aer, & ! IN ssa_aer, asy_aer, sfcalb_nir_dir, sfcalb_nir_dif, sfcalb_uvis_dir, sfcalb_uvis_dif, & ! IN dzlyr, delpin, de_lgth, cossza, solcon, nday, idxday, ncol, nlay, lprint, cldfrac, & ! IN - lsswr, & ! IN + lsswr, kdist_sw, kdist_sw_cldy, & ! IN hswc, topflx, sfcflx, cldtau, & ! OUT hsw0, hswB, flxprf, fdncmp, cld_lwp, cld_ref_liq, cld_iwp, cld_ref_ice, cld_rwp, & ! OUT(optional) cld_ref_rain, cld_swp, cld_ref_snow, cld_od, cld_ssa, cld_asy, & ! OUT(optional) @@ -803,6 +814,12 @@ subroutine GFS_rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, logical, intent(in) :: & lprint, & ! Control flag for diagnostics lsswr ! Flag to calculate RRTMGP SW? + type(ty_gas_optics_rrtmgp_type),intent(in) :: & + kdist_sw ! DDT containing LW spectral information + type(ty_cloud_optics_type),intent(in) :: & + kdist_sw_cldy +! type(ty_gas_concs_type),intent(inout) :: & +! gas_concentrations real(kind_phys), intent(in) :: & solcon ! Solar constant (W/m2) real(kind_phys), dimension(ncol), intent(in) :: & @@ -1084,13 +1101,13 @@ subroutine GFS_rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, ! ####################################################################################### ! Set gas concentrations ! ####################################################################################### - call gas_concs_sw%reset() - call check_error_msg(gas_concs_sw%set_vmr('o2', vmr_o2(idxday,1:nlay))) - call check_error_msg(gas_concs_sw%set_vmr('co2', vmr_co2(idxday,1:nlay))) - call check_error_msg(gas_concs_sw%set_vmr('ch4', vmr_ch4(idxday,1:nlay))) - call check_error_msg(gas_concs_sw%set_vmr('n2o', vmr_n2o(idxday,1:nlay))) - call check_error_msg(gas_concs_sw%set_vmr('h2o', vmr_h2o(idxday,1:nlay))) - call check_error_msg(gas_concs_sw%set_vmr('o3', vmr_o3(idxday,1:nlay))) + call gas_concentrations%reset() + call check_error_msg(gas_concentrations%set_vmr('o2', vmr_o2(idxday,1:nlay))) + call check_error_msg(gas_concentrations%set_vmr('co2', vmr_co2(idxday,1:nlay))) + call check_error_msg(gas_concentrations%set_vmr('ch4', vmr_ch4(idxday,1:nlay))) + call check_error_msg(gas_concentrations%set_vmr('n2o', vmr_n2o(idxday,1:nlay))) + call check_error_msg(gas_concentrations%set_vmr('h2o', vmr_h2o(idxday,1:nlay))) + call check_error_msg(gas_concentrations%set_vmr('o3', vmr_o3(idxday,1:nlay))) ! ####################################################################################### ! Copy aerosol to RRTMG DDT @@ -1175,7 +1192,7 @@ subroutine GFS_rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, ! ####################################################################################### call check_error_msg(rte_sw( & kdist_sw, & - gas_concs_sw, & + gas_concentrations, & p_lay(idxday,1:nlay), & t_lay(idxday,1:nlay), & p_lev(idxday,1:nlay+1), & diff --git a/physics/rte-rrtmgp b/physics/rte-rrtmgp index f0748ad17..43b02b7ba 160000 --- a/physics/rte-rrtmgp +++ b/physics/rte-rrtmgp @@ -1 +1 @@ -Subproject commit f0748ad17030875a1acb9013139b679a8c5262f1 +Subproject commit 43b02b7ba21f5e2ef31da4f2411a519caf1546a3