Skip to content

Commit

Permalink
Merge branch 'hr3_land_upgrades' of https://github.com/HelinWei-NOAA/…
Browse files Browse the repository at this point in the history
…ccpp-physics into ufs/dev_meso_fix_new_ksmax
  • Loading branch information
mdtoyNOAA committed Oct 17, 2023
2 parents 4704ecf + 2f417bb commit df0a259
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 6 deletions.
24 changes: 18 additions & 6 deletions physics/sfc_diag_post.F90
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,17 @@ module sfc_diag_post
!!
#endif
subroutine sfc_diag_post_run (im, lsm, lsm_noahmp, opt_diag, dry, lssav, dtf, con_eps, con_epsm1, pgr,&
t2mmp,q2mp, t2m, q2m, u10m, v10m, tmpmin, tmpmax, spfhmin, spfhmax, &
vegtype,t2mmp,q2mp, t2m, q2m, u10m, v10m, tmpmin, tmpmax, spfhmin, spfhmax, &
wind10mmax, u10mmax, v10mmax, dpt2m, errmsg, errflg)

use machine, only: kind_phys, kind_dbl_prec

implicit none

integer, intent(in) :: im, lsm, lsm_noahmp,opt_diag
logical, intent(in) :: lssav
real(kind=kind_phys), intent(in) :: dtf, con_eps, con_epsm1
integer, intent(in) :: im, lsm, lsm_noahmp,opt_diag
integer, dimension(:), intent(in) :: vegtype ! vegetation type (integer index)
logical, intent(in) :: lssav
real(kind=kind_phys), intent(in) :: dtf, con_eps, con_epsm1
logical , dimension(:), intent(in) :: dry
real(kind=kind_phys), dimension(:), intent(in) :: pgr, u10m, v10m
real(kind=kind_phys), dimension(:), intent(inout) :: t2m, q2m, tmpmin, tmpmax, spfhmin, spfhmax
Expand All @@ -41,12 +42,23 @@ subroutine sfc_diag_post_run (im, lsm, lsm_noahmp, opt_diag, dry, lssav, dtf, co
errflg = 0

if (lsm == lsm_noahmp) then
if (opt_diag == 2 .or. opt_diag == 3)then
! over shrublands use opt_diag=2
do i=1, im
if(dry(i)) then
if (vegtype(i) == 6 .or. vegtype(i) == 7 &
.or. vegtype(i) == 16) then
t2m(i) = t2mmp(i)
q2m(i) = q2mp(i)
endif
endif
enddo

if (opt_diag == 2 .or. opt_diag == 3) then
do i=1,im
if(dry(i)) then
t2m(i) = t2mmp(i)
q2m(i) = q2mp(i)
endif
endif
enddo
endif
endif
Expand Down
7 changes: 7 additions & 0 deletions physics/sfc_diag_post.meta
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,13 @@
type = real
kind = kind_phys
intent = in
[vegtype]
standard_name = vegetation_type_classification
long_name = vegetation type at each grid cell
units = index
dimensions = (horizontal_loop_extent)
type = integer
intent= in
[t2mmp]
standard_name = temperature_at_2m_from_noahmp
long_name = 2 meter temperature from noahmp
Expand Down

0 comments on commit df0a259

Please sign in to comment.