Closed emfdavid closed 2 years ago
Hi @emfdavid,
Many thanks for taking an interest in cfgrib and for contributing a change!
But in fact these files are not temporary, they are index files that persist on the filesystem in order to avoid potentially expensive re-scanning of a GRIB file each time it is opened.
However, you can suppress their creation completely by passing the indexpath argument to cfgrib like this:
xr.open_dataset('era5-levels-members.grib', engine='cfgrib', backend_kwargs={'indexpath':''})
Best regards, Iain
Closing per discussion in https://github.com/ecmwf/cfgrib/issues/283
Change temp file behavior to ensure files are unlinked (removed). Related to https://github.com/ecmwf/cfgrib/issues/283