anchor.diff:          real :: BV_freq
   
           BV_freq = gravity * (log(th_top)-log(th_bot)) / (z_top - z_bot)
  -
       end function calc_dry_stability
   
       !>----------------------------------------------------------
  
positive.code:         deallocate(vertical_N)
      end function calc_domain_stability
  
      !>----------------------------------------------------------
      !! Compute linear wind perturbations to U and V and add them back to the domain
      !!
  
negative.code: 
      logical :: variable_N
      logical :: smooth_nsq
      real    :: N_squared
      !! unfortunately these have to be allocated every call because we could be calling on both the high-res
      !! domain and the low res domain (to "remove" the linear winds)
      real,allocatable,dimension(:,:)::k,l,kl,sig
  