anchor.diff:              where (now%mask == 0)
                   now%alb = 0.06_dp
               end where
  -            
  +
               if (trim(par%alb_scheme) .eq. "alex") then
                   now%alb_snow = par%alb_smin + (par%alb_smax - par%alb_smin)*(0.5_dp*tanh(par%afac*(now%t2m-par%tmid))+0.5_dp) 
  -                now%alb      = now%alb_snow 
  +                now%alb      = now%alb_snow
               end if
   
           end if
  -        
  +
           ! store residual energy
           where (now%mask == 0)
               now%qmr_res = 0.0_dp
           elsewhere
               now%qmr_res = now%qmr
           end where
  -
  -        now%subl = now%subl/rhow
  -        now%refr = now%refr - now%subl
   
       end subroutine mass_balance
   
  
positive.code:     !! calculated variables.
      subroutine surface_boundary_define(bnd,boundary)
  
          implicit none 
  
          type(boundary_opt_class), intent(in out) :: bnd !< boundary switches
          character(len=256), intent(in) :: boundary(:)   !< list of variable names for 
                                                          !! which overriding is requested.
          integer :: q 
  
          ! First set all boundary fields to false
          bnd%t2m     = .FALSE.
          bnd%tsurf   = .FALSE. 
          bnd%hsnow   = .FALSE.
          bnd%alb     = .FALSE.
          bnd%melt    = .FALSE.
  
negative.code:         bnd%smb     = .FALSE.
          bnd%acc     = .FALSE.
          bnd%lhf     = .FALSE.
          bnd%shf     = .FALSE.
          bnd%subl    = .FALSE.
          bnd%amp     = .FALSE.
  
          ! Now find boundary fields
          do q = 1,size(boundary)
  
              select case(trim(boundary(q)))
  
                  case("t2m")
                      bnd%t2m   = .TRUE.
                  case("tsurf")
                      bnd%tsurf = .TRUE.
                  case("hsnow")
                      bnd%hsnow = .TRUE.
                  case("alb")
                      bnd%alb   = .TRUE.
                  case("melt")
                      bnd%melt  = .TRUE.
                  case("refr")
                      bnd%refr  = .TRUE.
                  case("smb")
                      bnd%smb   = .TRUE.
                  case("acc")
                      bnd%acc   = .TRUE.
                  case("lhf")
                      bnd%lhf   = .TRUE.
                  case("shf")
                      bnd%shf   = .TRUE.
                  case("subl")
                      bnd%subl  = .TRUE.
                  case("amp")
                      bnd%amp   = .TRUE.
                  case DEFAULT
                      ! pass
              end select 
          end do 
  
  