Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure temp files are removed #306

Closed
wants to merge 1 commit into from

Conversation

emfdavid
Copy link

Change temp file behavior to ensure files are unlinked (removed).
Related to #283

@FussyDuck
Copy link

FussyDuck commented Jul 19, 2022

CLA assistant check
All committers have signed the CLA.

@iainrussell
Copy link
Member

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

@emfdavid
Copy link
Author

Closing per discussion in #283

@emfdavid emfdavid closed this Jul 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants