anchor.diff:  	real, parameter :: vmax=20
   	real, parameter :: vmin=-20
   	
  -	integer, parameter :: n_U_values=30
  -	integer, parameter :: n_V_values=30
  +	integer, parameter :: n_U_values=10
  +	integer, parameter :: n_V_values=10
   	
   contains
   	
  
positive.code: 		
  	end subroutine initialize_spatial_winds
  	
  	subroutine spatial_winds(domain)
  		type(linearizable_type), intent(inout) :: domain
  		real :: u,v
  		integer :: nx,ny,nz,i,j,k
  		integer :: step, upos, vpos
  	
  		nx=size(domain%u,1)-1
  		nz=size(domain%u,2)
  		ny=size(domain%u,3)
  		
  		
  		do k=1,ny
  			do j=1,nz
  				do i=1,nx
  					upos=1
  					do step=1,n_U_values
  						if (domain%u(i,j,k)<u_values(step)) then
  							upos=step
  						endif
  					end do
  					vpos=1
  					do step=1,n_V_values
  						if (domain%v(i,j,k)<v_values(step)) then
  							vpos=step
  						endif
  					end do
  					
  					! should do some linear interpolation between this step and the next one at some point but for now...
  					domain%u(i,j,k)=domain%u(i,j,k)+u_LUT(upos,vpos,i,j,k)
  					domain%v(i,j,k)=domain%v(i,j,k)+v_LUT(upos,vpos,i,j,k)
  				end do
  			end do
  		end do
  
negative.code: 		allocate(v_values(n_V_values))
  		
  		do i=1,n_U_values
  			u_values(i)=(i-1)/real(n_U_values-1) * (umax-umin) + umin
  		enddo
  		do i=1,n_V_values
  			v_values(i)=(i-1)/real(n_V_values-1) * (vmax-vmin) + vmin
  		enddo
  		
  		allocate(u_LUT(n_U_values,n_V_values,nx+1,nz,ny))
  		allocate(v_LUT(n_U_values,n_V_values,nx,nz,ny+1))
  		
  		write(*,*) "Percent Completed:"
  		do i=1,n_U_values
  			write(*,*) i/real(n_U_values)*100," %"
  			do j=1,n_V_values
  				domain%u=u_values(i)
  				domain%v=v_values(j)
  