anchor.diff:                                  !$omp end critical (print_lock)
                               endif
                               
  -                            call CPU_TIME(timeone)
                               ! As tempting as it may be, associate statements are not threadsafe!!!
                               output%variables(v)%data(:,i,j) = downscale_point(                                         &
                                                       pred_data                       (   p_start : p_end,     :),       &
  
positive.code:                         ! index 1 is the constant for the regression code... should be moved into regression code...?
                          output%variables(1)%predictors(:,i,j,1) = pred_data( p_start   : p_end,    1)
                          do v=1,n_atm_variables
                              
                              call read_point( predictors%variables(v)%data,   pred_data(:,v+1),  i,j, predictors%geoLUT,   options%prediction%interpolation_method)
                              call read_point( training_atm%variables(v)%data, train_data(:,v+1), i,j, training_atm%geoLUT, options%training%interpolation_method)
                              
                              ! perform (e.g.) quantile mapping
                              call transform_data(options%prediction%transformations(v),                                         &
                                                  pred_data(:,v+1),  predictors%transform_start,   predictors%transform_stop,    &
  
negative.code:         integer, dimension(:),   allocatable :: analogs
          real(8), dimension(:),   allocatable :: coefficients
          
          integer*8 :: timeone, timetwo
          integer :: i, j, n, nvars
          integer :: a, n_analogs, selected_analog
          real    :: rand
          integer :: omp_get_thread_num
          
          n_analogs = options%n_analogs
          nvars = size(atm,2)
          n = size(predictor,1)
  