anchor.diff:  
       !>----------------------------------------------------------
       !!  Setup a new variable to be written
  -    !! 
  +    !!
       !!  @detail
       !!  Takes an open netCDF file id, variable name, dimension ids, and dimension lengths.
  -    !!  If the variable doesn't exist it is created with the matching dimension ids. 
  -    !!  These dimension lengths are then checked against the dimension lengths supplied. 
  +    !!  If the variable doesn't exist it is created with the matching dimension ids.
  +    !!  These dimension lengths are then checked against the dimension lengths supplied.
       !!  This check is performed in case a variable with this name but different dims already
  -    !!  existed in the file. 
  +    !!  existed in the file.
       !!  Supplied netCDF if must be a file that is in define mode
  -    !! 
  +    !!
       !!  @param      ncid    integer open netcdf file id
       !!  @param      varname name of the variable to be created
       !!  @param[out] varid   id of the existing or newly created variable
  
positive.code:         error = error + check_attribute(filename, options%n_dir_values, "n_dir_values")
          error = error + check_attribute(filename, options%n_nsq_values, "n_nsq_values")
          error = error + check_attribute(filename, options%n_spd_values, "n_spd_values")
          
          ! check that the model levels are actually in the same vertical positions too. 
          error = error + check_dz(filename,dz)
          
          if (error/=0) return
  
          ! this is the slow part where we actually read in all the data
  
negative.code: 
          ! first check for an existing dimension with the given name
          ncerror = NF90_INQ_DIMID(ncid, dimname, dimid)
          ! if the dimension does not exist, create it here.
          if (ncerror/=NF90_NOERR) then
              call check( nf90_def_dim(ncid, dimname, n, dimid), "setup_dim:Creating dim:"//dimname )
          else
              ! else, check to make sure the existing dimension has the correct length
              call check( nf90_inquire_dimension(ncid, dimid, len = dim_length), "setup_dim:Reading dim:"//dimname)
  
              if (dim_length/=n) then
                  error = 1
                  write(*,*) "Dim setup error: ", dimname, dimid, dim_length,"!=",n
  