anchor.diff:  
               end do
               !$omp end do
  +            ! memory needs to be freed so this structure can be used again when removing linear winds
  +            call destroy_linear_theory_data(lt_data_m)
               !$omp end parallel
               write(*,"(A,f5.1,A$)") char(13), loops_completed/real(n_dir_values*n_spd_values)*100," %"
               write(*,*) char(10),"--------  Linear wind look up table generation complete ---------"
  
positive.code:                     top   = min(j + winsz,nz)
                      south = max(k - winsz, 1)
                      north = min(k + winsz,ny)
                      n = (((east-west)+1) * ((top-bottom)+1) * ((north-south)+1))
                      !   Then compute the mean in log space
                      curnsq = sum(log( domain%nsquared(west:east, bottom:top, south:north) ))
                      curnsq = curnsq / n
  
negative.code:                         v_perturbation(i,j,k) = v_perturbation(i,j,k) * (1-linear_update_fraction) &
                                      + linear_update_fraction * (sweight*wind_first + (1-sweight)*wind_second)
  
                          if (reverse) then
                              domain%v(i,j,k) = domain%v(i,j,k) - v_perturbation(i,j,k)
                          else
                              domain%v(i,j,k) = domain%v(i,j,k) + v_perturbation(i,j,k)
                          endif
                      endif
                  end do
              end do
  