Skip to content

Commit

Permalink
test 6-9
Browse files Browse the repository at this point in the history
  • Loading branch information
HelinWei-NOAA committed May 22, 2024
1 parent e039a94 commit 31bca4e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 6 deletions.
18 changes: 17 additions & 1 deletion physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.fv3.F90
Original file line number Diff line number Diff line change
Expand Up @@ -593,8 +593,24 @@ subroutine GFS_phys_time_vary_init (

isnow = nint(snowxy(ix))+1 ! snowxy <=0.0, dzsno >= 0.0

! using stc and tgxy to linearly interpolate the snow temp for each layer
!Calculate the total thickness
! total_thickness = sum(dzsno)
! Calculate the temperature difference
! temp_diff=tgxy(ix)-stc(ix,1)
! Calculate the mid-points and interpolate temperatures for each layer
! accumulated_thickness = 0.0
! do is = isnow, 0
! accumulated_thickness = accumulated_thickness + dzsno(is)
! mid_points(is) = accumulated_thickness - dzsno(is) / 2.0
! layer_temp = tgxy(ix) + (mid_points(is) / total_thickness) * temp_diff
! tsnoxy(ix,is) = layer_temp
! end do

do is = isnow,0
tsnoxy(ix,is) = tgxy(ix)
! tsnoxy(ix,is) = tgxy(ix)
! tsnoxy(ix,is) = tgxy(ix) + (( sum(dzsno(isnow:is)) -0.5*dzsno(is) )/snd)*(tgxy(ix)-stc(ix,1))
tsnoxy(ix,is) = tgxy(ix) + (( sum(dzsno(isnow:is)) -0.5*dzsno(is) )/snd)*(stc(ix,1)-tgxy(ix))
snliqxy(ix,is) = zero
snicexy(ix,is) = one * dzsno(is) * weasd(ix)/snd
enddo
Expand Down
11 changes: 6 additions & 5 deletions physics/SFC_Models/Land/Noahmp/module_sf_noahmplsm.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1989,7 +1989,7 @@ subroutine energy (parameters,ice ,vegtyp ,ist ,nsnow ,nsoil , & !in

real (kind=kind_phys), parameter :: mpe = 1.e-6
real (kind=kind_phys), parameter :: psiwlt = -150. !metric potential for wilting point (m)
real (kind=kind_phys), parameter :: z0 = 0.002 ! bare-soil roughness length (m) (i.e., under the canopy)
real (kind=kind_phys), parameter :: z0 = 0.015 ! bare-soil roughness length (m) (i.e., under the canopy)

! ---------------------------------------------------------------------------------------------------
! initialize fluxes from veg. fraction
Expand Down Expand Up @@ -2626,10 +2626,10 @@ subroutine csnow (parameters,isnow ,nsnow ,nsoil ,snice ,snliq ,dzsnso
! thermal conductivity of snow

do iz = isnow+1, 0
! tksno(iz) = 3.2217e-6*bdsnoi(iz)**2. ! stieglitz(yen,1965)
tksno(iz) = 3.2217e-6*bdsnoi(iz)**2. ! stieglitz(yen,1965)
! tksno(iz) = 2e-2+2.5e-6*bdsnoi(iz)*bdsnoi(iz) ! anderson, 1976
! tksno(iz) = 0.35 ! constant
tksno(iz) = 2.576e-6*bdsnoi(iz)**2. + 0.074 ! verseghy (1991)
! tksno(iz) = 2.576e-6*bdsnoi(iz)**2. + 0.074 ! verseghy (1991)
! tksno(iz) = 2.22*(bdsnoi(iz)/1000.)**1.88 ! douvill(yen, 1981)
enddo

Expand Down Expand Up @@ -5817,7 +5817,8 @@ subroutine thermalz0(parameters, fveg, z0m, z0mg, zlvl,

if (opt_trs == z0heqz0m) then

z0m_out = exp(fveg * log(z0m) + (1.0 - fveg) * log(z0mg))
! z0m_out = exp(fveg * log(z0m) + (1.0 - fveg) * log(z0mg))
z0m_out = fveg * z0m + (1.0 - fveg) * z0mg
z0h_out = z0m_out

elseif (opt_trs == chen09) then
Expand All @@ -5834,7 +5835,7 @@ subroutine thermalz0(parameters, fveg, z0m, z0mg, zlvl,
endif

z0h_out = exp( fveg * log(z0m * exp(-czil*0.4*258.2*sqrt(ustarx*z0m))) + &
(1.0 - fveg) * log(max(z0m/exp(kb_sigma_f0),1.0e-6)) )
(1.0 - fveg) * log(max(z0mg/exp(kb_sigma_f0),1.0e-6)) )

elseif (opt_trs == tessel) then

Expand Down

0 comments on commit 31bca4e

Please sign in to comment.