anchor.diff:          character(len=*), intent(in) :: value_name
           integer :: error
           real :: test_value
  -        
  +
           ! default return value assumes no error
           error = 0
  -        
  +
           call io_read_attribute(filename, value_name, test_value)
           if (abs(default_value - test_value)>1e-20) then
               error = 1
  
positive.code:         ! type(lt_options_type), intent(inout) :: options
          integer :: error
          error=0
          
          if (.not.file_exists(filename)) then
              error = 3
              return
          endif
          if (.not.dims_match(filename, dims)) then
              error = 2
              return
          endif
          
          ! this is the slow part where we actually read in all the data
          call io_read(filename,"uLUT",uLUT)
          call io_read(filename,"vLUT",vLUT)
  
          ! next read in the parameter values and test them against the input parameters
          ! if the file and input parameters do not match, adjust the input parameter to match
          error = check_attribute(filename, options%dirmax, "dirmax")
          error = check_attribute(filename, options%dirmin, "dirmin")
          error = check_attribute(filename, options%spdmax, "spdmax")
          error = check_attribute(filename, options%spdmin, "spdmin")
          error = check_attribute(filename, options%nsqmax, "nsqmax")
          error = check_attribute(filename, options%nsqmin, "nsqmin")
          error = check_attribute(filename, options%n_dir_values, "n_dir_values")
          error = check_attribute(filename, options%n_nsq_values, "n_nsq_values")
          error = check_attribute(filename, options%n_spd_values, "n_spd_values")
          
          ! return error
      end function read_LUT
  
  
negative.code: !>----------------------------------------------------------
  !!  Handle reading and writing Linear wind Look up tables to/from disk
  !!
  !!  Look up tables are written from disk in a documented netCDF file (e.g. with all LUT options)
  !!  When a LUT is read from disk, the options stored in that file are checked against the options
  !!  specified for the current run. If they are compatible (x, y, and z shape) the LUT will be read
  !!  If the options for the current run are not the same as those in the file, a warning is printed
  !!  but and an error will be thrown, the model will continue, it will just use the options
  !!  stored in the file so the LUT does not need to be regenerated.
  !!
  !!  @author
  !!  Ethan Gutmann (gutmann@ucar.edu)
  !!
  !!----------------------------------------------------------
  module linear_theory_lut_disk_io
  
      use data_structures
      use string,         only: str
      use netcdf
      use io_routines,    only: file_exists, io_read, check, io_read_attribute, io_add_attribute, io_maxDims, io_getdims
      implicit none
  
      private
      public :: read_lut
      public :: write_lut
  
      character(len=10), parameter :: lt_lut_version="0.9"
  
      interface check_attribute
          module procedure check_attribute_r,check_attribute_i,check_attribute_c
      end interface check_attribute
  
  contains
      !>----------------------------------------------------------
      !!  Write linear wind look up tables to disk along with the parameters for that table
      !!
      !!  @detail
      !!  Takes a filename, the LUTs, and the options structure that defines the LUT parameters
      !!  A file is created with appropriate dimension names and attributes, along with variables
      !!  for each of the relevant.
      !!
      !!  @sideeffect
      !!  If the parameters do not match the parameters in the LUT file, the parameters structure is updated to match
      !!
      !!  @param filename Name of LUT file to write
      !!  @param uLUT     Array to hold u wind look up table
      !!  @param vLUT     Array to hold v wind look up table
  