From 689639b99649ba0a89bcf6815bea5694b4b814a1 Mon Sep 17 00:00:00 2001 From: Lauren Chilutti Date: Thu, 4 May 2023 13:04:38 +0000 Subject: [PATCH] Merge branch 'user/lnz/shield2023' into 'main' Pass the namelist variables from the dycore to the physics during the initialization See merge request fv3team/fv3_gfsphysics!69 --- GFS_layer/GFS_driver.F90 | 2 +- GFS_layer/GFS_physics_driver.F90 | 2 +- GFS_layer/GFS_typedefs.F90 | 19 ++++++++++--------- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/GFS_layer/GFS_driver.F90 b/GFS_layer/GFS_driver.F90 index eb9448cc..66fab53a 100644 --- a/GFS_layer/GFS_driver.F90 +++ b/GFS_layer/GFS_driver.F90 @@ -218,7 +218,7 @@ subroutine GFS_initialize (Model, Statein, Stateout, Sfcprop, & !--- initialize GFDL Cloud microphysics if (Model%ncld == 5) then - call gfdl_cld_mp_init (Model%input_nml_file, Init_parm%logunit, Statein(1)%dycore_hydrostatic) + call gfdl_cld_mp_init (Model%input_nml_file, Init_parm%logunit, Model%dycore_hydrostatic) endif !--- initialize ras diff --git a/GFS_layer/GFS_physics_driver.F90 b/GFS_layer/GFS_physics_driver.F90 index 57883d3b..fda4dd20 100644 --- a/GFS_layer/GFS_physics_driver.F90 +++ b/GFS_layer/GFS_physics_driver.F90 @@ -3849,7 +3849,7 @@ subroutine GFS_physics_driver & ! consistent with how those tendencies are applied in the dynamical core. nwat = Statein%nwat - if (Statein%dycore_hydrostatic) then + if (Model%dycore_hydrostatic) then call moist_cp_nwat6(Statein%qgrs(1:im,1:levs,1:nwat), Stateout%gq0(1:im,1:levs,1:nwat), & Statein%prsi(1:im,1:levs+1), im, levs, nwat, 1, Model%ntcw, Model%ntiw, & Model%ntrw, Model%ntsw, Model%ntgl, specific_heat) diff --git a/GFS_layer/GFS_typedefs.F90 b/GFS_layer/GFS_typedefs.F90 index e6791ce2..07e7a4da 100644 --- a/GFS_layer/GFS_typedefs.F90 +++ b/GFS_layer/GFS_typedefs.F90 @@ -145,7 +145,6 @@ module GFS_typedefs !--- sea surface temperature real (kind=kind_phys), pointer :: sst (:) => null() !< sea surface temperature real (kind=kind_phys), pointer :: ci (:) => null() !< sea ice fraction - logical, pointer :: dycore_hydrostatic => null() !< whether the dynamical core is hydrostatic integer, pointer :: nwat => null() !< number of water species used in the model contains procedure :: create => statein_create !< allocate array data @@ -555,6 +554,9 @@ module GFS_typedefs !--- microphysical switch integer :: ncld !< cnoice of cloud scheme + !--- dynamical core parameters + logical :: dycore_hydrostatic !< whether the dynamical core is hydrostatic + !--- GFDL microphysical parameters logical :: do_inline_mp !< flag for GFDL cloud microphysics @@ -1357,9 +1359,6 @@ subroutine statein_create (Statein, IM, Model) Statein%sst = clear_val Statein%ci = -999. ! if below zero it is empty so don't use it - allocate(Statein%dycore_hydrostatic) - Statein%dycore_hydrostatic = .true. - allocate(Statein%nwat) Statein%nwat = 6 @@ -2052,6 +2051,9 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & logical :: fixed_sollat = .false. !< flag to fix solar latitude logical :: daily_mean = .false. !< flag to replace cosz with daily mean value + !--- dynamical core parameters + logical :: dycore_hydrostatic = .true. !< whether the dynamical core is hydrostatic + !--- GFDL microphysical parameters logical :: do_inline_mp = .false. !< flag for GFDL cloud microphysics @@ -2335,8 +2337,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & isubc_lw, crick_proof, ccnorm, lwhtr, swhtr, nkld, & fixed_date, fixed_solhr, fixed_sollat, daily_mean, sollat, & !--- microphysical parameterizations - ncld, do_inline_mp, zhao_mic, psautco, prautco, evpco, & - do_cosp, wminco, fprcp, mg_dcs, mg_qcvar, mg_ts_auto_ice, & + ncld, zhao_mic, psautco, prautco, evpco, & + wminco, fprcp, mg_dcs, mg_qcvar, mg_ts_auto_ice, & !--- land/surface model control lsm, lsoil, nmtvr, ivegsrc, mom4ice, use_ufo, czil_sfc, Ts0, & ! Noah MP options @@ -2510,9 +2512,6 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !--- microphysical switch Model%ncld = ncld !--- GFDL microphysical parameters - Model%do_inline_mp = do_inline_mp - !--- The CFMIP Observation Simulator Package (COSP) - Model%do_cosp = do_cosp !--- Zhao-Carr MP parameters Model%zhao_mic = zhao_mic Model%psautco = psautco @@ -3181,6 +3180,8 @@ subroutine control_print(Model) print *, ' ' print *, 'microphysical switch' print *, ' ncld : ', Model%ncld + print *, ' dynamical core parameters' + print *, ' dycore_hydrostatic: ', Model%dycore_hydrostatic print *, ' GFDL microphysical parameters' print *, ' do_inline_mp : ', Model%do_inline_mp print *, ' The CFMIP Observation Simulator Package (COSP)'