Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MR 69 from Gitlab: Pass the namelist variables from the dycore to the physics during the initialization #21

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion GFS_layer/GFS_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion GFS_layer/GFS_physics_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
19 changes: 10 additions & 9 deletions GFS_layer/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)'
Expand Down