trying to clean up some possible problems if there is an error on an inv dataset in the cache generation, TODO: stating using with
making changes to allow for non-time varying grids, issue #86