Skip to content

Commit

Permalink
Merge pull request #140 from mdtoyNOAA/RRFS_dev_drag_suite_sfc_compos…
Browse files Browse the repository at this point in the history
…ites_bugfixes

Bug fixes to drag_suite.F90 and GFS_surface_composites.F90
  • Loading branch information
SamuelTrahanNOAA authored Mar 21, 2022
2 parents 5a8a8f9 + 3e06ba4 commit 78620d6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 36 deletions.
6 changes: 4 additions & 2 deletions physics/GFS_surface_composites.F90
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ subroutine GFS_surface_composites_pre_run (im, xlat_d, xlon_d, flag_init, lsm_co
endif
if (dry(i)) then ! Land
uustar_lnd(i) = uustar(i)
if(lsm /= lsm_ruc) weasd_lnd(i) = weasd(i)
tsurf_lnd(i) = tsfcl(i)
! DH*
else
Expand All @@ -232,6 +233,7 @@ subroutine GFS_surface_composites_pre_run (im, xlat_d, xlon_d, flag_init, lsm_co
endif
if (icy(i)) then ! Ice
uustar_ice(i) = uustar(i)
if(lsm /= lsm_ruc) weasd_ice(i) = weasd(i)
tsurf_ice(i) = tisfc(i)
ep1d_ice(i) = zero
gflx_ice(i) = zero
Expand Down Expand Up @@ -259,7 +261,6 @@ subroutine GFS_surface_composites_pre_run (im, xlat_d, xlon_d, flag_init, lsm_co
endif
enddo
!
if(lsm /= lsm_ruc) then ! do not do snow initialization with RUC lsm
if (frac_grid) then
do i=1,im
if (dry(i)) then
Expand All @@ -281,6 +282,7 @@ subroutine GFS_surface_composites_pre_run (im, xlat_d, xlon_d, flag_init, lsm_co
endif
enddo
else
if(lsm /= lsm_ruc) then ! do not do snow initialization with RUC lsm
do i=1,im
!-- print ice point
!if ( (xlon_d(i) > 298.6) .and. (xlon_d(i) < 298.7) .and. &
Expand All @@ -301,8 +303,8 @@ subroutine GFS_surface_composites_pre_run (im, xlat_d, xlon_d, flag_init, lsm_co
endif
endif
enddo
endif ! lsm/=lsm_ruc
endif
endif ! lsm/=lsm_ruc

! write(0,*)' minmax of ice snow=',minval(snowd_ice),maxval(snowd_ice)

Expand Down
43 changes: 9 additions & 34 deletions physics/drag_suite.F90
Original file line number Diff line number Diff line change
Expand Up @@ -589,19 +589,7 @@ subroutine drag_suite_run( &
endif
enddo

! Temporary changes
! do i=1,im
! if ( dx(i) .ge. dxmax_ss ) then
! ss_taper(i) = 1.
! else
! if ( dx(i) .le. dxmin_ss) then
! ss_taper(i) = 0.
! else
! ss_taper(i) = dxmax_ss * (1. - dxmin_ss/dx(i))/(dxmax_ss-dxmin_ss)
! endif
! endif
! enddo
! Temporary line
! Remove ss_tapering
ss_taper(:) = 1.

! SPP, if spp_gwd is 0, no perturbations are applied.
Expand Down Expand Up @@ -989,14 +977,10 @@ subroutine drag_suite_run( &
enddo
if((xland(i)-1.5).le.0. .and. 2.*varss_stoch(i).le.hpbl(i))then
if(br1(i).gt.0. .and. thvx(i,kpbl2)-thvx(i,kts) > 0.)then
! Temporary changes denoted by "!!"
!! cleff_ss = sqrt(dxy(i)**2 + dxyp(i)**2) ! WRF
! Modify xlinv to represent wave number of "typical" small-scale topography
! cleff_ss = 3. * max(dx(i),cleff_ss)
! cleff_ss = 10. * max(dxmax_ss,cleff_ss)
!! cleff_ss = 0.1 * max(dxmax_ss,cleff_ss) ! WRF
! cleff_ss = 0.1 * 12000.
!! coefm_ss(i) = (1. + olss(i)) ** (oass(i)+1.)
!!xlinv(i) = coefm_ss(i) / cleff_ss
xlinv(i) = 0.001*pi ! 2km horizontal wavelength
!govrth(i)=g/(0.5*(thvx(i,kpbl(i))+thvx(i,kts)))
govrth(i)=g/(0.5*(thvx(i,kpbl2)+thvx(i,kts)))
Expand All @@ -1008,10 +992,8 @@ subroutine drag_suite_run( &
!tauwavex0=0.5*XNBV*xlinv(i)*(2*MIN(varss(i),75.))**2*ro(i,kts)*u1(i,kpbl(i))
!tauwavex0=0.5*XNBV*xlinv(i)*(2.*MIN(varss(i),40.))**2*ro(i,kts)*u1(i,kpbl2)
!tauwavex0=0.5*XNBV*xlinv(i)*(2.*MIN(varss(i),40.))**2*ro(i,kts)*u1(i,3)
! Temporary change
var_temp = varss(i)
!var_temp = MIN(varss_stoch(i),varmax_ss_stoch(i)) + &
! MAX(0.,beta_ss*(varss_stoch(i)-varmax_ss_stoch(i)))
! Remove limit on varss_stoch
var_temp = varss_stoch(i)
! Note: This is a semi-implicit treatment of the time differencing
var_temp2 = 0.5*XNBV*xlinv(i)*(2.*var_temp)**2*ro(i,kvar) ! this is greater than zero
tauwavex0=var_temp2*u1(i,kvar)/(1.+var_temp2*deltim)
Expand All @@ -1025,10 +1007,8 @@ subroutine drag_suite_run( &
!tauwavey0=0.5*XNBV*xlinv(i)*(2*MIN(varss(i),75.))**2*ro(i,kts)*v1(i,kpbl(i))
!tauwavey0=0.5*XNBV*xlinv(i)*(2.*MIN(varss(i),40.))**2*ro(i,kts)*v1(i,kpbl2)
!tauwavey0=0.5*XNBV*xlinv(i)*(2.*MIN(varss(i),40.))**2*ro(i,kts)*v1(i,3)
! Temporary change
var_temp = varss(i)
!var_temp = MIN(varss_stoch(i),varmax_ss_stoch(i)) + &
! MAX(0.,beta_ss*(varss_stoch(i)-varmax_ss_stoch(i)))
! Remove limit on varss_stoch
var_temp = varss_stoch(i)
! Note: This is a semi-implicit treatment of the time differencing
var_temp2 = 0.5*XNBV*xlinv(i)*(2.*var_temp)**2*ro(i,kvar) ! this is greater than zero
tauwavey0=var_temp2*v1(i,kvar)/(1.+var_temp2*deltim)
Expand Down Expand Up @@ -1092,20 +1072,15 @@ subroutine drag_suite_run( &

IF ((xland(i)-1.5) .le. 0.) then
!(IH*kflt**n1)**-1 = (0.00102*0.00035**-1.9)**-1 = 0.00026615161
! Temporary changes
var_temp = varss(i)
!var_temp = MIN(varss_stoch(i),varmax_fd_stoch(i)) + &
! MAX(0.,beta_fd*(varss_stoch(i)-varmax_fd_stoch(i)))
! Remove limit on varss_stoch
var_temp = varss_stoch(i)
!var_temp = MIN(var_temp, 250.)
a1=0.00026615161*var_temp**2
! a1=0.00026615161*MIN(varss(i),varmax)**2
! a1=0.00026615161*(0.5*varss(i))**2
! k1**(n1-n2) = 0.003**(-1.9 - -2.8) = 0.003**0.9 = 0.005363
a2=a1*0.005363
! Revise e-folding height based on PBL height and topographic std. dev. -- M. Toy 3/12/2018
! Temporary changes
!H_efold = max(2*varss_stoch(i),hpbl(i))
!H_efold = min(H_efold,1500.)
! Beljaars H_efold
H_efold = 1500.
DO k=kts,km
wsp=SQRT(u1(i,k)**2 + v1(i,k)**2)
Expand Down

0 comments on commit 78620d6

Please sign in to comment.