anchor.diff:                                  ! hi_v_LUT(k,i,j,:,z,:) = real( real(                                                    &
                                   !         lt_data_m%v_perturb(1+buffer:fftnx-buffer,     1+buffer:fftny-buffer) ))
                               endif
  -                            !$omp critical
  -                            sync all
  -                            !$omp end critical
  +
  +                            !$omp critical (print_lock)
  +                            loops_completed = loops_completed+1
  +                            !$omp end critical (print_lock)
                           enddo
  +                        !$omp critical
  +                        sync all
  +                        !$omp end critical
   
                       ! end do
  -                    !$omp critical (print_lock)
  -                    loops_completed = loops_completed+1
  -                    !$omp end critical (print_lock)
                   ! end do
   
               end do
  -            !$omp 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
  -            if (this_image()==1) write(*,"(A,f5.1,A$)") char(13), loops_completed/real(n_dir_values*n_spd_values)*100," %"
  +            ! $omp end parallel
  +
  +            sync all
  +
  +            if (this_image()==1) write(*,"(f5.1,A)") loops_completed/real(z*(stop_pos-start_pos+1))*100," %"
               if (this_image()==1) write(*,*) char(10),"--------  Linear wind look up table generation complete ---------"
           endif
   
           if (this_image()==1) print*, "    Not writing Linear Theory LUT to file, not implemented yet"
  +
  +        print*, this_image(), maxval(hi_u_LUT), maxval(hi_v_LUT)
  +
  +        call io_write("u_"//trim(options%lt_options%u_LUT_Filename)//trim(str(this_image()))//".nc","ulut",hi_u_LUT)
  +        call io_write("v_"//trim(options%lt_options%u_LUT_Filename)//trim(str(this_image()))//".nc","vlut",hi_v_LUT)
           ! if ((options%lt_options%write_LUT).and.(.not.reverse)) then
           !     if ((options%lt_options%read_LUT) .and. (error == 0)) then
           !         print*, "    Not writing Linear Theory LUT to file because LUT was read from file"
  
positive.code:             if (this_image()==1) write(*,*) "Stabilities:",exp(nsq_values)
          endif
  
          if (reverse.or.(.not.((options%lt_options%read_LUT).and.(error==0)))) then
              ! loop over combinations of U, V, and Nsq values
              loops_completed = 0
              if (this_image()==1) write(*,*) "Percent Completed:"
              !$omp parallel default(shared) &
              !$omp private(i,j,k,ik,z, u,v, layer_height, layer_height_bottom, layer_height_top, temporary_u, temporary_v) &
              !$omp firstprivate(minimum_layer_size, n_dir_values, n_spd_values, n_nsq_values, nz,nx,ny,nxu,nyv,fftnx,fftny)
              ! $omp threadprivate(lt_data_m) declared at the top of the module
  
              ! initialization has to happen in each thread so each thread has its own copy
              ! lt_data_m is a threadprivate variable, within initialization, there are omp critical sections for fftw calls
              call initialize_linear_theory_data(lt_data_m, fftnx, fftny, domain%dx)
              allocate(temporary_u(fftnx - buffer*2, fftny - buffer*2))
              allocate(temporary_v(fftnx - buffer*2, fftny - buffer*2))
              !$omp do
              do ijk = start_pos, stop_pos
  
              ! do ik=0, n_dir_values*n_spd_values*n_nsq_values-1
                  ik = ijk / n_nsq_values ! no +1 yet because this still needs to go through another div / mod iteration to compute i and k
                  j = mod(ijk,n_nsq_values) + 1
  
negative.code:         integer, dimension(3,2) :: LUT_dims
          integer :: loops_completed ! this is just used to measure progress in the LUT creation
          integer :: total_LUT_entries, ijk, start_pos, stop_pos
          integer :: ims, jms
          real, allocatable :: temporary_u(:,:,:), temporary_v(:,:,:)
  
          type(grid_t), allocatable :: u_grids(:), v_grids(:)
  
          ims = lbound(domain%z%data_3d,1)
          jms = lbound(domain%z%data_3d,3)
  
          ! the domain to work over
          nz = size(domain%u%data_3d,  2)
  