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

Re-organize GFDLMP (v1) #162

Closed
wants to merge 10 commits into from
8 changes: 6 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,12 @@ set(SCHEMES_OPENMP_OFF ${LOCAL_CURRENT_SOURCE_DIR}/physics/Radiation/RRTMGP/rte-
# List of files that need to be compiled with different precision
set(SCHEMES_DYNAMICS)

if(${LOCAL_CURRENT_SOURCE_DIR}/physics/MP/GFDL/fv_sat_adj.F90 IN_LIST SCHEMES)
list(APPEND SCHEMES_DYNAMICS ${LOCAL_CURRENT_SOURCE_DIR}/physics/MP/GFDL/fv_sat_adj.F90)
if(${LOCAL_CURRENT_SOURCE_DIR}/physics/MP/GFDL_2019_v1/fv_sat_adj.F90 IN_LIST SCHEMES)
list(APPEND SCHEMES_DYNAMICS ${LOCAL_CURRENT_SOURCE_DIR}/physics/MP/GFDL_2019_v1/fv_sat_adj.F90)
endif()

if(${LOCAL_CURRENT_SOURCE_DIR}/physics/MP/GFDL_2022_v3/fv_sat_adj_v3.F90 IN_LIST SCHEMES)
list(APPEND SCHEMES_DYNAMICS ${LOCAL_CURRENT_SOURCE_DIR}/physics/MP/GFDL_2022_v3/fv_sat_adj_v3.F90)
endif()

# Remove files that need to be compiled with different precision
Expand Down
19 changes: 12 additions & 7 deletions physics/Interstitials/UFS_SCM_NEPTUNE/GFS_MP_generic_post.F90
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ module GFS_MP_generic_post
!> \section gfs_mp_gen GFS MP Generic Post General Algorithm
!> @{
subroutine GFS_MP_generic_post_run( &
im, levs, kdt, nrcm, nncl, ntcw, ntrac, imp_physics, imp_physics_gfdl, imp_physics_thompson, imp_physics_nssl, &
im, levs, kdt, nrcm, nncl, ntcw, ntrac, imp_physics, imp_physics_gfdl, imp_physics_gfdl_v3, &
imp_physics_thompson, imp_physics_nssl, &
imp_physics_mg, imp_physics_fer_hires, cal_pre, cplflx, cplchm, cpllnd, progsigma, con_g, rhowater, rainmin, dtf, &
frain, rainc, rain1, rann, xlat, xlon, gt0, gq0, prsl, prsi, phii, tsfc, ice, phil, htop, refl_10cm, &
imfshalcnv,imfshalcnv_gf,imfdeepcnv,imfdeepcnv_gf,imfdeepcnv_samf, con_t0c, snow, graupel, save_t, save_q, &
Expand All @@ -37,7 +38,8 @@ subroutine GFS_MP_generic_post_run(
implicit none

integer, intent(in) :: im, levs, kdt, nrcm, nncl, ntcw, ntrac, num_dfi_radar, index_of_process_dfi_radar
integer, intent(in) :: imp_physics, imp_physics_gfdl, imp_physics_thompson, imp_physics_mg, imp_physics_fer_hires
integer, intent(in) :: imp_physics, imp_physics_gfdl, imp_physics_gfdl_v3
integer, intent(in) :: imp_physics_thompson, imp_physics_mg, imp_physics_fer_hires
integer, intent(in) :: imp_physics_nssl, iopt_lake_clm, iopt_lake, lkm
logical, intent(in) :: cal_pre, lssav, ldiag3d, qdiag3d, cplflx, cplchm, cpllnd, progsigma, exticeden
integer, intent(in) :: index_of_temperature,index_of_process_mp,use_lake_model(:)
Expand Down Expand Up @@ -182,7 +184,8 @@ subroutine GFS_MP_generic_post_run(
endif

! compute surface snowfall, graupel/sleet, freezing rain and precip ice density
if (imp_physics == imp_physics_gfdl .or. imp_physics == imp_physics_thompson .or. imp_physics == imp_physics_nssl ) then
if (imp_physics == imp_physics_gfdl .or. imp_physics == imp_physics_gfdl_v3 &
.or. imp_physics == imp_physics_thompson .or. imp_physics == imp_physics_nssl) then
do i = 1, im
if (gt0(i,1) .le. 273) then
frzr(i) = frzr(i) + rain0(i)
Expand Down Expand Up @@ -251,7 +254,7 @@ subroutine GFS_MP_generic_post_run(
! GFS_physics_driver is written, Diag%{graupel,ice,snow} are on the
! physics timestep, while Diag%{rain,rainc} and all totprecip etc
! are on the dynamics timestep. Confusing, but works if frain=1. *DH
if (imp_physics == imp_physics_gfdl) then
if (imp_physics == imp_physics_gfdl .or. imp_physics == imp_physics_gfdl_v3) then
tprcp = max(zero, rain) ! clu: rain -> tprcp
!graupel = frain*graupel0
!ice = frain*ice0
Expand Down Expand Up @@ -306,7 +309,8 @@ subroutine GFS_MP_generic_post_run(
!
! HCHUANG: use new precipitation type to decide snow flag for LSM snow accumulation

if (imp_physics /= imp_physics_gfdl .and. imp_physics /= imp_physics_thompson .and. imp_physics /= imp_physics_nssl) then
if (imp_physics /= imp_physics_gfdl .and. imp_physics /= imp_physics_gfdl_v3 &
.and. imp_physics /= imp_physics_thompson .and. imp_physics /= imp_physics_nssl) then
do i=1,im
tprcp(i) = max(zero, rain(i) )
if(doms(i) > zero .or. domip(i) > zero) then
Expand Down Expand Up @@ -393,8 +397,9 @@ subroutine GFS_MP_generic_post_run(
!! and convective rainfall from the cumulus scheme if the surface temperature is below
!! \f$0^oC\f$.

if (imp_physics == imp_physics_gfdl .or. imp_physics == imp_physics_thompson .or. &
imp_physics == imp_physics_nssl ) then
if (imp_physics == imp_physics_gfdl .or. imp_physics == imp_physics_gfdl_v3 &
.or. imp_physics == imp_physics_thompson &
.or. imp_physics == imp_physics_nssl ) then

! determine convective rain/snow by surface temperature
! determine large-scale rain/snow by rain/snow coming out directly from MP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,13 @@
dimensions = ()
type = integer
intent = in
[imp_physics_gfdl_v3]
standard_name = identifier_for_gfdl_microphysics_v3_scheme
long_name = choice of GFDL microphysics v3 scheme
units = flag
dimensions = ()
type = integer
intent = in
[imp_physics_thompson]
standard_name = identifier_for_thompson_microphysics_scheme
long_name = choice of Thompson microphysics scheme
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ module GFS_PBL_generic_common
subroutine set_aerosol_tracer_index(imp_physics, imp_physics_wsm6, &
imp_physics_thompson, ltaerosol,mraerosol, &
imp_physics_mg, ntgl, imp_physics_gfdl, &
imp_physics_gfdl_v3, &
imp_physics_zhao_carr, imp_physics_nssl,&
nssl_hail_on, nssl_ccn_on, kk, &
errmsg, errflg)
Expand All @@ -22,6 +23,7 @@ subroutine set_aerosol_tracer_index(imp_physics, imp_physics_wsm6, &
integer, intent(in ) :: imp_physics, imp_physics_wsm6, &
imp_physics_thompson, &
imp_physics_mg, ntgl, imp_physics_gfdl, &
imp_physics_gfdl_v3, &
imp_physics_zhao_carr,imp_physics_nssl
logical, intent(in ) :: ltaerosol, mraerosol, nssl_hail_on, nssl_ccn_on
integer, intent(out) :: kk
Expand Down Expand Up @@ -50,7 +52,7 @@ subroutine set_aerosol_tracer_index(imp_physics, imp_physics_wsm6, &
else
kk = 10
endif
elseif (imp_physics == imp_physics_gfdl) then
elseif (imp_physics == imp_physics_gfdl .or. imp_physics == imp_physics_gfdl_v3) then
! GFDL MP
kk = 7
elseif (imp_physics == imp_physics_zhao_carr) then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ module GFS_PBL_generic_post
subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, &
ntqv, ntcw, ntiw, ntrw, ntsw, ntlnc, ntinc, ntrnc, ntsnc, ntgnc, ntwa, ntia, ntgl, ntoz, ntke, ntkev,nqrimef, &
trans_aero, ntchs, ntchm, ntccn, nthl, nthnc, ntgv, nthv, ntrz, ntgz, nthz, &
imp_physics, imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6, imp_physics_zhao_carr, imp_physics_mg, &
imp_physics_fer_hires, imp_physics_nssl, nssl_ccn_on, ltaerosol, mraerosol, nssl_hail_on, nssl_3moment, &
imp_physics, imp_physics_gfdl, imp_physics_gfdl_v3, imp_physics_thompson, imp_physics_wsm6, imp_physics_zhao_carr, &
imp_physics_mg, imp_physics_fer_hires, imp_physics_nssl, nssl_ccn_on, ltaerosol, mraerosol, nssl_hail_on, nssl_3moment,&
cplflx, cplaqm, cplchm, lssav, flag_for_pbl_generic_tend, ldiag3d, lsidea, hybedmf, do_shoc, satmedmf, &
shinhong, do_ysu, dvdftra, dusfc1, dvsfc1, dtsfc1, dqsfc1, dtf, dudt, dvdt, dtdt, htrsw, htrlw, xmu, &
dqdt, dusfc_cpl, dvsfc_cpl, dtsfc_cpl, dtend, dtidx, index_of_temperature, index_of_x_wind, index_of_y_wind, &
Expand All @@ -32,7 +32,7 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac,
integer, intent(in) :: ntqv, ntcw, ntiw, ntrw, ntsw, ntlnc, ntinc, ntrnc, ntsnc, ntgnc, ntwa, ntia, ntgl, ntoz, ntke, ntkev, nqrimef
integer, intent(in) :: ntccn, nthl, nthnc, ntgv, nthv, ntrz, ntgz, nthz
logical, intent(in) :: trans_aero
integer, intent(in) :: imp_physics, imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6
integer, intent(in) :: imp_physics, imp_physics_gfdl, imp_physics_gfdl_v3, imp_physics_thompson, imp_physics_wsm6
integer, intent(in) :: imp_physics_zhao_carr, imp_physics_mg, imp_physics_fer_hires
integer, intent(in) :: imp_physics_nssl
logical, intent(in) :: nssl_ccn_on, nssl_hail_on, nssl_3moment
Expand Down Expand Up @@ -106,6 +106,7 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac,
call set_aerosol_tracer_index(imp_physics, imp_physics_wsm6, &
imp_physics_thompson, ltaerosol,mraerosol, &
imp_physics_mg, ntgl, imp_physics_gfdl, &
imp_physics_gfdl_v3, &
imp_physics_zhao_carr, imp_physics_nssl,&
nssl_hail_on, nssl_ccn_on, kk, &
errmsg, errflg)
Expand Down Expand Up @@ -229,7 +230,7 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac,
enddo
enddo
endif
elseif (imp_physics == imp_physics_gfdl) then ! GFDL MP
elseif (imp_physics == imp_physics_gfdl .or. imp_physics == imp_physics_gfdl_v3) then ! GFDL MP
do k=1,levs
do i=1,im
dqdt(i,k,ntqv) = dvdftra(i,k,1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,13 @@
dimensions = ()
type = integer
intent = in
[imp_physics_gfdl_v3]
standard_name = identifier_for_gfdl_microphysics_v3_scheme
long_name = choice of GFDL microphysics v3 scheme
units = flag
dimensions = ()
type = integer
intent = in
[imp_physics_thompson]
standard_name = identifier_for_thompson_microphysics_scheme
long_name = choice of Thompson microphysics scheme
Expand Down
10 changes: 6 additions & 4 deletions physics/Interstitials/UFS_SCM_NEPTUNE/GFS_PBL_generic_pre.F90
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ module GFS_PBL_generic_pre
subroutine GFS_PBL_generic_pre_run (im, levs, nvdiff, ntrac, rtg_ozone_index, &
ntqv, ntcw, ntiw, ntrw, ntsw, ntlnc, ntinc, ntrnc, ntsnc, ntgnc, &
ntwa, ntia, ntgl, ntoz, ntke, ntkev, nqrimef, trans_aero, ntchs, ntchm, &
ntccn, nthl, nthnc, ntgv, nthv, ntrz, ntgz, nthz, &
imp_physics, imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6, &
ntccn, nthl, nthnc, ntgv, nthv, ntrz, ntgz, nthz, imp_physics, &
imp_physics_gfdl, imp_physics_gfdl_v3, imp_physics_thompson, imp_physics_wsm6, &
imp_physics_zhao_carr, imp_physics_mg, imp_physics_fer_hires, imp_physics_nssl, &
ltaerosol, mraerosol, nssl_ccn_on, nssl_hail_on, nssl_3moment, &
hybedmf, do_shoc, satmedmf, qgrs, vdftra, save_u, save_v, save_t, save_q, &
Expand All @@ -31,7 +31,8 @@ subroutine GFS_PBL_generic_pre_run (im, levs, nvdiff, ntrac, rtg_ozone_index,
integer, intent(in) :: ntwa, ntia, ntgl, ntoz, ntke, ntkev, nqrimef,ntchs, ntchm
integer, intent(in) :: ntccn, nthl, nthnc, ntgv, nthv, ntrz, ntgz, nthz
logical, intent(in) :: trans_aero, ldiag3d, qdiag3d, lssav
integer, intent(in) :: imp_physics, imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6
integer, intent(in) :: imp_physics, imp_physics_gfdl, imp_physics_gfdl_v3
integer, intent(in) :: imp_physics_thompson, imp_physics_wsm6
integer, intent(in) :: imp_physics_zhao_carr, imp_physics_mg, imp_physics_fer_hires
logical, intent(in) :: ltaerosol, hybedmf, do_shoc, satmedmf, flag_for_pbl_generic_tend, mraerosol
integer, intent(in) :: imp_physics_nssl
Expand Down Expand Up @@ -177,7 +178,7 @@ subroutine GFS_PBL_generic_pre_run (im, levs, nvdiff, ntrac, rtg_ozone_index,
enddo
rtg_ozone_index = 10
endif
elseif (imp_physics == imp_physics_gfdl) then
elseif (imp_physics == imp_physics_gfdl .or. imp_physics == imp_physics_gfdl_v3) then
! GFDL MP
do k=1,levs
do i=1,im
Expand Down Expand Up @@ -275,6 +276,7 @@ subroutine GFS_PBL_generic_pre_run (im, levs, nvdiff, ntrac, rtg_ozone_index,
call set_aerosol_tracer_index(imp_physics, imp_physics_wsm6, &
imp_physics_thompson, ltaerosol,mraerosol, &
imp_physics_mg, ntgl, imp_physics_gfdl, &
imp_physics_gfdl_v3, &
imp_physics_zhao_carr, imp_physics_nssl,&
nssl_hail_on, nssl_ccn_on, kk, &
errmsg, errflg)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,13 @@
dimensions = ()
type = integer
intent = in
[imp_physics_gfdl_v3]
standard_name = identifier_for_gfdl_microphysics_v3_scheme
long_name = choice of GFDL microphysics v3 scheme
units = flag
dimensions = ()
type = integer
intent = in
[imp_physics_thompson]
standard_name = identifier_for_thompson_microphysics_scheme
long_name = choice of Thompson microphysics scheme
Expand Down
3 changes: 2 additions & 1 deletion physics/Interstitials/UFS_SCM_NEPTUNE/GFS_debug.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1392,7 +1392,8 @@ subroutine GFS_interstitialtoscreen_run (Model, Statein, Stateout, Sfcprop, Coup
call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%clxss ', Interstitial%clxss )
end if
! GFDL and Thompson MP
if (Model%imp_physics == Model%imp_physics_gfdl .or. Model%imp_physics == Model%imp_physics_thompson .or. Model%imp_physics == Model%imp_physics_nssl) then
if (Model%imp_physics == Model%imp_physics_gfdl .or. Model%imp_physics == Model%imp_physics_gfdl_v3 &
.or. Model%imp_physics == Model%imp_physics_thompson .or. Model%imp_physics == Model%imp_physics_nssl) then
call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%graupelmp ', Interstitial%graupelmp )
call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%icemp ', Interstitial%icemp )
call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%rainmp ', Interstitial%rainmp )
Expand Down
11 changes: 7 additions & 4 deletions physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_pre.F90
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, lextop,&
ntdu1, ntdu2, ntdu3, ntdu4, ntdu5, ntss1, ntss2, &
ntss3, ntss4, ntss5, ntsu, ntbcb, ntbcl, ntocb, ntocl, ntchm, &
imp_physics,imp_physics_nssl, nssl_ccn_on, nssl_invertccn, &
imp_physics_thompson, imp_physics_gfdl, imp_physics_zhao_carr, &
imp_physics_thompson, imp_physics_gfdl, imp_physics_gfdl_v3, &
imp_physics_zhao_carr, &
imp_physics_zhao_carr_pdf, imp_physics_mg, imp_physics_wsm6, &
imp_physics_fer_hires, iovr, iovr_rand, iovr_maxrand, iovr_max, &
iovr_dcorr, iovr_exp, iovr_exprand, idcor, idcor_con, idcor_hogan, &
Expand Down Expand Up @@ -99,6 +100,7 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, lextop,&
kdt, imp_physics, &
imp_physics_thompson, &
imp_physics_gfdl, &
imp_physics_gfdl_v3, &
imp_physics_zhao_carr, &
imp_physics_zhao_carr_pdf, &
imp_physics_mg, imp_physics_wsm6, &
Expand Down Expand Up @@ -778,7 +780,7 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, lextop,&
enddo
enddo
enddo
if (imp_physics == imp_physics_gfdl ) then
if (imp_physics == imp_physics_gfdl .or. imp_physics == imp_physics_gfdl_v3) then
if (.not. lgfdlmprad) then


Expand Down Expand Up @@ -822,7 +824,7 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, lextop,&
enddo
enddo
endif
elseif (imp_physics == imp_physics_gfdl) then ! GFDL MP
elseif (imp_physics == imp_physics_gfdl .or. imp_physics == imp_physics_gfdl_v3) then ! GFDL MP
if ((imfdeepcnv==imfdeepcnv_gf .or. imfdeepcnv==imfdeepcnv_c3) .and. kdt>1) then
do k=1,lm
k1 = k + kd
Expand Down Expand Up @@ -975,7 +977,8 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, lextop,&
& deltaq, sup, dcorr_con, me, icloud, kdt, &
& ntrac, ntcw, ntiw, ntrw, ntsw, ntgl, ntclamt, &
& imp_physics, imp_physics_nssl, imp_physics_fer_hires, &
& imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6, &
& imp_physics_gfdl, imp_physics_gfdl_v3, &
& imp_physics_thompson, imp_physics_wsm6, &
& imp_physics_zhao_carr, imp_physics_zhao_carr_pdf, &
& imp_physics_mg, iovr, iovr_rand, iovr_maxrand, iovr_max, &
& iovr_dcorr, iovr_exp, iovr_exprand, idcor, idcor_con, &
Expand Down
7 changes: 7 additions & 0 deletions physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_pre.meta
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,13 @@
dimensions = ()
type = integer
intent = in
[imp_physics_gfdl_v3]
standard_name = identifier_for_gfdl_microphysics_v3_scheme
long_name = choice of GFDL microphysics v3 scheme
units = flag
dimensions = ()
type = integer
intent = in
[imp_physics_zhao_carr]
standard_name = identifier_for_zhao_carr_microphysics_scheme
long_name = choice of Zhao-Carr microphysics scheme
Expand Down
Loading
Loading