anchor.diff:              if (vmin < less_than) then
                   write(*,*) trim(msg)
                   write(*,*) trim(name)//" is less than "//trim(str(less_than))//" : "//trim(str(vmin))
  -                
  +
  +                block
  +                    integer :: i,j,k,nx,ny,nz
  +
  +                    nx = size(var,1)
  +                    nz = size(var,2)
  +                    ny = size(var,3)
  +                    do j=lbound(var,3),ubound(var,3)
  +                        do k=lbound(var,2),ubound(var,2)
  +                            do i=lbound(var,1),ubound(var,1)
  +                                if (var(i,k,j) < less_than) then
  +                                    print*, "First Error was in grid cell:", i,k,j, var(i,k,j)
  +                                    error stop
  +                                endif
  +                            enddo
  +                        enddo
  +                    enddo
  +                end block
  +
                   if (present(fix)) then
                       if (fix) then
                           write(*,*) "Fixing..."
  
positive.code:         if (present(less_than)) then
              where(var < less_than) var = less_than
          endif
          
      end subroutine fix_var
  
      
  end module debug_module
  
negative.code:                 endif
              endif
          endif
  
      end subroutine check_var
  
      ! subroutine domain_fix(domain)
      !     implicit none
      !     type(domain_t),  intent(inout)   :: domain
      !
      !     call fix_var(domain%th,     less_than    =100.0)
      !     call fix_var(domain%th,     greater_than =600.0)
      !     call fix_var(domain%qv,     less_than    =0.0)
      !     call fix_var(domain%cloud,  less_than    =0.0)
      !     call fix_var(domain%ice,    less_than    =0.0)
      !     call fix_var(domain%nice,   less_than    =0.0)
      !     call fix_var(domain%qsnow,  less_than    =0.0)
      !     call fix_var(domain%nsnow,  less_than    =0.0)
      !     call fix_var(domain%qrain,  less_than    =0.0)
      !     call fix_var(domain%nrain,  less_than    =0.0)
      !     call fix_var(domain%qgrau,  less_than    =0.0)
      !     call fix_var(domain%ngraupel,less_than   =0.0)
      !
      ! end subroutine domain_fix
  
      subroutine fix_var(var, greater_than, less_than)
          implicit none
          real,               intent(inout), dimension(:,:,:), allocatable :: var
          real,               intent(in),    optional         :: greater_than, less_than
  
          if (.not.allocated(var)) then
              return
          endif
  
          if (present(greater_than)) then
              where(var > greater_than) var = greater_than
          endif
  