cache_invalidate Subroutine

public subroutine cache_invalidate()

Drop every cached band, on file load or axis rebuild.

Arguments

None

Source Code

   subroutine cache_invalidate()
      !! Drop every cached band, on file load or axis rebuild.
      integer(int32) :: t, l
      do t = 1, NCONVTYPES
         call bandset_clear(conv_bands(t))
         call chainset_clear(conv_chains(t))
      end do
      conv_valid = .false.
      do l = 0, 2
         if (allocated(ecache(l)%gain)) deallocate (ecache(l)%gain)
         if (allocated(ecache(l)%loss)) deallocate (ecache(l)%loss)
         ecache(l)%gmax = 0; ecache(l)%lmax = 0
         ecache(l)%valid = .false.
      end do
      ! field band caches are view-dependent (mass/radius interfaces), so
      ! drop and re-size them to the current registry on every invalidation
      if (allocated(fcache)) deallocate (fcache)
      if (nfields > 0) allocate (fcache(2, nfields))
   end subroutine cache_invalidate