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

Added initial code for local index definition of grib files. #512

Closed
wants to merge 2 commits into from

Conversation

Anu-Ra-g
Copy link
Contributor

@Anu-Ra-g Anu-Ra-g commented Sep 28, 2024

This is thed demo for an initial version of the local grib index file defintions. The code still needs more update. Below is the output created in a .idx file

1:0:d=2023092800:V:6 hour fcst
2:955132:d=2023092800:ABSV:6 hour fcst
3:1898414:d=2023092800:CLWMR:6 hour fcst
4:2243950:d=2023092800:ICMR:6 hour fcst
5:2519285:d=2023092800:RWMR:6 hour fcst
6:2800049:d=2023092800:SNMR:6 hour fcst
7:2922175:d=2023092800:GRLE:6 hour fcst
8:2995158:d=2023092800:O3MR:6 hour fcst
...

Copy link
Member

@martindurant martindurant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no idea of course if the code is right (and there are no tests yet); but what is the use-case for this? If we scan the file, we already know the full information as encoded in the kerchunk references, so why would we want to make an .idx too?

@@ -112,6 +114,7 @@ def scan_grib(
inline_threshold=100,
skip=0,
filter={},
idx=False,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pass a filename or maybe open file?
Dumping a load of files into the local directory doesn't seem like a great idea.

@Anu-Ra-g
Copy link
Contributor Author

Anu-Ra-g commented Oct 2, 2024

I thought local definitions of .idx for the grib files might be a good idea. This was just for demo purpose.

@martindurant
Copy link
Member

This was just for demo purpose.

That's fine, but please update the PR description or title to say so.

@Anu-Ra-g Anu-Ra-g closed this Oct 4, 2024
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.

2 participants