Skip to content

Commit

Permalink
Merge branch 'bugfix/grvfunction' into ufs-dev-PR131
Browse files Browse the repository at this point in the history
  • Loading branch information
grantfirl committed Feb 6, 2024
2 parents c7a9e0d + bf5a538 commit a0e77fc
Show file tree
Hide file tree
Showing 74 changed files with 8,204 additions and 3,634 deletions.
8 changes: 5 additions & 3 deletions physics/GFS_DCNV_generic_post.F90
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ subroutine GFS_DCNV_generic_post_run (im, levs, lssav, ldiag3d, qdiag3d, ras, &
index_of_temperature, index_of_x_wind, index_of_y_wind, ntqv, gq0, save_q, &
cnvw, cnvc, cnvw_phy_f3d, cnvc_phy_f3d, flag_for_dcnv_generic_tend, &
ntcw,ntiw,ntclamt,ntrw,ntsw,ntrnc,ntsnc,ntgl, &
ntgnc, nthl, nthnc, nthv, ntgv, ntsigma, ntrac,clw, &
ntgnc, nthl, nthnc, nthv, ntgv, ntrz, ntgz, nthz, ntsigma, ntrac,clw, &
satmedmf, trans_trac, errmsg, errflg)


Expand Down Expand Up @@ -44,8 +44,9 @@ subroutine GFS_DCNV_generic_post_run (im, levs, lssav, ldiag3d, qdiag3d, ras, &
real(kind=kind_phys), dimension(:,:,:), intent(inout) :: dtend
integer, intent(in) :: dtidx(:,:), index_of_process_dcnv, index_of_temperature, &
index_of_x_wind, index_of_y_wind, ntqv
integer, intent(in) :: ntcw,ntiw,ntclamt,ntrw,ntsw,ntrnc,ntsnc,ntgl, &
ntgnc, nthl, nthnc, nthv, ntgv, ntsigma, ntrac
integer, intent(in) :: ntcw,ntiw,ntclamt,ntrw,ntsw,ntrnc,ntsnc,ntgl, &
ntgnc, nthl, nthnc, nthv, ntgv, ntrz, ntgz, nthz, &
ntsigma, ntrac
real(kind=kind_phys), dimension(:,:,:), intent(in) :: clw


Expand Down Expand Up @@ -112,6 +113,7 @@ subroutine GFS_DCNV_generic_post_run (im, levs, lssav, ldiag3d, qdiag3d, ras, &
n /= ntrw .and. n /= ntsw .and. n /= ntrnc .and. &
n /= ntsnc .and. n /= ntgl .and. n /= ntgnc .and. &
n /= nthl .and. n /= nthnc .and. n /= nthv .and. &
n /= ntrz .and. n /= ntgz .and. n /= nthz .and. &
n /= ntgv .and. n /= ntsigma) then
tracers = tracers + 1
idtend = dtidx(100+n,index_of_process_dcnv)
Expand Down
21 changes: 21 additions & 0 deletions physics/GFS_DCNV_generic_post.meta
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,27 @@
dimensions = ()
type = integer
intent = in
[ntrz]
standard_name = index_of_reflectivity_of_rain_in_tracer_concentration_array
long_name = tracer index for rain reflectivity
units = index
dimensions = ()
type = integer
intent = in
[ntgz]
standard_name = index_of_reflectivity_of_graupel_in_tracer_concentration_array
long_name = tracer index for graupel reflectivity
units = index
dimensions = ()
type = integer
intent = in
[nthz]
standard_name = index_of_reflectivity_of_hail_in_tracer_concentration_array
long_name = tracer index for hail reflectivity
units = index
dimensions = ()
type = integer
intent = in
[clw]
standard_name = convective_transportable_tracers
long_name = array to contain cloud water and other convective trans. tracers
Expand Down
7 changes: 5 additions & 2 deletions physics/GFS_DCNV_generic_pre.F90
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ subroutine GFS_DCNV_generic_pre_run (im, levs, ldiag3d, qdiag3d, do_cnvgwd, cplc
gu0, gv0, gt0, gq0, nsamftrac, ntqv, &
save_u, save_v, save_t, save_q, clw, &
ntcw,ntiw,ntclamt,ntrw,ntsw,ntrnc,ntsnc,ntgl, &
ntgnc, nthl, nthnc, nthv, ntgv,ntsigma, &
ntgnc, nthl, nthnc, nthv, ntgv, &
ntrz, ntgz, nthz, ntsigma, &
cscnv, satmedmf, trans_trac, ras, ntrac, &
dtidx, index_of_process_dcnv, errmsg, errflg)

Expand All @@ -22,7 +23,8 @@ subroutine GFS_DCNV_generic_pre_run (im, levs, ldiag3d, qdiag3d, do_cnvgwd, cplc
implicit none

integer, intent(in) :: im, levs, nsamftrac, ntqv, index_of_process_dcnv, dtidx(:,:), &
ntcw,ntiw,ntclamt,ntrw,ntsw,ntrnc,ntsnc,ntgl,ntrac,ntgnc,nthl,nthnc,nthv,ntgv,ntsigma
ntcw,ntiw,ntclamt,ntrw,ntsw,ntrnc,ntsnc,ntgl,ntrac,ntgnc,nthl,nthnc,nthv,ntgv, &
ntrz, ntgz, nthz, ntsigma
logical, intent(in) :: ldiag3d, qdiag3d, do_cnvgwd, cplchm
real(kind=kind_phys), dimension(:,:), intent(in) :: gu0
real(kind=kind_phys), dimension(:,:), intent(in) :: gv0
Expand Down Expand Up @@ -68,6 +70,7 @@ subroutine GFS_DCNV_generic_pre_run (im, levs, ldiag3d, qdiag3d, do_cnvgwd, cplc
n /= ntrw .and. n /= ntsw .and. n /= ntrnc .and. &
n /= ntsnc .and. n /= ntgl .and. n /= ntgnc .and. &
n /= nthl .and. n /= nthnc .and. n /= nthv .and. &
n /= ntrz .and. n /= ntgz .and. n /= nthz .and. &
n /= ntgv .and. n/= ntsigma) then
tracers = tracers + 1
if(dtidx(100+n,index_of_process_dcnv)>0) then
Expand Down
21 changes: 21 additions & 0 deletions physics/GFS_DCNV_generic_pre.meta
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,27 @@
dimensions = ()
type = integer
intent = in
[ntrz]
standard_name = index_of_reflectivity_of_rain_in_tracer_concentration_array
long_name = tracer index for rain reflectivity
units = index
dimensions = ()
type = integer
intent = in
[ntgz]
standard_name = index_of_reflectivity_of_graupel_in_tracer_concentration_array
long_name = tracer index for graupel reflectivity
units = index
dimensions = ()
type = integer
intent = in
[nthz]
standard_name = index_of_reflectivity_of_hail_in_tracer_concentration_array
long_name = tracer index for hail reflectivity
units = index
dimensions = ()
type = integer
intent = in
[clw]
standard_name = convective_transportable_tracers
long_name = array to contain cloud water and other convective trans. tracers
Expand Down
29 changes: 22 additions & 7 deletions physics/GFS_PBL_generic_post.F90
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ 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, &
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, &
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 @@ -30,12 +30,12 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac,
integer, parameter :: kp = kind_phys
integer, intent(in) :: im, levs, nvdiff, ntrac, ntchs, ntchm, kdt
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
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_zhao_carr, imp_physics_mg, imp_physics_fer_hires
integer, intent(in) :: imp_physics_nssl
logical, intent(in) :: nssl_ccn_on, nssl_hail_on
logical, intent(in) :: nssl_ccn_on, nssl_hail_on, nssl_3moment
logical, intent(in) :: ltaerosol, cplflx, cplaqm, cplchm, lssav, ldiag3d, lsidea, use_med_flux, mraerosol
logical, intent(in) :: hybedmf, do_shoc, satmedmf, shinhong, do_ysu

Expand Down Expand Up @@ -270,8 +270,16 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac,
dqdt(i,k,ntgv) = dvdftra(i,k,14)
dqdt(i,k,nthv) = dvdftra(i,k,15)
dqdt(i,k,ntoz) = dvdftra(i,k,16)
n = 16
IF ( nssl_ccn_on ) THEN
dqdt(i,k,ntccn) = dvdftra(i,k,17)
dqdt(i,k,ntccn) = dvdftra(i,k,n+1)
n = n+1
ENDIF
IF ( nssl_3moment ) THEN
dqdt(i,k,ntrz) = dvdftra(i,k,n+1)
dqdt(i,k,ntgz) = dvdftra(i,k,n+2)
dqdt(i,k,nthz) = dvdftra(i,k,n+3)
n = n+3
ENDIF
enddo
enddo
Expand All @@ -292,9 +300,16 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac,
dqdt(i,k,ntsnc) = dvdftra(i,k,10)
dqdt(i,k,ntgnc) = dvdftra(i,k,11)
dqdt(i,k,ntgv) = dvdftra(i,k,12)
dqdt(i,k,ntoz) = dvdftra(i,k,13)
dqdt(i,k,ntoz) = dvdftra(i,k,13)
n = 13
IF ( nssl_ccn_on ) THEN
dqdt(i,k,ntccn) = dvdftra(i,k,14)
dqdt(i,k,ntccn) = dvdftra(i,k,n+1)
n = n+1
ENDIF
IF ( nssl_3moment ) THEN
dqdt(i,k,ntrz) = dvdftra(i,k,n+1)
dqdt(i,k,ntgz) = dvdftra(i,k,n+2)
n = n+2
ENDIF
enddo
enddo
Expand Down
28 changes: 28 additions & 0 deletions physics/GFS_PBL_generic_post.meta
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,27 @@
dimensions = ()
type = integer
intent = in
[ntrz]
standard_name = index_of_reflectivity_of_rain_in_tracer_concentration_array
long_name = tracer index for rain reflectivity
units = index
dimensions = ()
type = integer
intent = in
[ntgz]
standard_name = index_of_reflectivity_of_graupel_in_tracer_concentration_array
long_name = tracer index for graupel reflectivity
units = index
dimensions = ()
type = integer
intent = in
[nthz]
standard_name = index_of_reflectivity_of_hail_in_tracer_concentration_array
long_name = tracer index for hail reflectivity
units = index
dimensions = ()
type = integer
intent = in
[imp_physics]
standard_name = control_for_microphysics_scheme
long_name = choice of microphysics scheme
Expand Down Expand Up @@ -295,6 +316,13 @@
dimensions = ()
type = logical
intent = in
[nssl_3moment]
standard_name = nssl_3moment
long_name = 3-moment activation flag in NSSL microphysics scheme
units = flag
dimensions = ()
type = logical
intent = in
[cplflx]
standard_name = flag_for_surface_flux_coupling
long_name = flag controlling cplflx collection (default off)
Expand Down
49 changes: 32 additions & 17 deletions physics/GFS_PBL_generic_pre.F90
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ 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, &
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, &
ltaerosol, mraerosol, nssl_ccn_on, nssl_hail_on, &
ltaerosol, mraerosol, nssl_ccn_on, nssl_hail_on, nssl_3moment, &
hybedmf, do_shoc, satmedmf, qgrs, vdftra, save_u, save_v, save_t, save_q, &
flag_for_pbl_generic_tend, ldiag3d, qdiag3d, lssav, ugrs, vgrs, tgrs, errmsg, errflg)

Expand All @@ -29,13 +29,13 @@ subroutine GFS_PBL_generic_pre_run (im, levs, nvdiff, ntrac, rtg_ozone_index,
integer, intent(in) :: im, levs, nvdiff, ntrac
integer, intent(in) :: ntqv, ntcw, ntiw, ntrw, ntsw, ntlnc, ntinc, ntrnc, ntsnc, ntgnc
integer, intent(in) :: ntwa, ntia, ntgl, ntoz, ntke, ntkev, nqrimef,ntchs, ntchm
integer, intent(in) :: ntccn, nthl, nthnc, ntgv, nthv
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_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
logical, intent(in) :: nssl_hail_on, nssl_ccn_on
logical, intent(in) :: nssl_hail_on, nssl_ccn_on, nssl_3moment

real(kind=kind_phys), dimension(:,:,:), intent(in) :: qgrs
real(kind=kind_phys), dimension(:,:), intent(in) :: ugrs, vgrs, tgrs
Expand Down Expand Up @@ -215,15 +215,23 @@ subroutine GFS_PBL_generic_pre_run (im, levs, nvdiff, ntrac, rtg_ozone_index,
vdftra(i,k,7) = qgrs(i,k,nthl)
vdftra(i,k,8) = qgrs(i,k,ntlnc)
vdftra(i,k,9) = qgrs(i,k,ntinc)
vdftra(i,k,10) = qgrs(i,k,ntrnc)
vdftra(i,k,11) = qgrs(i,k,ntsnc)
vdftra(i,k,12) = qgrs(i,k,ntgnc)
vdftra(i,k,13) = qgrs(i,k,nthnc)
vdftra(i,k,14) = qgrs(i,k,ntgv)
vdftra(i,k,15) = qgrs(i,k,nthv)
vdftra(i,k,16) = qgrs(i,k,ntoz)
vdftra(i,k,10) = qgrs(i,k,ntrnc)
vdftra(i,k,11) = qgrs(i,k,ntsnc)
vdftra(i,k,12) = qgrs(i,k,ntgnc)
vdftra(i,k,13) = qgrs(i,k,nthnc)
vdftra(i,k,14) = qgrs(i,k,ntgv)
vdftra(i,k,15) = qgrs(i,k,nthv)
vdftra(i,k,16) = qgrs(i,k,ntoz)
n = 16
IF ( nssl_ccn_on ) THEN
vdftra(i,k,17) = qgrs(i,k,ntccn)
vdftra(i,k,n+1) = qgrs(i,k,ntccn)
n = n+1
ENDIF
IF ( nssl_3moment ) THEN
vdftra(i,k,n+1) = qgrs(i,k,ntrz)
vdftra(i,k,n+2) = qgrs(i,k,ntgz)
vdftra(i,k,n+3) = qgrs(i,k,nthz)
n = n+3
ENDIF
enddo
enddo
Expand All @@ -241,12 +249,19 @@ subroutine GFS_PBL_generic_pre_run (im, levs, nvdiff, ntrac, rtg_ozone_index,
vdftra(i,k,7) = qgrs(i,k,ntlnc)
vdftra(i,k,8) = qgrs(i,k,ntinc)
vdftra(i,k,9) = qgrs(i,k,ntrnc)
vdftra(i,k,10) = qgrs(i,k,ntsnc)
vdftra(i,k,11) = qgrs(i,k,ntgnc)
vdftra(i,k,12) = qgrs(i,k,ntgv)
vdftra(i,k,13) = qgrs(i,k,ntoz)
vdftra(i,k,10) = qgrs(i,k,ntsnc)
vdftra(i,k,11) = qgrs(i,k,ntgnc)
vdftra(i,k,12) = qgrs(i,k,ntgv)
vdftra(i,k,13) = qgrs(i,k,ntoz)
n = 13
IF ( nssl_ccn_on ) THEN
vdftra(i,k,14) = qgrs(i,k,ntccn)
vdftra(i,k,n+1) = qgrs(i,k,ntccn)
n = n+1
ENDIF
IF ( nssl_3moment ) THEN
vdftra(i,k,n+1) = qgrs(i,k,ntrz)
vdftra(i,k,n+2) = qgrs(i,k,ntgz)
n = n+2
ENDIF
enddo
enddo
Expand Down
28 changes: 28 additions & 0 deletions physics/GFS_PBL_generic_pre.meta
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,27 @@
dimensions = ()
type = integer
intent = in
[ntrz]
standard_name = index_of_reflectivity_of_rain_in_tracer_concentration_array
long_name = tracer index for rain reflectivity
units = index
dimensions = ()
type = integer
intent = in
[ntgz]
standard_name = index_of_reflectivity_of_graupel_in_tracer_concentration_array
long_name = tracer index for graupel reflectivity
units = index
dimensions = ()
type = integer
intent = in
[nthz]
standard_name = index_of_reflectivity_of_hail_in_tracer_concentration_array
long_name = tracer index for hail reflectivity
units = index
dimensions = ()
type = integer
intent = in
[imp_physics]
standard_name = control_for_microphysics_scheme
long_name = choice of microphysics scheme
Expand Down Expand Up @@ -301,6 +322,13 @@
dimensions = ()
type = logical
intent = in
[nssl_3moment]
standard_name = nssl_3moment
long_name = 3-moment activation flag in NSSL microphysics scheme
units = flag
dimensions = ()
type = logical
intent = in
[hybedmf]
standard_name = flag_for_hybrid_edmf_pbl_scheme
long_name = flag for hybrid edmf pbl scheme (moninedmf)
Expand Down
4 changes: 2 additions & 2 deletions physics/GFS_debug.F90
Original file line number Diff line number Diff line change
Expand Up @@ -747,9 +747,9 @@ subroutine GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, Coupling,
call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%det_thl ', Diag%det_thl)
call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%det_sqv ', Diag%det_sqv)
end if
call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%nupdraft ', Diag%nupdraft)
call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%maxwidth ', Diag%maxwidth)
call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%maxMF ', Diag%maxMF)
call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%ktop_plume ', Diag%ktop_plume)
call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%ztop_plume ', Diag%ztop_plume)
call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%exch_h ', Diag%exch_h)
call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%exch_m ', Diag%exch_m)
end if
Expand Down
Loading

0 comments on commit a0e77fc

Please sign in to comment.