anchor.diff:          if (.not.allocated(domain%fzs)) then
               call setup_linwinds(domain,options,rev,useD)
           endif
  -        
  +		
           ! add the spatially variable linear field
           ! if we are reverseing the effects, that means we are in the low-res domain
           ! that domain does not have a spatial LUT calculated, so it can not be performed
  
positive.code:     real, parameter :: min_stability= 5e-8 ! these may need to be a little narrower. 
      real :: linear_contribution = 1.0 ! multiplier on uhat,vhat before adding to u,v
      
      real, allocatable, dimension(:) :: dir_values, nsq_values
      ! Look Up Tables for linear perturbation are n_dir_values x n_nsq_values x nx x nz x ny
      real, allocatable, target, dimension(:,:,:,:,:) :: hi_u_LUT, hi_v_LUT, rev_u_LUT, rev_v_LUT
      real, pointer, dimension(:,:,:,:,:) :: u_LUT, v_LUT
      real, allocatable, dimension(:,:) :: linear_mask
      
      ! store the linear perturbation so we can update it slightly each time step
  
negative.code:     
      real, parameter :: dirmax=2*pi
      real, parameter :: dirmin=0
      real, parameter :: spdmax=30
      real, parameter :: spdmin=0
      real, parameter :: nsqmax=log(6e-4)
      real, parameter :: nsqmin=log(1e-7)
      
      integer, parameter :: n_dir_values=4 !72
      integer, parameter :: n_nsq_values=4 !15
      integer, parameter :: n_spd_values=4
      
      ! real,parameter::pi=3.1415927
      complex,parameter :: j= (0,1)
  