question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Opening a grib file leaves a .idx in the directory

See original GitHub issue

What is your issue?

I don’t remember this being an issue before, but when I open a .grib2 file a .idx file remains in the directory when the script is finished running. I’m using:

with xr.open_dataset(filepath) as ds:
    ...

I’m using xarray version 0.19.0 on python version 3.8.13

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
alexamicicommented, Apr 26, 2022

Should we by default use a temp file? or is there some benefit to retaining the index file locally? (asking as someone with very little context

Opening the a GRIB for the first time requires reading the whole file and saving the index to disk makes all subsequent open much faster. I took the decision to default to writing, but IMO the real issue is that it is not well documented how to switch it off 😅

0reactions
max-sixtycommented, Apr 26, 2022

Cool, if you think we should document it better (or write to a temp file by default, less surprising perhaps?), then that’s great, let’s add the issue; it doesn’t have to be you who implements.

Read more comments on GitHub >

github_iconTop Results From Across the Web

grib2 idx files - dealing with bands with identical byte ranges
This data is downloaded from NCEP using HTTP random access based on the byte ranges specified in the index file for each grib...
Read more >
xarray read remote grib file on s3 using cfgrib - Stack Overflow
Think I got it via https://filesystem-spec.readthedocs.io/en/latest/features.html#caching-files-locally import fsspec import xarray as xr ...
Read more >
How do I open GRIB files in R? - Quora
Now, All you have to do is set the working directory to the one where your GRIB file is located, and then use...
Read more >
Handling GRIB in GrADS - COLA/GMU
The next step is to create a descriptor file which describes the complete grid and the list of variables. The final step is...
Read more >
Grib Weather [OpenCPN Manuals]
Open File Activates the operating systems standard file selector dialog to select a grib file. The plugin remembers the directory of this grib....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found