next up previous contents
Next: Fortran: Module Interface SurfaceAlbedoMod Up: Fortran: Module Interface SoilTemperatureMod Previous: SoilThermProp   Contents



   subroutine PhaseChange (lbc, ubc, num_nolakec, filter_nolakec, fact, &
                           brr, hs, dhsdT, xmf, hs_top, sabg_lyr_col)

Calculation of the phase change within snow and soil layers: (1) Check the conditions for which the phase change may take place, i.e., the layer temperature is great than the freezing point and the ice mass is not equal to zero (i.e. melting), or the layer temperature is less than the freezing point and the liquid water mass is greater than the allowable supercooled liquid water calculated from freezing point depression (i.e. freezing). (2) Assess the rate of phase change from the energy excess (or deficit) after setting the layer temperature to freezing point. (3) Re-adjust the ice and liquid mass, and the layer temperature


     use shr_kind_mod , only : r8 => shr_kind_r8
     use clmtype
     use clm_time_manager, only : get_step_size
     use clm_varcon  , only : tfrz, hfus, grav, istsoil, istice_mec, isturb, icol_road_perv
     use clm_varcon  , only : istcrop
     use clm_varpar  , only : nlevsno, nlevgrnd
     implicit none
     integer , intent(in) :: lbc, ubc                             ! column bounds
     integer , intent(in) :: num_nolakec                          ! number of column non-lake points in column filter
     integer , intent(in) :: filter_nolakec(ubc-lbc+1)            ! column filter for non-lake points
     real(r8), intent(in) :: brr   (lbc:ubc, -nlevsno+1:nlevgrnd) ! temporary
     real(r8), intent(in) :: fact  (lbc:ubc, -nlevsno+1:nlevgrnd) ! temporary
     real(r8), intent(in) :: hs    (lbc:ubc)                      ! net ground heat flux into the surface
     real(r8), intent(in) :: dhsdT (lbc:ubc)                      ! temperature derivative of "hs"
     real(r8), intent(out):: xmf   (lbc:ubc)                      ! total latent heat of phase change
     real(r8), intent(in) :: hs_top(lbc:ubc)                      ! net heat flux into the top snow layer [W/m2]
     real(r8), intent(in) :: sabg_lyr_col(lbc:ubc,-nlevsno+1:1)   ! absorbed solar radiation (col,lyr) [W/m2]
   subroutine SoilTemperature in this module
   15 September 1999: Yongjiu Dai; Initial code
   15 December 1999:  Paul Houser and Jon Radakovich; F90 Revision
   2/14/02, Peter Thornton: Migrated to new data structures.
   7/01/03, Mariana Vertenstein: Migrated to vector code
   04/25/07 Keith Oleson: CLM3.5 Hydrology
   03/28/08 Mark Flanner: accept new arguments and calculate freezing rate of h2o in snow
   local pointers to original implicit in scalars
     integer , pointer :: snl(:)           !number of snow layers
     real(r8), pointer :: h2osno(:)        !snow water (mm H2O)
     integer , pointer :: ltype(:)         !landunit type
     integer , pointer :: clandunit(:)     !column's landunit
     integer , pointer :: ctype(:)         !column type
   local pointers to original implicit inout scalars
     real(r8), pointer :: snowdp(:)        !snow height (m)
   local pointers to original implicit out scalars
     real(r8), pointer :: qflx_snomelt(:)  !snow melt (mm H2O /s)
     real(r8), pointer :: eflx_snomelt(:)  !snow melt heat flux (W/m**2)
     real(r8), pointer :: eflx_snomelt_u(:)!urban snow melt heat flux (W/m**2)
     real(r8), pointer :: eflx_snomelt_r(:)!rural snow melt heat flux (W/m**2)
     real(r8), pointer :: qflx_snofrz_lyr(:,:)  !snow freezing rate (positive definite) (col,lyr) [kg m-2 s-1]
     real(r8), pointer :: qflx_glcice(:)   !flux of new glacier ice (mm H2O/s) [+ = ice grows]
   local pointers to original implicit in arrays
     real(r8), pointer :: h2osoi_liq(:,:)  !liquid water (kg/m2) (new)
     real(r8), pointer :: h2osoi_ice(:,:)  !ice lens (kg/m2) (new)
     real(r8), pointer :: tssbef(:,:)      !temperature at previous time step [K]
     real(r8), pointer :: sucsat(:,:)      !minimum soil suction (mm)
     real(r8), pointer :: watsat(:,:)      !volumetric soil water at saturation (porosity)
     real(r8), pointer :: bsw(:,:)         !Clapp and Hornberger "b"
     real(r8), pointer :: dz(:,:)          !layer thickness (m)
   local pointers to original implicit inout arrays
     real(r8), pointer :: t_soisno(:,:)    !soil temperature (Kelvin)
   local pointers to original implicit out arrays
     integer, pointer :: imelt(:,:)        !flag for melting (=1), freezing (=2), Not=0 (new)

Erik Kluzek 2011-06-15