@@ -2632,15 +2632,24 @@ subroutine snowwater_glacier (nsnow ,nsoil ,imelt ,dt ,sfctmp , & !in
26322632 snliq ,imelt ,ficeold, & ! in
26332633 isnow ,dzsnso ) ! inout
26342634
2635+ if (isnow < 0 ) & ! when multi-layer
26352636 call combine_glacier (nsnow ,nsoil , & ! in
26362637 isnow ,sh2o ,stc ,snice ,snliq , & ! inout
26372638 dzsnso ,sice ,snowh ,sneqv , & ! inout
26382639 ponding1 ,ponding2) ! out
26392640
2641+ if (isnow < 0 ) & ! when multi-layer
26402642 call divide_glacier (nsnow ,nsoil , & ! in
26412643 isnow ,stc ,snice ,snliq ,dzsnso ) ! inout
26422644 end if
26432645
2646+ call snowh2o_glacier (nsnow ,nsoil ,dt ,qsnfro ,qsnsub , & ! in
2647+ qrain , & ! in
2648+ isnow ,dzsnso ,snowh ,sneqv ,snice , & ! inout
2649+ snliq ,sh2o ,sice ,stc , & ! inout
2650+ ponding1 ,ponding2 ,fsh , & ! inout
2651+ qsnbot ) ! out
2652+
26442653! set empty snow layers to zero
26452654
26462655 do iz = - nsnow+1 , isnow
@@ -2651,16 +2660,9 @@ subroutine snowwater_glacier (nsnow ,nsoil ,imelt ,dt ,sfctmp , & !in
26512660 zsnso(iz) = 0 .
26522661 enddo
26532662
2654- call snowh2o_glacier (nsnow ,nsoil ,dt ,qsnfro ,qsnsub , & ! in
2655- qrain , & ! in
2656- isnow ,dzsnso ,snowh ,sneqv ,snice , & ! inout
2657- snliq ,sh2o ,sice ,stc , & ! inout
2658- ponding1 ,ponding2 ,fsh , & ! inout
2659- qsnbot ) ! out
2660-
26612663! to obtain equilibrium state of snow in glacier region
26622664
2663- if (sneqv > mwd .and. isnow /= 0 ) then ! 100 mm -> maximum water depth
2665+ if (sneqv > mwd) then ! 100 mm -> maximum water depth
26642666 bdsnow = snice(0 ) / dzsnso(0 )
26652667 snoflow = (sneqv - mwd)
26662668 snice(0 ) = snice(0 ) - snoflow
@@ -2670,7 +2672,7 @@ subroutine snowwater_glacier (nsnow ,nsoil ,imelt ,dt ,sfctmp , & !in
26702672
26712673! sum up snow mass for layered snow
26722674
2673- if (isnow /= 0 ) then
2675+ if (isnow < 0 ) then
26742676 sneqv = 0 .
26752677 snowh = 0 .
26762678 do iz = isnow+1 ,0
@@ -2746,7 +2748,7 @@ subroutine snowfall_glacier (nsoil ,nsnow ,dt ,qsnow ,snowhin , & !in
27462748
27472749! creating a new layer
27482750
2749- if (isnow == 0 .and. qsnow> 0 . .and. snowh >= 0.05 ) then
2751+ if (isnow == 0 .and. qsnow> 0 . .and. snowh >= 0.025 ) then
27502752 isnow = - 1
27512753 newnode = 1
27522754 dzsnso(0 )= snowh
@@ -2904,8 +2906,8 @@ subroutine combine_glacier (nsnow ,nsoil , & !in
29042906 real (kind= kind_phys) :: zwice ! < total ice mass in snow
29052907 real (kind= kind_phys) :: zwliq ! < total liquid water in snow
29062908 real (kind= kind_phys) :: dzmin(3 ) ! < minimum of top snow layer
2907- data dzmin / 0.045 , 0.05 , 0.2 /
2908- ! data dzmin /0.025, 0.025, 0.1/ ! mb: change limit
2909+ ! data dzmin /0.045, 0.05, 0.2/
2910+ data dzmin / 0.025 , 0.025 , 0.1 / ! mb: change limit
29092911!- ----------------------------------------------------------------------
29102912
29112913 isnow_old = isnow
@@ -2915,17 +2917,29 @@ subroutine combine_glacier (nsnow ,nsoil , & !in
29152917 if (j /= 0 ) then
29162918 snliq(j+1 ) = snliq(j+1 ) + snliq(j)
29172919 snice(j+1 ) = snice(j+1 ) + snice(j)
2920+ dzsnso(j+1 ) = dzsnso(j+1 ) + dzsnso(j)
29182921 else
29192922 if (isnow_old < - 1 ) then
29202923 snliq(j-1 ) = snliq(j-1 ) + snliq(j)
29212924 snice(j-1 ) = snice(j-1 ) + snice(j)
2925+ dzsnso(j-1 ) = dzsnso(j-1 ) + dzsnso(j)
29222926 else
2923- ponding1 = ponding1 + snliq(j) ! isnow will get set to zero below
2924- sneqv = snice(j) ! ponding will get added to ponding from
2925- snowh = dzsnso(j) ! phasechange which should be zero here
2926- snliq(j) = 0.0 ! because there it was only calculated
2927- snice(j) = 0.0 ! for thin snow
2928- dzsnso(j) = 0.0
2927+ if (snice(j) >= 0 .) then
2928+ ponding1 = snliq(j) ! isnow will get set to zero below; ponding1 will get
2929+ sneqv = snice(j) ! added to ponding from phasechange ponding should be
2930+ snowh = dzsnso(j) ! zero here because it was calculated for thin snow
2931+ else ! snice over-sublimated earlier
2932+ ponding1 = snliq(j) + snice(j)
2933+ if (ponding1 < 0 .) then ! if snice and snliq sublimates remove from soil
2934+ sice(1 ) = max (0.0 ,sice(1 )+ ponding1/ (dzsnso(1 )* 1000 .))
2935+ ponding1 = 0.0
2936+ end if
2937+ sneqv = 0.0
2938+ snowh = 0.0
2939+ end if
2940+ snliq(j) = 0.0
2941+ snice(j) = 0.0
2942+ dzsnso(j) = 0.0
29292943 endif
29302944! sh2o(1) = sh2o(1)+snliq(j)/(dzsnso(1)*1000.)
29312945! sice(1) = sice(1)+snice(j)/(dzsnso(1)*1000.)
@@ -2968,8 +2982,8 @@ subroutine combine_glacier (nsnow ,nsoil , & !in
29682982! check the snow depth - all snow gone
29692983! the liquid water assumes ponding on soil surface.
29702984
2971- ! if (snowh < 0.025 .and. isnow < 0 ) then ! mb: change limit
2972- if (snowh < 0.05 .and. isnow < 0 ) then
2985+ if (snowh < 0.025 .and. isnow < 0 ) then ! mb: change limit
2986+ ! if (snowh < 0.05 .and. isnow < 0 ) then
29732987 isnow = 0
29742988 sneqv = zwice
29752989 ponding2 = ponding2 + zwliq ! limit of isnow < 0 means input ponding
@@ -3167,8 +3181,8 @@ subroutine divide_glacier (nsnow ,nsoil , & !in
31673181 zwliq, zwice, tsno(1 ))
31683182
31693183 ! subdivide a new layer
3170- ! if (msno <= 2 .and. dz(2) > 0.20) then ! mb: change limit
3171- if (msno <= 2 .and. dz(2 ) > 0.10 ) then
3184+ if (msno <= 2 .and. dz(2 ) > 0.20 ) then ! mb: change limit
3185+ ! if (msno <= 2 .and. dz(2) > 0.10) then
31723186 msno = 3
31733187 dtdz = (tsno(1 ) - tsno(2 ))/ ((dz(1 )+ dz(2 ))/ 2 .)
31743188 dz(2 ) = dz(2 )/ 2 .
@@ -3295,6 +3309,7 @@ subroutine snowh2o_glacier (nsnow ,nsoil ,dt ,qsnfro ,qsnsub , & !in
32953309 sneqv = sneqv - qsnsub* dt + qsnfro* dt
32963310 propor = sneqv/ temp
32973311 snowh = max (0 .,propor * snowh)
3312+ snowh = min (max (snowh,sneqv/ 500.0 ),sneqv/ 50.0 ) ! limit adjustment to a reasonable density
32983313 elseif (opt_gla == 2 ) then
32993314 fsh = fsh - (qsnfro- qsnsub)* hsub
33003315 qsnfro = 0.0
0 commit comments