diff --git a/ccpp/data/CCPP_typedefs.F90 b/ccpp/data/CCPP_typedefs.F90 index 8c18aa481..bce8a33fc 100644 --- a/ccpp/data/CCPP_typedefs.F90 +++ b/ccpp/data/CCPP_typedefs.F90 @@ -11,8 +11,8 @@ module CCPP_typedefs use GFS_typedefs, only: clear_val, LTP ! Physics type defininitions needed for interstitial DDTs - use module_radsw_parameters, only: profsw_type, cmpfsw_type, NBDSW - use module_radlw_parameters, only: proflw_type, NBDLW + use module_radsw_parameters, only: profsw_type, cmpfsw_type + use module_radlw_parameters, only: proflw_type use GFS_typedefs, only: GFS_control_type implicit none @@ -21,17 +21,11 @@ module CCPP_typedefs ! To ensure that these values match what's in the physics, array ! sizes are compared in the auto-generated physics caps in debug mode - ! from module_radiation_aerosols - integer, parameter :: NF_AESW = 3 - integer, parameter :: NF_AELW = 3 - integer, parameter :: NSPC = 5 - integer, parameter :: NSPC1 = NSPC + 1 ! from module_radiation_clouds integer, parameter :: NF_CLDS = 9 ! from module_radiation_gases integer, parameter :: NF_VGAS = 10 ! from module_radiation_surface - integer, parameter :: NF_ALBD = 4 ! GFS_interstitial_type !< fields required to replace interstitial code in GFS_{physics,radiation}_driver.F90 in CCPP public GFS_interstitial_type @@ -147,7 +141,6 @@ module CCPP_typedefs real (kind=kind_phys), pointer :: fm10_ice(:) => null() !< real (kind=kind_phys), pointer :: fm10_land(:) => null() !< real (kind=kind_phys), pointer :: fm10_water(:) => null() !< - real (kind=kind_phys) :: frain !< real (kind=kind_phys), pointer :: frland(:) => null() !< real (kind=kind_phys), pointer :: fscav(:) => null() !< real (kind=kind_phys), pointer :: fswtr(:) => null() !< @@ -184,7 +177,6 @@ module CCPP_typedefs logical, pointer :: icy(:) => null() !< logical, pointer :: lake(:) => null() !< logical, pointer :: ocean(:) => null() !< - integer :: ipr !< integer, pointer :: islmsk(:) => null() !< integer, pointer :: islmsk_cice(:) => null() !< integer :: itc !< @@ -197,27 +189,17 @@ module CCPP_typedefs integer, pointer :: kpbl(:) => null() !< integer :: kt !< integer, pointer :: ktop(:) => null() !< - integer :: latidxprnt !< - integer :: levi !< - integer :: lmk !< - integer :: lmp !< integer, pointer :: mbota(:,:) => null() !< logical :: mg3_as_mg2 !< integer, pointer :: mtopa(:,:) => null() !< - integer :: nbdlw !< - integer :: nbdsw !< real (kind=kind_phys), pointer :: ncgl(:,:) => null() !< real (kind=kind_phys), pointer :: ncpr(:,:) => null() !< real (kind=kind_phys), pointer :: ncps(:,:) => null() !< integer :: ncstrac !< integer :: nday !< - integer :: nf_aelw !< - integer :: nf_aesw !< - integer :: nf_albd !< integer :: nn !< integer :: nsamftrac !< integer :: nscav !< - integer :: nspc1 !< integer :: ntcwx !< integer :: ntiwx !< integer :: ntrwx !< @@ -229,8 +211,6 @@ module CCPP_typedefs real (kind=kind_phys), pointer :: olyr(:,:) => null() !< logical , pointer :: otspt(:,:) => null() !< logical , pointer :: otsptflag(:) => null() !< - integer :: oz_coeffp5 !< - logical :: phys_hydrostatic !< real (kind=kind_phys), pointer :: plvl(:,:) => null() !< real (kind=kind_phys), pointer :: plyr(:,:) => null() !< real (kind=kind_phys), pointer :: prcpmp(:) => null() !< @@ -272,7 +252,6 @@ module CCPP_typedefs real (kind=kind_phys), pointer :: sigmaf(:) => null() !< real (kind=kind_phys), pointer :: sigmafrac(:,:) => null() !< real (kind=kind_phys), pointer :: sigmatot(:,:) => null() !< - logical :: skip_macro !< real (kind=kind_phys), pointer :: snowc(:) => null() !< real (kind=kind_phys), pointer :: snohf(:) => null() !< real (kind=kind_phys), pointer :: snowmp(:) => null() !< @@ -357,8 +336,8 @@ module CCPP_typedefs real (kind=kind_phys), pointer :: qs_lay(:,:) => null() !< real (kind=kind_phys), pointer :: q_lay(:,:) => null() !< real (kind=kind_phys), pointer :: deltaZ(:,:) => null() !< - real (kind=kind_phys), pointer :: deltaZc(:,:) => null() !< - real (kind=kind_phys), pointer :: deltaP(:,:) => null() !< + real (kind=kind_phys), pointer :: deltaZc(:,:) => null() !< + real (kind=kind_phys), pointer :: deltaP(:,:) => null() !< real (kind=kind_phys), pointer :: cloud_overlap_param(:,:) => null() !< Cloud overlap parameter real (kind=kind_phys), pointer :: cnv_cloud_overlap_param(:,:) => null() !< Convective cloud overlap parameter real (kind=kind_phys), pointer :: precip_overlap_param(:,:) => null() !< Precipitation overlap parameter @@ -366,12 +345,12 @@ module CCPP_typedefs real (kind=kind_phys), pointer :: aerosolslw(:,:,:,:) => null() !< Aerosol radiative properties in each LW band. real (kind=kind_phys), pointer :: aerosolssw(:,:,:,:) => null() !< Aerosol radiative properties in each SW band. real (kind=kind_phys), pointer :: precip_frac(:,:) => null() !< Precipitation fraction - real (kind=kind_phys), pointer :: cld_cnv_frac(:,:) => null() !< SGS convective cloud fraction + real (kind=kind_phys), pointer :: cld_cnv_frac(:,:) => null() !< SGS convective cloud fraction real (kind=kind_phys), pointer :: cld_cnv_lwp(:,:) => null() !< SGS convective cloud liquid water path real (kind=kind_phys), pointer :: cld_cnv_reliq(:,:) => null() !< SGS convective cloud liquid effective radius real (kind=kind_phys), pointer :: cld_cnv_iwp(:,:) => null() !< SGS convective cloud ice water path real (kind=kind_phys), pointer :: cld_cnv_reice(:,:) => null() !< SGS convective cloud ice effecive radius - real (kind=kind_phys), pointer :: cld_pbl_lwp(:,:) => null() !< SGS PBL cloud liquid water path + real (kind=kind_phys), pointer :: cld_pbl_lwp(:,:) => null() !< SGS PBL cloud liquid water path real (kind=kind_phys), pointer :: cld_pbl_reliq(:,:) => null() !< SGS PBL cloud liquid effective radius real (kind=kind_phys), pointer :: cld_pbl_iwp(:,:) => null() !< SGS PBL cloud ice water path real (kind=kind_phys), pointer :: cld_pbl_reice(:,:) => null() !< SGS PBL cloud ice effecive radius @@ -383,7 +362,7 @@ module CCPP_typedefs real (kind=kind_phys), pointer :: fluxswDOWN_allsky(:,:) => null() !< RRTMGP downward shortwave all-sky flux profile real (kind=kind_phys), pointer :: fluxswUP_clrsky(:,:) => null() !< RRTMGP upward shortwave clr-sky flux profile real (kind=kind_phys), pointer :: fluxswDOWN_clrsky(:,:) => null() !< RRTMGP downward shortwave clr-sky flux profile - real (kind=kind_phys), pointer :: sfc_emiss_byband(:,:) => null() !< + real (kind=kind_phys), pointer :: sfc_emiss_byband(:,:) => null() !< real (kind=kind_phys), pointer :: sec_diff_byband(:,:) => null() !< real (kind=kind_phys), pointer :: sfc_alb_nir_dir(:,:) => null() !< real (kind=kind_phys), pointer :: sfc_alb_nir_dif(:,:) => null() !< @@ -524,7 +503,7 @@ subroutine gfs_interstitial_create (Interstitial, ixs, ixe, Model) allocate (Interstitial%adjvisbmu (ixs:ixe)) allocate (Interstitial%adjvisdfu (ixs:ixe)) allocate (Interstitial%adjvisdfd (ixs:ixe)) - allocate (Interstitial%aerodp (ixs:ixe,NSPC1)) + allocate (Interstitial%aerodp (ixs:ixe,Model%NSPC1)) allocate (Interstitial%alb1d (ixs:ixe)) if (.not. Model%do_RRTMGP) then ! RRTMGP uses its own cloud_overlap_param @@ -592,8 +571,8 @@ subroutine gfs_interstitial_create (Interstitial, ixs, ixe, Model) allocate (Interstitial%ecan (ixs:ixe)) allocate (Interstitial%etran (ixs:ixe)) allocate (Interstitial%edir (ixs:ixe)) - allocate (Interstitial%faerlw (ixs:ixe,Model%levr+LTP,NBDLW,NF_AELW)) - allocate (Interstitial%faersw (ixs:ixe,Model%levr+LTP,NBDSW,NF_AESW)) + allocate (Interstitial%faerlw (ixs:ixe,Model%levr+LTP,Model%NBDLW,Model%NF_AELW)) + allocate (Interstitial%faersw (ixs:ixe,Model%levr+LTP,Model%NBDSW,Model%NF_AESW)) allocate (Interstitial%ffhh_ice (ixs:ixe)) allocate (Interstitial%ffhh_land (ixs:ixe)) allocate (Interstitial%ffhh_water (ixs:ixe)) @@ -682,7 +661,7 @@ subroutine gfs_interstitial_create (Interstitial, ixs, ixe, Model) allocate (Interstitial%save_v (ixs:ixe,Model%levs)) allocate (Interstitial%sbsno (ixs:ixe)) allocate (Interstitial%scmpsw (ixs:ixe)) - allocate (Interstitial%sfcalb (ixs:ixe,NF_ALBD)) + allocate (Interstitial%sfcalb (ixs:ixe,Model%NF_ALBD)) allocate (Interstitial%sigma (ixs:ixe)) allocate (Interstitial%sigmaf (ixs:ixe)) allocate (Interstitial%sigmafrac (ixs:ixe,Model%levs)) @@ -753,8 +732,8 @@ subroutine gfs_interstitial_create (Interstitial, ixs, ixe, Model) allocate (Interstitial%fluxswDOWN_allsky (ixs:ixe, Model%levs+1)) allocate (Interstitial%fluxswUP_clrsky (ixs:ixe, Model%levs+1)) allocate (Interstitial%fluxswDOWN_clrsky (ixs:ixe, Model%levs+1)) - allocate (Interstitial%aerosolslw (ixs:ixe, Model%levs, Model%rrtmgp_nBandsLW, NF_AELW)) - allocate (Interstitial%aerosolssw (ixs:ixe, Model%levs, Model%rrtmgp_nBandsSW, NF_AESW)) + allocate (Interstitial%aerosolslw (ixs:ixe, Model%levs, Model%rrtmgp_nBandsLW, Model%NF_AELW)) + allocate (Interstitial%aerosolssw (ixs:ixe, Model%levs, Model%rrtmgp_nBandsSW, Model%NF_AESW)) allocate (Interstitial%precip_frac (ixs:ixe, Model%levs)) allocate (Interstitial%cld_cnv_frac (ixs:ixe, Model%levs)) allocate (Interstitial%cnv_cloud_overlap_param(ixs:ixe, Model%levs)) @@ -846,32 +825,7 @@ subroutine gfs_interstitial_create (Interstitial, ixs, ixe, Model) allocate (Interstitial%t2mmp (ixs:ixe)) allocate (Interstitial%q2mp (ixs:ixe)) end if - ! - ! Set components that do not change - Interstitial%frain = Model%dtf/Model%dtp - Interstitial%ipr = min(ixe-ixs+1,10) - Interstitial%latidxprnt = 1 - Interstitial%levi = Model%levs+1 - Interstitial%lmk = Model%levr+LTP - Interstitial%lmp = Model%levr+1+LTP - Interstitial%nbdlw = NBDLW - Interstitial%nbdsw = NBDSW - Interstitial%nf_aelw = NF_AELW - Interstitial%nf_aesw = NF_AESW - Interstitial%nf_albd = NF_ALBD - Interstitial%nspc1 = NSPC1 - if (Model%oz_phys .or. Model%oz_phys_2015) then - Interstitial%oz_coeffp5 = Model%oz_coeff+5 - else - Interstitial%oz_coeffp5 = 5 - endif - ! - Interstitial%skip_macro = .false. - ! The value phys_hydrostatic from dynamics does not match the - ! hardcoded value for calling GFDL MP in GFS_physics_driver.F90, - ! which is set to .true. - Interstitial%phys_hydrostatic = .true. - ! + ! Reset all other variables call Interstitial%reset (Model) ! @@ -1273,7 +1227,7 @@ subroutine gfs_interstitial_setup_tracers(Interstitial, Model) Interstitial%nvdiff = Interstitial%nvdiff + 1 ENDIF if (Model%me == Model%master) write(0,*) 'nssl_settings2: nvdiff,ntrac = ', Interstitial%nvdiff, Model%ntrac - + elseif (Model%imp_physics == Model%imp_physics_wsm6) then Interstitial%nvdiff = Model%ntrac -3 if (Model%satmedmf) Interstitial%nvdiff = Interstitial%nvdiff + 1 diff --git a/ccpp/data/CCPP_typedefs.meta b/ccpp/data/CCPP_typedefs.meta index 5a328fccd..78e595b70 100644 --- a/ccpp/data/CCPP_typedefs.meta +++ b/ccpp/data/CCPP_typedefs.meta @@ -939,13 +939,6 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys -[frain] - standard_name = dynamics_to_physics_timestep_ratio - long_name = ratio of dynamics timestep to physics timestep - units = none - dimensions = () - type = real - kind = kind_phys [frland] standard_name = land_area_fraction_for_microphysics long_name = land area fraction used in microphysics schemes @@ -1244,12 +1237,6 @@ units = flag dimensions = (horizontal_dimension) type = logical -[ipr] - standard_name = horizontal_index_of_printed_column - long_name = horizontal index of printed column - units = index - dimensions = () - type = integer [islmsk] standard_name = sea_land_ice_mask long_name = sea/land/ice mask (=0/1/2) @@ -1322,30 +1309,6 @@ units = index dimensions = (horizontal_dimension) type = integer -[latidxprnt] - standard_name = latitude_index_in_debug_printouts - long_name = latitude index in debug printouts - units = index - dimensions = () - type = integer -[levi] - standard_name = vertical_interface_dimension_interstitial - long_name = vertical interface dimension - units = count - dimensions = () - type = integer -[lmk] - standard_name = adjusted_vertical_layer_dimension_for_radiation - long_name = adjusted number of vertical layers for radiation - units = count - dimensions = () - type = integer -[lmp] - standard_name = adjusted_vertical_level_dimension_for_radiation - long_name = adjusted number of vertical levels for radiation - units = count - dimensions = () - type = integer [mbota] standard_name = model_layer_number_at_cloud_base long_name = vertical indices for low, middle and high cloud bases @@ -1364,18 +1327,6 @@ units = index dimensions = (horizontal_dimension,3) type = integer -[nbdlw] - standard_name = number_of_aerosol_bands_for_longwave_radiation - long_name = number of aerosol bands for longwave radiation - units = count - dimensions = () - type = integer -[nbdsw] - standard_name = number_of_aerosol_bands_for_shortwave_radiation - long_name = number of aerosol bands for shortwave radiation - units = count - dimensions = () - type = integer [ncgl] standard_name = local_graupel_number_concentration long_name = number concentration of graupel local to physics @@ -1412,24 +1363,6 @@ units = count dimensions = () type = integer -[nf_aelw] - standard_name = number_of_aerosol_output_fields_for_longwave_radiation - long_name = number of aerosol output fields for longwave radiation - units = count - dimensions = () - type = integer -[nf_aesw] - standard_name = number_of_aerosol_output_fields_for_shortwave_radiation - long_name = number of aerosol output fields for shortwave radiation - units = count - dimensions = () - type = integer -[nf_albd] - standard_name = number_of_components_for_surface_albedo - long_name = number of IR/VIS/UV compinents for surface albedo - units = count - dimensions = () - type = integer [nn] standard_name = number_of_tracers_for_convective_transport long_name = number of tracers for convective transport @@ -1448,12 +1381,6 @@ units = count dimensions = () type = integer -[nspc1] - standard_name = number_of_species_for_aerosol_optical_depth - long_name = number of species for output aerosol optical depth plus total - units = count - dimensions = () - type = integer [ntcwx] standard_name = index_for_liquid_cloud_condensate_vertical_diffusion_tracer long_name = index for liquid cloud condensate in the vertically diffused tracer array @@ -1547,18 +1474,6 @@ units = flag dimensions = (number_of_tracers) type = logical -[oz_coeffp5] - standard_name = number_of_coefficients_in_ozone_forcing_data_plus_five - long_name = number of coefficients in ozone forcing data plus five - units = index - dimensions = () - type = integer -[phys_hydrostatic] - standard_name = flag_for_hydrostatic_heating_from_physics - long_name = flag for use of hydrostatic heating in physics - units = flag - dimensions = () - type = logical [plvl] standard_name = air_pressure_at_interface_for_radiation_in_hPa long_name = air pressure at vertical interface for radiation calculation @@ -1933,12 +1848,6 @@ dimensions = (horizontal_dimension,vertical_interface_dimension) type = real kind = kind_phys -[skip_macro] - standard_name = flag_skip_macro - long_name = flag to skip cloud macrophysics in Morrison scheme - units = flag - dimensions = () - type = logical [snowc] standard_name = surface_snow_area_fraction long_name = surface snow area fraction diff --git a/ccpp/data/GFS_typedefs.F90 b/ccpp/data/GFS_typedefs.F90 index e3071f27e..74de8c970 100644 --- a/ccpp/data/GFS_typedefs.F90 +++ b/ccpp/data/GFS_typedefs.F90 @@ -14,8 +14,8 @@ module GFS_typedefs con_avgd, con_amd, con_amw, con_one, con_p001, & con_secinday - use module_radsw_parameters, only: topfsw_type, sfcfsw_type - use module_radlw_parameters, only: topflw_type, sfcflw_type + use module_radsw_parameters, only: topfsw_type, sfcfsw_type, NBDSW + use module_radlw_parameters, only: topflw_type, sfcflw_type, NBDLW use module_mp_tempo_params, only: ty_tempo_cfg use module_ozphys, only: ty_ozphys use module_h2ophys, only: ty_h2ophys @@ -732,6 +732,9 @@ module GFS_typedefs !< for use with internal file reads integer :: input_nml_file_length !< length (number of lines) in namelist for internal reads integer :: logunit + integer :: latidxprnt + integer :: ipr + integer :: n_diag_buckets real(kind=kind_phys) :: fhzero !< hours between clearing of diagnostic buckets (current bucket) real(kind=kind_phys) :: fhzero_array(2) !< array to hold the the hours between clearing of diagnostic buckets real(kind=kind_phys) :: fhzero_fhour(2) !< the maximum forecast length for the hours between clearing of diagnostic buckets @@ -815,6 +818,7 @@ module GFS_typedefs !--- calendars and time parameters and activation triggers real(kind=kind_phys) :: dtp !< physics timestep in seconds real(kind=kind_phys) :: dtf !< dynamics timestep in seconds + real(kind=kind_phys) :: frain !< ratio of dynamics timestep to physics timestep integer :: nscyc !< trigger for surface data cycling integer :: nszero !< trigger for zeroing diagnostic buckets integer :: idat(1:8) !< initialization date and time @@ -831,6 +835,15 @@ module GFS_typedefs integer :: nhfrad !< number of timesteps for which to call radiation on physics timestep (coldstarts) integer :: levr !< number of vertical levels for radiation calculations integer :: levrp1 !< number of vertical levels for radiation calculations plus one + integer :: lmk + integer :: lmp + integer :: nbdlw + integer :: nbdsw + integer :: NF_AESW + integer :: NF_AELW + integer :: NF_ALBD + integer :: NSPC + integer :: NSPC1 integer :: nfxr !< second dimension for fluxr diagnostic variable (radiation) logical :: iaerclm !< flag for initializing aerosol data integer :: ntrcaer !< number of aerosol tracers for Morrison-Gettelman microphysics @@ -906,6 +919,8 @@ module GFS_typedefs logical :: lrseeds !< flag to use host-provided random seeds integer :: nrstreams !< number of random number streams in host-provided random seed array logical :: lextop !< flag for using an extra top layer for radiation + real(kind_phys) :: xr_con !< Xu-Randall cloud fraction multiplicative constant + real(kind_phys) :: xr_exp !< Xu-Randall cloud fraction exponent constant ! RRTMGP logical :: do_RRTMGP !< Use RRTMGP @@ -980,6 +995,7 @@ module GFS_typedefs !--- M-G microphysical parameters integer :: fprcp !< no prognostic rain and snow (MG) integer :: pdfflag !< pdf flag for MG macrophysics + logical :: skip_macro real(kind=kind_phys) :: mg_dcs !< Morrison-Gettelman microphysics parameters real(kind=kind_phys) :: mg_qcvar real(kind=kind_phys) :: mg_ts_auto_ice(2) !< ice auto conversion time scale @@ -1061,6 +1077,7 @@ module GFS_typedefs !--- GFDL microphysical paramters logical :: lgfdlmprad !< flag for GFDL mp scheme and radiation consistency + logical :: phys_hydrostatic !--- Thompson,GFDL mp parameter logical :: lrefres !< flag for radar reflectivity in restart file @@ -1279,7 +1296,7 @@ module GFS_typedefs real(kind=kind_phys) :: psauras(2) !< [in] auto conversion coeff from ice to snow in ras real(kind=kind_phys) :: prauras(2) !< [in] auto conversion coeff from cloud to rain in ras real(kind=kind_phys) :: wminras(2) !< [in] water and ice minimum threshold for ras - + integer :: seed0 !< random seed for radiation real(kind=kind_phys) :: rbcr !< Critical Richardson Number in the PBL scheme @@ -1689,6 +1706,7 @@ module GFS_typedefs type(ty_ozphys) :: ozphys !< DDT with data needed by ozone physics integer :: levozp !< Number of vertical layers in ozone forcing data integer :: oz_coeff !< Number of coefficients in ozone forcing data + integer :: oz_coeffp5 !--- NRL h2o photchemistry physics type(ty_h2ophys) :: h2ophys !< DDT with data needed by h2o photchemistry physics. integer :: levh2o !< Number of vertical layers in stratospheric h2o data. @@ -1986,7 +2004,7 @@ module GFS_typedefs real (kind=kind_phys), pointer :: dtsfc (:) => null() !< sensible heat flux (w/m2) real (kind=kind_phys), pointer :: dqsfc (:) => null() !< latent heat flux (w/m2) real (kind=kind_phys), pointer :: totprcp(:) => null() !< accumulated total precipitation (kg/m2) - real (kind=kind_phys), pointer :: totprcpb(:) => null() !< accumulated total precipitation in bucket(kg/m2) + real (kind=kind_phys), pointer :: totprcpb(:,:) => null() !< accumulated total precipitation in bucket(kg/m2) real (kind=kind_phys), pointer :: gflux (:) => null() !< groud conductive heat flux real (kind=kind_phys), pointer :: dlwsfc (:) => null() !< time accumulated sfc dn lw flux ( w/m**2 ) real (kind=kind_phys), pointer :: ulwsfc (:) => null() !< time accumulated sfc up lw flux ( w/m**2 ) @@ -2002,7 +2020,7 @@ module GFS_typedefs real (kind=kind_phys), pointer :: dvgwd (:) => null() !< vertically integrated v change by OGWD real (kind=kind_phys), pointer :: psmean (:) => null() !< surface pressure (kPa) real (kind=kind_phys), pointer :: cnvprcp(:) => null() !< accumulated convective precipitation (kg/m2) - real (kind=kind_phys), pointer :: cnvprcpb(:) => null() !< accumulated convective precipitation in bucket (kg/m2) + real (kind=kind_phys), pointer :: cnvprcpb(:,:) => null() !< accumulated convective precipitation in bucket (kg/m2) real (kind=kind_phys), pointer :: spfhmin(:) => null() !< minimum specific humidity real (kind=kind_phys), pointer :: spfhmax(:) => null() !< maximum specific humidity real (kind=kind_phys), pointer :: u10mmax(:) => null() !< maximum u-wind @@ -3563,6 +3581,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, & logical :: lrseeds = .false. !< flag to use host-provided random seeds integer :: nrstreams = 2 !< number of random number streams in host-provided random seed array logical :: lextop = .false. !< flag for using an extra top layer for radiation + real(kind_phys) :: xr_con = -999.0 !< Xu-Randall cloud fraction multiplicative constant + real(kind_phys) :: xr_exp = -999.0 !< Xu-Randall cloud fraction exponent constant ! RRTMGP logical :: do_RRTMGP = .false. !< Use RRTMGP? character(len=128) :: active_gases = '' !< Character list of active gases used in RRTMGP @@ -3805,7 +3825,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, & logical :: shinhong = .false. !< flag for scale-aware Shinhong vertical turbulent mixing scheme logical :: do_ysu = .false. !< flag for YSU vertical turbulent mixing scheme logical :: dspheat = .false. !< flag for tke dissipative heating - logical :: sa3dtke = .false. !< flag for scale-aware 3D tke scheme + logical :: sa3dtke = .false. !< flag for scale-aware 3D tke scheme logical :: hurr_pbl = .false. !< flag for hurricane-specific options in PBL scheme logical :: lheatstrg = .false. !< flag for canopy heat storage parameterization logical :: lseaspray = .false. !< flag for sea spray parameterization @@ -4157,7 +4177,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, & fhswr, fhlwr, levr, nfxr, iaerclm, iflip, isol, ico2, ialb, & isot, iems, iaer, icliq_sw, iovr, ictm, isubc_sw, & isubc_lw, lcrick, lcnorm, lwhtr, swhtr, & - nhfrad, idcor, dcorr_con, & + nhfrad, idcor, dcorr_con, xr_con, xr_exp, & ! --- RRTMGP do_RRTMGP, active_gases, nGases, rrtmgp_root, & lw_file_gas, lw_file_clouds, rrtmgp_nBandsLW, rrtmgp_nGptsLW,& @@ -4419,6 +4439,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, & Model%nlunit = nlunit Model%fn_nml = fn_nml Model%logunit = logunit + Model%latidxprnt = 1 + Model%n_diag_buckets = 1 Model%fhzero = fhzero Model%fhzero_array = fhzero_array Model%fhzero_fhour = fhzero_fhour @@ -4560,6 +4582,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, & Model%chunk_begin(i) = Model%chunk_end(i-1) + 1 Model%chunk_end(i) = Model%chunk_begin(i) + blksz(i) - 1 end do + Model%ipr = min(minval(Model%blksz), 10) !--- coupling parameters Model%cplflx = cplflx @@ -4639,6 +4662,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, & !--- calendars and time parameters and activation triggers Model%dtp = dt_phys Model%dtf = dt_dycore + Model%frain = Model%dtf/Model%dtp Model%nscyc = nint(Model%fhcyc*con_hr/Model%dtp) Model%nszero = nint(Model%fhzero*con_hr/Model%dtp) Model%idat(1:8) = idat(1:8) @@ -4673,6 +4697,15 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, & Model%levr = levr endif Model%levrp1 = Model%levr + 1 + Model%lmk = Model%levr + LTP + Model%lmp = Model%levr + 1 + LTP + Model%nbdlw = NBDLW + Model%nbdsw = NBDSW + Model%NF_AESW = 3 + Model%NF_AELW = 3 + Model%NF_ALBD = 4 + Model%NSPC = 5 + Model%NSPC1 = Model%NSPC + 1 if (isubc_sw < 0 .or. isubc_sw > 2) then write(0,'(a,i0)') 'ERROR: shortwave cloud-sampling (isubc_sw) scheme selected not valid: ',isubc_sw @@ -4752,7 +4785,6 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, & Model%lrseeds = lrseeds Model%nrstreams = nrstreams Model%lextop = (ltp > 0) - ! RRTMGP Model%do_RRTMGP = do_RRTMGP Model%rrtmgp_nrghice = rrtmgp_nrghice @@ -4841,6 +4873,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, & !--- Morrison-Gettelman MP parameters Model%fprcp = fprcp Model%pdfflag = pdfflag + Model%skip_macro = .false. ! this gets reset in m_micro_pre Model%mg_dcs = mg_dcs Model%mg_qcvar = mg_qcvar Model%mg_ts_auto_ice = mg_ts_auto_ice @@ -4923,6 +4956,10 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, & !--- GFDL MP parameters Model%lgfdlmprad = lgfdlmprad + ! The value phys_hydrostatic from dynamics does not match the + ! hardcoded value for calling GFDL MP in GFS_physics_driver.F90, + ! which is set to .true. + Model%phys_hydrostatic = .true. !--- Thompson,GFDL,NSSL MP parameter Model%lrefres = lrefres @@ -5845,6 +5882,11 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, & err_message = Model%ozphys%load_o3prog('global_o3prdlos.f77',kozpl) Model%levozp = Model%ozphys%nlev Model%oz_coeff = Model%ozphys%ncf + if (Model%oz_phys .or. Model%oz_phys_2015) then + Model%oz_coeffp5 = Model%oz_coeff+5 + else + Model%oz_coeffp5 = 5 + endif if (Model%me == Model%master) then write(*,*) 'Reading in o3data from global_o3prdlos.f77 ' @@ -5967,7 +6009,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, & !--- BEGIN CODE FROM COMPNS_PHYSICS !--- shoc scheme if (do_shoc) then - if ((Model%imp_physics == Model%imp_physics_thompson) .or. & + if ((Model%imp_physics == Model%imp_physics_thompson) .or. & (Model%imp_physics == Model%imp_physics_tempo)) then print *,'SHOC is not currently compatible with Thompson/TEMPO MP -- shutting down' stop @@ -6508,7 +6550,34 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, & !--- BEGIN CODE FROM GLOOPB !--- set up random number seed needed for RAS and old SAS and when cal_pre=.true. ! Model%imfdeepcnv < 0 when Model%ras = .true. - + + if (xr_con > 0.0 .and. xr_exp > 0.0) then !values have been read in from namelist, so set them to read values + Model%xr_con = xr_con + Model%xr_exp = xr_exp + else ! values have not been read in from namelist and should be set according to logic in radiation_clouds.f + if (Model%imp_physics == Model%imp_physics_zhao_carr .or. Model%imp_physics == Model%imp_physics_mg .or. Model%imp_physics == Model%imp_physics_fer_hires) then + if (.not. Model%lmfshal) then + !calls cloud_fraction_XuRandall() + Model%xr_con = 2000.0 + Model%xr_exp = 0.25 + else + !calls cloud_fraction_mass_flx_1() + Model%xr_con = 100.0 + Model%xr_exp = 0.49 + endif + else ! specifically used when progcld_thompson_wsm6 is called in radiation_clouds.f (see logic in that routine) + if (.not. Model%lmfshal) then + !calls cloud_fraction_XuRandall() + Model%xr_con = 2000.0 + Model%xr_exp = 0.25 + else + !calls cloud_fraction_mass_flx_2() + Model%xr_con = 2000.0 + Model%xr_exp = 0.25 + endif + endif + endif + if (Model%imfdeepcnv <= 0 .or. Model%cal_pre ) then if (Model%random_clds) then seed0 = Model%idate(1) + Model%idate(2) + Model%idate(3) + Model%idate(4) @@ -6720,6 +6789,7 @@ subroutine control_print(Model) print *, ' fhzero : ', Model%fhzero print *, ' fhzero_array : ', Model%fhzero_array print *, ' fhzero_fhour : ', Model%fhzero_fhour + print *, ' n_diag_buckets : ', Model%n_diag_buckets print *, ' ldiag3d : ', Model%ldiag3d print *, ' qdiag3d : ', Model%qdiag3d print *, ' lssav : ', Model%lssav @@ -6817,6 +6887,7 @@ subroutine control_print(Model) print *, 'calendars and time parameters and activation triggers' print *, ' dtp : ', Model%dtp print *, ' dtf : ', Model%dtf + print *, ' frain : ', Model%frain print *, ' nscyc : ', Model%nscyc print *, ' nszero : ', Model%nszero print *, ' idat : ', Model%idat @@ -6869,6 +6940,8 @@ subroutine control_print(Model) print *, ' lrseeds : ', Model%lrseeds print *, ' nrstreams : ', Model%nrstreams print *, ' lextop : ', Model%lextop + print *, ' xr_con : ', Model%xr_con + print *, ' xr_exp : ', Model%xr_exp if (Model%do_RRTMGP) then print *, ' rrtmgp_nrghice : ', Model%rrtmgp_nrghice print *, ' do_GPsw_Glw : ', Model%do_GPsw_Glw @@ -7934,11 +8007,12 @@ end subroutine label_dtend_cause subroutine diag_create (Diag, Model) class(GFS_diag_type) :: Diag type(GFS_control_type), intent(in) :: Model - integer :: IM + integer :: IM, ndb logical, save :: linit logical :: have_pbl, have_dcnv, have_scnv, have_mp, have_oz_phys IM = Model%ncols + ndb = Model%n_diag_buckets if(Model%print_diff_pgr) then allocate (Diag%old_pgr(IM)) @@ -7981,7 +8055,7 @@ subroutine diag_create (Diag, Model) allocate (Diag%dtsfc (IM)) allocate (Diag%dqsfc (IM)) allocate (Diag%totprcp (IM)) - allocate (Diag%totprcpb(IM)) + allocate (Diag%totprcpb(IM,ndb)) allocate (Diag%gflux (IM)) allocate (Diag%dlwsfc (IM)) allocate (Diag%ulwsfc (IM)) @@ -7996,7 +8070,7 @@ subroutine diag_create (Diag, Model) allocate (Diag%dvgwd (IM)) allocate (Diag%psmean (IM)) allocate (Diag%cnvprcp (IM)) - allocate (Diag%cnvprcpb(IM)) + allocate (Diag%cnvprcpb(IM,ndb)) allocate (Diag%spfhmin (IM)) allocate (Diag%spfhmax (IM)) allocate (Diag%u10mmax (IM)) diff --git a/ccpp/data/GFS_typedefs.meta b/ccpp/data/GFS_typedefs.meta index 680536227..1e4e404ca 100644 --- a/ccpp/data/GFS_typedefs.meta +++ b/ccpp/data/GFS_typedefs.meta @@ -3499,6 +3499,24 @@ units = none dimensions = () type = integer +[latidxprnt] + standard_name = latitude_index_in_debug_printouts + long_name = latitude index in debug printouts + units = index + dimensions = () + type = integer +[ipr] + standard_name = horizontal_index_of_printed_column + long_name = horizontal index of printed column + units = index + dimensions = () + type = integer +[n_diag_buckets] + standard_name = number_of_diagnostic_buckets + long_name = number of diagnostic bucket reset periods + units = count + dimensions = () + type = integer [ldiag3d] standard_name = flag_for_diagnostics_3D long_name = flag for 3d diagnostic fields @@ -3838,6 +3856,13 @@ dimensions = () type = real kind = kind_phys +[frain] + standard_name = dynamics_to_physics_timestep_ratio + long_name = ratio of dynamics timestep to physics timestep + units = none + dimensions = () + type = real + kind = kind_phys [idat] standard_name = date_and_time_at_model_initialization_in_iso_order long_name = initialization date and time @@ -3894,6 +3919,54 @@ units = count dimensions = () type = integer +[lmk] + standard_name = adjusted_vertical_layer_dimension_for_radiation + long_name = adjusted number of vertical layers for radiation + units = count + dimensions = () + type = integer +[lmp] + standard_name = adjusted_vertical_level_dimension_for_radiation + long_name = adjusted number of vertical levels for radiation + units = count + dimensions = () + type = integer +[nbdlw] + standard_name = number_of_aerosol_bands_for_longwave_radiation + long_name = number of aerosol bands for longwave radiation + units = count + dimensions = () + type = integer +[nbdsw] + standard_name = number_of_aerosol_bands_for_shortwave_radiation + long_name = number of aerosol bands for shortwave radiation + units = count + dimensions = () + type = integer +[nf_aelw] + standard_name = number_of_aerosol_output_fields_for_longwave_radiation + long_name = number of aerosol output fields for longwave radiation + units = count + dimensions = () + type = integer +[nf_aesw] + standard_name = number_of_aerosol_output_fields_for_shortwave_radiation + long_name = number of aerosol output fields for shortwave radiation + units = count + dimensions = () + type = integer +[nf_albd] + standard_name = number_of_components_for_surface_albedo + long_name = number of IR/VIS/UV compinents for surface albedo + units = count + dimensions = () + type = integer +[nspc1] + standard_name = number_of_species_for_aerosol_optical_depth + long_name = number of species for output aerosol optical depth plus total + units = count + dimensions = () + type = integer [nfxr] standard_name = number_of_diagnostics_variables_for_radiation long_name = number of variables stored in the fluxr array @@ -4153,6 +4226,20 @@ units = flag dimensions = () type = logical +[xr_con] + standard_name = multiplicative_tuning_parameter_for_Xu_Randall_cloud_fraction + long_name = multiplicative tuning parameter for Xu Randall cloud fraction + units = 1 + dimensions = () + type = real + kind = kind_phys +[xr_exp] + standard_name = exponent_tuning_parameter_for_Xu_Randall_cloud_fraction + long_name = exponent tuning parameter for Xu Randall cloud fraction + units = 1 + dimensions = () + type = real + kind = kind_phys [active_gases] standard_name = active_gases_used_by_RRTMGP long_name = active gases used by RRTMGP @@ -4584,6 +4671,12 @@ units = flag dimensions = () type = integer +[skip_macro] + standard_name = flag_skip_macro + long_name = flag to skip cloud macrophysics in Morrison scheme + units = flag + dimensions = () + type = logical [mg_dcs] standard_name = autoconverion_to_snow_size_threshold long_name = autoconversion size threshold for cloud ice to snow for MG microphysics @@ -5060,6 +5153,12 @@ units = flag dimensions = () type = logical +[phys_hydrostatic] + standard_name = flag_for_hydrostatic_heating_from_physics + long_name = flag for use of hydrostatic heating in physics + units = flag + dimensions = () + type = logical [lsm] standard_name = control_for_land_surface_scheme long_name = flag for land surface model @@ -7338,6 +7437,12 @@ units = count dimensions = () type = integer +[oz_coeffp5] + standard_name = number_of_coefficients_in_ozone_forcing_data_plus_five + long_name = number of coefficients in ozone forcing data plus five + units = index + dimensions = () + type = integer [levh2o] standard_name = vertical_dimension_of_h2o_forcing_data long_name = number of vertical layers in h2o forcing data @@ -9055,7 +9160,7 @@ standard_name = accumulated_lwe_thickness_of_precipitation_amount_in_bucket long_name = accumulated total precipitation in bucket units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_dimension,number_of_diagnostic_buckets) type = real kind = kind_phys [toticeb] @@ -9246,7 +9351,7 @@ standard_name = cumulative_lwe_thickness_of_convective_precipitation_amount_in_bucket long_name = cumulative convective precipitation in bucket units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_dimension,number_of_diagnostic_buckets) type = real kind = kind_phys [spfhmin] diff --git a/ccpp/driver/GFS_diagnostics.F90 b/ccpp/driver/GFS_diagnostics.F90 index e09d9f776..19a822357 100644 --- a/ccpp/driver/GFS_diagnostics.F90 +++ b/ccpp/driver/GFS_diagnostics.F90 @@ -1132,7 +1132,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%cnvfac = cn_th ExtDiag(idx)%time_avg = .TRUE. ExtDiag(idx)%intpl_method = 'bilinear' - ExtDiag(idx)%data%var2 => IntDiag%totprcpb(:) + ExtDiag(idx)%data%var2 => IntDiag%totprcpb(:,1) idx = idx + 1 ExtDiag(idx)%axes = 2 @@ -1284,7 +1284,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%cnvfac = cn_th ExtDiag(idx)%time_avg = .TRUE. ExtDiag(idx)%intpl_method = 'bilinear' - ExtDiag(idx)%data%var2 => IntDiag%cnvprcpb(:) + ExtDiag(idx)%data%var2 => IntDiag%cnvprcpb(:,1) idx = idx + 1 ExtDiag(idx)%axes = 2 diff --git a/ccpp/physics b/ccpp/physics index 92bd50183..ac63f3193 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 92bd501831f43d9248314aeae981b4a8494e387a +Subproject commit ac63f31931368b6fbeb3114e5c611ad3473a73cb