Skip to content

Commit

Permalink
Merge pull request #344 from tanyasmirnova/ruc_land_ice_v1
Browse files Browse the repository at this point in the history
Sync RUC LSM code with the version used in RAP/HRRR
  • Loading branch information
climbfuji authored Oct 28, 2019
2 parents 4a17324 + db9742d commit 660ede7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
10 changes: 6 additions & 4 deletions physics/module_sf_ruclsm.F90
Original file line number Diff line number Diff line change
Expand Up @@ -431,8 +431,8 @@ SUBROUTINE LSMRUC( &
!! or ~100 mm of snow height
!
! snowc(i,j) = min(1.,snow(i,j)/32.)
soilt1(i,j)=soilt(i,j)
if(snow(i,j).le.32.) soilt1(i,j)=tso(i,1,j)
! soilt1(i,j)=soilt(i,j)
! if(snow(i,j).le.32.) soilt1(i,j)=tso(i,1,j)
!> - Initializing inside snow temp if it is not defined
IF((soilt1(i,j) .LT. 170.) .or. (soilt1(i,j) .GT.400.)) THEN
IF(snow(i,j).gt.32.) THEN
Expand All @@ -450,7 +450,9 @@ SUBROUTINE LSMRUC( &
patmb=P8w(i,kms,j)*1.e-2
QSG (i,j) = QSN(SOILT(i,j),TBQ)/PATMB
IF((qvg(i,j) .LE. 0.) .or. (qvg(i,j) .GT.0.1)) THEN
qvg (i,j) = QSG(i,j)*mavail(i,j)
!17sept19 - bad approximation with very low mavail.
!qvg(i,j) = QSG(i,j)*mavail(i,j)
qvg (i,j) = qv3d(i,1,j)
IF (debug_print ) THEN
print *, &
'QVG is initialized in RUCLSM ', qvg(i,j),mavail(i,j),qsg(i,j),i,j
Expand Down Expand Up @@ -751,7 +753,7 @@ SUBROUTINE LSMRUC( &
meltfactor = 0.85

do k=2,nzs
if(zsmain(k).ge.1.0) then
if(zsmain(k).ge.1.1) then
NROOT=K
goto 111
endif
Expand Down
17 changes: 10 additions & 7 deletions physics/sfc_drv_ruc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -560,13 +560,15 @@ subroutine lsm_ruc_run & ! inputs
!prcp(i,j) = rhoh2o * tprcp(i) ! tprcp in [m] - convective plus explicit
!raincv(i,j) = rhoh2o * rainc(i) ! total time-step convective precip
!rainncv(i,j) = rhoh2o * max(rain(i)-rainc(i),0.0) ! total time-step explicit precip
!graupelncv(i,j) = rhoh2o * graupel(i)
!snowncv(i,j) = rhoh2o * snow(i)
prcp(i,j) = rhoh2o * (rainc(i)+rainnc(i)) ! tprcp in [m] - convective plus explicit
raincv(i,j) = rhoh2o * rainc(i) ! total time-step convective precip
rainncv(i,j) = rhoh2o * rainnc(i) ! total time-step explicit precip
prcp(i,j) = rhoh2o * (rainc(i)+rainnc(i)) ! [mm] - convective plus explicit
raincv(i,j) = rhoh2o * rainc(i) ! [mm] - total time-step convective precip
rainncv(i,j) = rhoh2o * rainnc(i) ! [mm] - total time-step explicit precip
graupelncv(i,j) = rhoh2o * graupel(i)
snowncv(i,j) = rhoh2o * snow(i)
!if(prcp(i,j) > 0. .and. i==21) then
!print *,'prcp(i,j),rainncv(i,j),graupelncv(i,j),snowncv(i,j),ffrozp(i,j)',i,j, &
! prcp(i,j),rainncv(i,j),graupelncv(i,j),snowncv(i,j),ffrozp(i,j)
!endif
! ice not used
! precipfr(i,j) = rainncv(i,j) * ffrozp(i,j)

Expand Down Expand Up @@ -694,7 +696,7 @@ subroutine lsm_ruc_run & ! inputs
znt(i,j) = zorl(i)/100.

if(debug_print) then
!if(me==0 .and. i==ipr) then
if(me==0 .and. i==ipr) then
write (0,*)'before RUC smsoil = ',smsoil(i,:,j), i,j
write (0,*)'stsoil = ',stsoil(i,:,j), i,j
write (0,*)'soilt = ',soilt(i,j), i,j
Expand Down Expand Up @@ -788,7 +790,7 @@ subroutine lsm_ruc_run & ! inputs
write (0,*)'shdmin1d(i,j) =',i,j,shdmin1d(i,j)
write (0,*)'shdmax1d(i,j) =',i,j,shdmax1d(i,j)
write (0,*)'rdlai2d =',rdlai2d
!endif
endif
endif

!> - Call RUC LSM lsmruc().
Expand Down Expand Up @@ -828,6 +830,7 @@ subroutine lsm_ruc_run & ! inputs
& its,ite, jts,jte, kts,kte )

if(debug_print) then
!if(me==0 .and. i==ipr) then
write (0,*)'after sneqv(i,j) =',i,j,sneqv(i,j)
write (0,*)'after snowh(i,j) =',i,j,snowh(i,j)
write (0,*)'after sncovr(i,j) =',i,j,sncovr(i,j)
Expand Down

0 comments on commit 660ede7

Please sign in to comment.