anchor.diff:          ! s  =  H / options%parameters%sleve_decay_factor  
           s1 =  H / options%parameters%decay_rate_L_topo 
           s2 =  H / options%parameters%decay_rate_S_topo  
  -
  -        s = (s1+s2)/2 ! Experiment, lets see what this does. 
  -        ! if (this_image()==1) print*, "  s_accel max: ", s, "  - h max:", MAXVAL(global_terrain)
  -          
  +        s = s1 ! only for the -currently unused- delta_dzdx_sc calculation (1B)
  +        ! wind_top = (s1+s2)/2 ! Experiment, lets see what this does. 
  +
  +        ! To prevent the wind_top (the height below which we hor.accelerate winds) from becoming too low, thus creating 
  +        !   very large acceleration, we introduce this check. 
  +        e = 1.2  ! <- first guess
  +        if (MAXVAL(global_terrain) *e < s1 ) then
  +            wind_top = s1 
  +            if (this_image()==1) print*, "  horizontally accelerating winds below:", wind_top, "m. " !,"(Factor H/s:", H/s ,")"
  +        else
  +            wind_top = MAXVAL(global_terrain) * e !**2
  +            if (this_image()==1 )   print*, "  adjusting wind top upward from ",s1 ," to ", wind_top  ,"m. Horizontally accelerating winds below this level."
  +        endif
  +        ! if (this_image()==1) print*, "  s_accel max: ", wind_top, "  - h max:", MAXVAL(global_terrain)
  +
   
           !_________ 1. Calculate delta_dzdx for w_real calculation - CURRENTLY NOT USED- reconsider  _________
           allocate(delta_terrain(this% ims : this% ime, &
  
positive.code:         real, allocatable :: zf_interface(:,:,:), dzf_interface(:,:,:), zf(:,:,:), dzf_mass(:,:,:), dzfdx(:,:,:), dzfdy(:,:,:)!, delta_dzdx(:,:,:)
          real, allocatable :: temp_offset(:,:), temp(:,:,:), temp2(:,:)
  
          real :: s, s1, s2, s1_2
          integer :: i
  
          call read_forcing_terrain(this, options, forcing)
  
negative.code: 
          real, allocatable :: temp(:,:,:) !, terrain_u(:,:), terrain_v(:,:)
          integer :: i
          real :: smooth_height, H, s, n, s1, s2, gamma
          logical :: SLEVE  
          ! character :: filename, file_idS, file_idn
  
  