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

Add variables to GFS_init_type #26

Merged
merged 2 commits into from
Jun 26, 2023
Merged
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
5 changes: 3 additions & 2 deletions GFS_layer/GFS_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ subroutine GFS_initialize (Model, Statein, Stateout, Sfcprop, &
Init_parm%iau_offset, &
Init_parm%tracer_names, &
Init_parm%input_nml_file, Init_parm%tile_num, &
Init_parm%blksz)
Init_parm%blksz, Init_parm%hydro, &
Init_parm%do_inline_mp, Init_parm%do_cosp)


call read_o3data (Model%ntoz, Model%me, Model%master)
Expand Down Expand Up @@ -218,7 +219,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, Model%dycore_hydrostatic)
call gfdl_cld_mp_init (Model%input_nml_file, Init_parm%logunit, Init_parm%hydro)
endif

!--- initialize ras
Expand Down
22 changes: 14 additions & 8 deletions GFS_layer/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ module GFS_typedefs
character(len=65) :: fn_nml !< namelist filename
character(len=:), pointer, dimension(:) :: input_nml_file => null() !< character string containing full namelist
!< for use with internal file reads
logical :: hydro !< whether the dynamical core is hydrostatic
logical :: do_inline_mp !< flag for GFDL cloud microphysics
logical :: do_cosp !< flag for COSP

end type GFS_init_type


Expand Down Expand Up @@ -1999,7 +2003,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
cnx, cny, gnx, gny, dt_dycore, &
dt_phys, idat, jdat, iau_offset, &
tracer_names, input_nml_file, &
tile_num, blksz)
tile_num, blksz, hydro, &
do_inline_mp, do_cosp)

!--- modules
use physcons, only: max_lon, max_lat, min_lon, min_lat, &
Expand Down Expand Up @@ -2036,6 +2041,9 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
character(len=32), intent(in) :: tracer_names(:)
character(len=:), intent(in), dimension(:), pointer :: input_nml_file
integer, intent(in) :: blksz(:)
logical, intent(in) :: hydro
logical, intent(in) :: do_inline_mp
logical, intent(in) :: do_cosp
!--- local variables
integer :: n, i, j
integer :: ios
Expand Down Expand Up @@ -2108,15 +2116,8 @@ 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_sat_adj = .false. !< flag for fast saturation adjustment
logical :: do_inline_mp = .false. !< flag for GFDL cloud microphysics

!--- The CFMIP Observation Simulator Package (COSP)
logical :: do_cosp = .false. !< flag for COSP

!--- Z-C microphysical parameters
integer :: ncld = 1 !< cnoice of cloud scheme
Expand Down Expand Up @@ -2577,8 +2578,13 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &

!--- microphysical switch
Model%ncld = ncld
!--- dynamical core parameters
Model%dycore_hydrostatic = hydro
!--- GFDL microphysical parameters
Model%do_sat_adj = do_sat_adj
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
12 changes: 8 additions & 4 deletions gsmphys/gfdl_cld_mp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,9 @@ module gfdl_cld_mp_mod

logical :: do_subgrid_proc = .true. ! do temperature sentive high vertical resolution processes

logical :: fast_fr_mlt = .true. ! do freezing and melting in fast microphysics
logical :: fast_dep_sub = .true. ! do deposition and sublimation in fast microphysics

real :: mp_time = 150.0 ! maximum microphysics time step (s)

real :: n0w_sig = 1.1 ! intercept parameter (significand) of cloud water (Lin et al. 1983) (1/m^4) (Martin et al. 1994)
Expand Down Expand Up @@ -536,7 +539,8 @@ module gfdl_cld_mp_mod
alinw, alini, alinr, alins, aling, alinh, blinw, blini, blinr, blins, bling, blinh, &
do_new_acc_water, do_new_acc_ice, is_fac, ss_fac, gs_fac, rh_fac_evap, rh_fac_cond, &
snow_grauple_combine, do_psd_water_num, do_psd_ice_num, vdiffflag, rewfac, reifac, &
cp_heating, nconds, do_evap_timescale, delay_cond_evap, do_subgrid_proc
cp_heating, nconds, do_evap_timescale, delay_cond_evap, do_subgrid_proc, &
fast_fr_mlt, fast_dep_sub

contains

Expand Down Expand Up @@ -2006,7 +2010,7 @@ subroutine mp_fast (ks, ke, tz, qv, ql, qr, qi, qs, qg, dtm, dp, den, &
call cal_mhc_lhc (ks, ke, qv, ql, qr, qi, qs, qg, q_liq, q_sol, cvm, te8, tz, &
lcpk, icpk, tcpk, tcp3)

if (.not. do_warm_rain_mp) then
if (.not. do_warm_rain_mp .and. fast_fr_mlt) then

! -----------------------------------------------------------------------
! cloud ice melting to form cloud water and rain
Expand Down Expand Up @@ -2044,7 +2048,7 @@ subroutine mp_fast (ks, ke, tz, qv, ql, qr, qi, qs, qg, dtm, dp, den, &
condensation = condensation + cond * convt
evaporation = evaporation + reevap * convt

if (.not. do_warm_rain_mp) then
if (.not. do_warm_rain_mp .and. fast_fr_mlt) then

! -----------------------------------------------------------------------
! cloud water freezing to form cloud ice and snow
Expand Down Expand Up @@ -2089,7 +2093,7 @@ subroutine mp_fast (ks, ke, tz, qv, ql, qr, qi, qs, qg, dtm, dp, den, &

call praut_simp (ks, ke, dtm, tz, qv, ql, qr, qi, qs, qg)

if (.not. do_warm_rain_mp) then
if (.not. do_warm_rain_mp .and. fast_dep_sub) then

! -----------------------------------------------------------------------
! cloud ice deposition and sublimation
Expand Down