From 3c39f385afec8334d6c911c048cc0d1b454c1058 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Thu, 3 Nov 2022 14:56:53 -0400 Subject: [PATCH 1/2] transfer updates for fv3atm from ufs-dev PR#10 --- ccpp/physics | 2 +- scm/src/GFS_typedefs.F90 | 77 ++++++++++++++++++++++----------------- scm/src/GFS_typedefs.meta | 42 ++++++++++++--------- 3 files changed, 69 insertions(+), 52 deletions(-) diff --git a/ccpp/physics b/ccpp/physics index 013844aa..35f5e895 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 013844aab416d0089e48f7d813b4c51dc2e04288 +Subproject commit 35f5e8951cc59acb71732054964f60301a2aa5de diff --git a/scm/src/GFS_typedefs.F90 b/scm/src/GFS_typedefs.F90 index 07dc135e..298b6e26 100644 --- a/scm/src/GFS_typedefs.F90 +++ b/scm/src/GFS_typedefs.F90 @@ -668,6 +668,7 @@ module GFS_typedefs logical :: cplwav2atm !< default no wav->atm coupling logical :: cplaqm !< default no cplaqm collection logical :: cplchm !< default no cplchm collection + logical :: cpllnd !< default no cpllnd collection logical :: rrfs_smoke !< default no rrfs_smoke collection integer :: dust_smoke_rrtmg_band_number !< band number to affect in rrtmg_pre from smoke and dust logical :: use_cice_alb !< default .false. - i.e. don't use albedo imported from the ice model @@ -2501,7 +2502,7 @@ subroutine coupling_create (Coupling, IM, Model) Coupling%tsfc_radtime = clear_val endif - if (Model%cplflx .or. Model%do_sppt .or. Model%cplchm .or. Model%ca_global) then + if (Model%cplflx .or. Model%do_sppt .or. Model%cplchm .or. Model%ca_global .or. Model%cpllnd) then allocate (Coupling%rain_cpl (IM)) allocate (Coupling%snow_cpl (IM)) Coupling%rain_cpl = clear_val @@ -2517,7 +2518,7 @@ subroutine coupling_create (Coupling, IM, Model) Coupling%v10mi_cpl = clear_val endif - if (Model%cplflx .or. Model%cplchm) then + if (Model%cplflx .or. Model%cplchm .or. Model%cpllnd) then !--- instantaneous quantities allocate (Coupling%tsfci_cpl (IM)) Coupling%tsfci_cpl = clear_val @@ -2530,6 +2531,36 @@ subroutine coupling_create (Coupling, IM, Model) ! Coupling%zorlwav_cpl = clear_val ! endif + if (Model%cplflx .or. Model%cpllnd) then + allocate (Coupling%dlwsfc_cpl (IM)) + allocate (Coupling%dswsfc_cpl (IM)) + allocate (Coupling%psurfi_cpl (IM)) + allocate (Coupling%nswsfc_cpl (IM)) + allocate (Coupling%nswsfci_cpl (IM)) + allocate (Coupling%nnirbmi_cpl (IM)) + allocate (Coupling%nnirdfi_cpl (IM)) + allocate (Coupling%nvisbmi_cpl (IM)) + allocate (Coupling%nvisdfi_cpl (IM)) + allocate (Coupling%nnirbm_cpl (IM)) + allocate (Coupling%nnirdf_cpl (IM)) + allocate (Coupling%nvisbm_cpl (IM)) + allocate (Coupling%nvisdf_cpl (IM)) + + Coupling%dlwsfc_cpl = clear_val + Coupling%dswsfc_cpl = clear_val + Coupling%psurfi_cpl = clear_val + Coupling%nswsfc_cpl = clear_val + Coupling%nswsfci_cpl = clear_val + Coupling%nnirbmi_cpl = clear_val + Coupling%nnirdfi_cpl = clear_val + Coupling%nvisbmi_cpl = clear_val + Coupling%nvisdfi_cpl = clear_val + Coupling%nnirbm_cpl = clear_val + Coupling%nnirdf_cpl = clear_val + Coupling%nvisbm_cpl = clear_val + Coupling%nvisdf_cpl = clear_val + end if + if (Model%cplflx) then !--- incoming quantities allocate (Coupling%slimskin_cpl (IM)) @@ -2584,35 +2615,21 @@ subroutine coupling_create (Coupling, IM, Model) allocate (Coupling%dvsfc_cpl (IM)) allocate (Coupling%dtsfc_cpl (IM)) allocate (Coupling%dqsfc_cpl (IM)) - allocate (Coupling%dlwsfc_cpl (IM)) - allocate (Coupling%dswsfc_cpl (IM)) allocate (Coupling%dnirbm_cpl (IM)) allocate (Coupling%dnirdf_cpl (IM)) allocate (Coupling%dvisbm_cpl (IM)) allocate (Coupling%dvisdf_cpl (IM)) allocate (Coupling%nlwsfc_cpl (IM)) - allocate (Coupling%nswsfc_cpl (IM)) - allocate (Coupling%nnirbm_cpl (IM)) - allocate (Coupling%nnirdf_cpl (IM)) - allocate (Coupling%nvisbm_cpl (IM)) - allocate (Coupling%nvisdf_cpl (IM)) Coupling%dusfc_cpl = clear_val Coupling%dvsfc_cpl = clear_val Coupling%dtsfc_cpl = clear_val Coupling%dqsfc_cpl = clear_val - Coupling%dlwsfc_cpl = clear_val - Coupling%dswsfc_cpl = clear_val Coupling%dnirbm_cpl = clear_val Coupling%dnirdf_cpl = clear_val Coupling%dvisbm_cpl = clear_val Coupling%dvisdf_cpl = clear_val Coupling%nlwsfc_cpl = clear_val - Coupling%nswsfc_cpl = clear_val - Coupling%nnirbm_cpl = clear_val - Coupling%nnirdf_cpl = clear_val - Coupling%nvisbm_cpl = clear_val - Coupling%nvisdf_cpl = clear_val !--- instantaneous quantities allocate (Coupling%dusfci_cpl (IM)) @@ -2626,14 +2643,8 @@ subroutine coupling_create (Coupling, IM, Model) allocate (Coupling%dvisbmi_cpl (IM)) allocate (Coupling%dvisdfi_cpl (IM)) allocate (Coupling%nlwsfci_cpl (IM)) - allocate (Coupling%nswsfci_cpl (IM)) - allocate (Coupling%nnirbmi_cpl (IM)) - allocate (Coupling%nnirdfi_cpl (IM)) - allocate (Coupling%nvisbmi_cpl (IM)) - allocate (Coupling%nvisdfi_cpl (IM)) allocate (Coupling%t2mi_cpl (IM)) allocate (Coupling%q2mi_cpl (IM)) - allocate (Coupling%psurfi_cpl (IM)) allocate (Coupling%oro_cpl (IM)) allocate (Coupling%slmsk_cpl (IM)) @@ -2648,14 +2659,8 @@ subroutine coupling_create (Coupling, IM, Model) Coupling%dvisbmi_cpl = clear_val Coupling%dvisdfi_cpl = clear_val Coupling%nlwsfci_cpl = clear_val - Coupling%nswsfci_cpl = clear_val - Coupling%nnirbmi_cpl = clear_val - Coupling%nnirdfi_cpl = clear_val - Coupling%nvisbmi_cpl = clear_val - Coupling%nvisdfi_cpl = clear_val Coupling%t2mi_cpl = clear_val Coupling%q2mi_cpl = clear_val - Coupling%psurfi_cpl = clear_val Coupling%oro_cpl = clear_val !< pointer to sfcprop%oro Coupling%slmsk_cpl = clear_val !< pointer to sfcprop%slmsk endif @@ -2686,17 +2691,20 @@ subroutine coupling_create (Coupling, IM, Model) if (Model%cplchm .or. Model%rrfs_smoke) then !--- outgoing instantaneous quantities allocate (Coupling%ushfsfci (IM)) - !--- accumulated convective rainfall - allocate (Coupling%rainc_cpl (IM)) ! -- instantaneous 3d fluxes of nonconvective ice and liquid precipitations allocate (Coupling%pfi_lsan (IM,Model%levs)) allocate (Coupling%pfl_lsan (IM,Model%levs)) - Coupling%rainc_cpl = clear_val Coupling%ushfsfci = clear_val Coupling%pfi_lsan = clear_val Coupling%pfl_lsan = clear_val endif + if (Model%cplchm .or. Model%rrfs_smoke .or. Model%cplflx .or. Model%cpllnd) then + !--- accumulated convective rainfall + allocate (Coupling%rainc_cpl (IM)) + Coupling%rainc_cpl = clear_val + end if + ! -- additional coupling options for air quality if (Model%cplaqm .and. .not.Model%cplflx) then !--- outgoing instantaneous quantities @@ -2905,6 +2913,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & logical :: cplwav2atm = .false. !< default no cplwav2atm coupling logical :: cplaqm = .false. !< default no cplaqm collection logical :: cplchm = .false. !< default no cplchm collection + logical :: cpllnd = .false. !< default no cpllnd collection logical :: rrfs_smoke = .false. !< default no rrfs_smoke collection integer :: dust_smoke_rrtmg_band_number = 10!< band number to affect in rrtmg_pre from smoke and dust logical :: use_cice_alb = .false. !< default no cice albedo @@ -3432,7 +3441,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & thermodyn_id, sfcpress_id, & !--- coupling parameters cplflx, cplice, cplocn2atm, cplwav, cplwav2atm, cplaqm, & - cplchm, cpl_imp_mrg, cpl_imp_dbg, rrfs_smoke, & + cplchm, cpllnd, cpl_imp_mrg, cpl_imp_dbg, rrfs_smoke, & use_cice_alb, dust_smoke_rrtmg_band_number, & #ifdef IDEA_PHYS lsidea, weimer_model, f107_kp_size, f107_kp_interval, & @@ -3770,6 +3779,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%cplwav2atm = cplwav2atm Model%cplaqm = cplaqm Model%cplchm = cplchm .or. cplaqm + Model%cpllnd = cpllnd Model%use_cice_alb = use_cice_alb Model%cpl_imp_mrg = cpl_imp_mrg Model%cpl_imp_dbg = cpl_imp_dbg @@ -5697,6 +5707,7 @@ subroutine control_print(Model) print *, ' cplwav2atm : ', Model%cplwav2atm print *, ' cplaqm : ', Model%cplaqm print *, ' cplchm : ', Model%cplchm + print *, ' cpllnd : ', Model%cpllnd print *, ' rrfs_smoke : ', Model%rrfs_smoke print *, ' use_cice_alb : ', Model%use_cice_alb print *, ' cpl_imp_mrg : ', Model%cpl_imp_mrg @@ -6319,7 +6330,7 @@ subroutine tbd_create (Tbd, IM, Model) Tbd%acvb = clear_val Tbd%acvt = clear_val - if (Model%cplflx .or. Model%cplchm) then + if (Model%cplflx .or. Model%cplchm .or. Model%cpllnd) then allocate (Tbd%drain_cpl (IM)) allocate (Tbd%dsnow_cpl (IM)) Tbd%drain_cpl = clear_val diff --git a/scm/src/GFS_typedefs.meta b/scm/src/GFS_typedefs.meta index aa16f50a..83e07b73 100644 --- a/scm/src/GFS_typedefs.meta +++ b/scm/src/GFS_typedefs.meta @@ -1984,7 +1984,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling .or. flag_for_stochastic_physics_perturbations .or. flag_for_chemistry_coupling .or. flag_for_global_cellular_automata) + active = (flag_for_surface_flux_coupling .or. flag_for_stochastic_physics_perturbations .or. flag_for_chemistry_coupling .or. flag_for_global_cellular_automata .or. flag_for_land_coupling) [rainc_cpl] standard_name = cumulative_lwe_thickness_of_convective_precipitation_amount_for_coupling long_name = total convective precipitation @@ -1992,7 +1992,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (flag_for_chemistry_coupling) + active = (flag_for_surface_flux_coupling .or. flag_for_chemistry_coupling .or. flag_for_land_coupling) [snow_cpl] standard_name = cumulative_lwe_thickness_of_snow_amount_for_coupling long_name = total snow precipitation @@ -2000,7 +2000,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling .or. flag_for_stochastic_physics_perturbations .or. flag_for_chemistry_coupling .or. flag_for_global_cellular_automata) + active = (flag_for_surface_flux_coupling .or. flag_for_stochastic_physics_perturbations .or. flag_for_chemistry_coupling .or. flag_for_global_cellular_automata .or. flag_for_land_coupling) [dusfc_cpl] standard_name = cumulative_surface_x_momentum_flux_for_coupling_multiplied_by_timestep long_name = cumulative sfc x momentum flux multiplied by timestep @@ -2040,7 +2040,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling) + active = (flag_for_surface_flux_coupling .or. flag_for_land_coupling) [dswsfc_cpl] standard_name = cumulative_surface_downwelling_shortwave_flux_for_coupling_multiplied_by_timestep long_name = cumulative sfc downward sw flux multiplied by timestep @@ -2048,7 +2048,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling) + active = (flag_for_surface_flux_coupling .or. flag_for_land_coupling) [dnirbm_cpl] standard_name = cumulative_surface_downwelling_direct_nir_shortwave_flux_for_coupling_multiplied_by_timestep long_name = cumulative sfc nir beam downward sw flux multiplied by timestep @@ -2096,7 +2096,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling) + active = (flag_for_surface_flux_coupling .or. flag_for_land_coupling) [nnirbm_cpl] standard_name = cumulative_surface_net_downwelling_direct_nir_shortwave_flux_for_coupling_multiplied_by_timestep long_name = cumulative net nir beam downward sw flux multiplied by timestep @@ -2104,7 +2104,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling) + active = (flag_for_surface_flux_coupling .or. flag_for_land_coupling) [nnirdf_cpl] standard_name = cumulative_surface_net_downwellling_diffuse_nir_shortwave_flux_for_coupling_multiplied_by_timestep long_name = cumulative net nir diff downward sw flux multiplied by timestep @@ -2112,7 +2112,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling) + active = (flag_for_surface_flux_coupling .or. flag_for_land_coupling) [nvisbm_cpl] standard_name = cumulative_surface_net_downwelling_direct_uv_and_vis_shortwave_flux_for_coupling_multiplied_by_timestep long_name = cumulative net uv+vis beam downward sw rad flux multiplied by timestep @@ -2120,7 +2120,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling) + active = (flag_for_surface_flux_coupling .or. flag_for_land_coupling) [nvisdf_cpl] standard_name = cumulative_surface_net_downwelling_diffuse_uv_and_vis_shortwave_flux_for_coupling_multiplied_by_timestep long_name = cumulative net uv+vis diff downward sw rad flux multiplied by timestep @@ -2128,7 +2128,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling) + active = (flag_for_surface_flux_coupling .or. flag_for_land_coupling) [dusfci_cpl] standard_name = surface_x_momentum_flux_for_coupling long_name = instantaneous sfc x momentum flux @@ -2224,7 +2224,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling .or. flag_for_air_quality_coupling) + active = (flag_for_surface_flux_coupling .or. flag_for_air_quality_coupling .or. flag_for_land_coupling) [nnirbmi_cpl] standard_name = surface_net_downwelling_direct_nir_shortwave_flux_for_coupling long_name = instantaneous net nir beam sfc downward sw flux @@ -2232,7 +2232,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling) + active = (flag_for_surface_flux_coupling .or. flag_for_land_coupling) [nnirdfi_cpl] standard_name = surface_net_downwelling_diffuse_nir_shortwave_flux_for_coupling long_name = instantaneous net nir diff sfc downward sw flux @@ -2240,7 +2240,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling) + active = (flag_for_surface_flux_coupling .or. flag_for_land_coupling) [nvisbmi_cpl] standard_name = surface_net_downwelling_direct_uv_and_vis_shortwave_flux_for_coupling long_name = instantaneous net uv+vis beam downward sw flux @@ -2248,7 +2248,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling) + active = (flag_for_surface_flux_coupling .or. flag_for_land_coupling) [nvisdfi_cpl] standard_name = surface_net_downwelling_diffuse_uv_and_vis_shortwave_flux_for_coupling long_name = instantaneous net uv+vis diff downward sw flux @@ -2256,7 +2256,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling) + active = (flag_for_surface_flux_coupling .or. flag_for_land_coupling) [t2mi_cpl] standard_name = temperature_at_2m_for_coupling long_name = instantaneous T2m @@ -2304,7 +2304,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling .or. flag_for_air_quality_coupling) + active = (flag_for_surface_flux_coupling .or. flag_for_air_quality_coupling .or. flag_for_land_coupling) [ulwsfcin_cpl] standard_name = surface_upwelling_longwave_flux_from_coupled_process long_name = surface upwelling LW flux for coupling @@ -3019,6 +3019,12 @@ units = flag dimensions = () type = logical +[cpllnd] + standard_name = flag_for_land_coupling + long_name = flag controlling cpllnd collection (default off) + units = flag + dimensions = () + type = logical [rrfs_smoke] standard_name = do_smoke_coupling long_name = flag controlling rrfs_smoke collection (default off) @@ -6783,7 +6789,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling .or. flag_for_chemistry_coupling) + active = (flag_for_surface_flux_coupling .or. flag_for_chemistry_coupling .or. flag_for_land_coupling) [dsnow_cpl] standard_name = tendency_of_lwe_thickness_of_snowfall_amount_on_dynamics_timestep_for_coupling long_name = change in show_cpl (coupling_type) @@ -6791,7 +6797,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling .or. flag_for_chemistry_coupling) + active = (flag_for_surface_flux_coupling .or. flag_for_chemistry_coupling .or. flag_for_land_coupling) [phy_fctd] standard_name = atmosphere_updraft_convective_mass_flux_at_cloud_base_by_cloud_type long_name = cloud base mass flux for CS convection From 187d3b2a0697ac44999c99c78a7712d57573ba81 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Tue, 8 Nov 2022 13:28:01 -0500 Subject: [PATCH 2/2] update ccpp/physics submodule pointer --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index 35f5e895..c348f3e3 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 35f5e8951cc59acb71732054964f60301a2aa5de +Subproject commit c348f3e363f066c2c513b0449690859d3104bac8