-
Notifications
You must be signed in to change notification settings - Fork 80
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
To read run length compressed data #72
To read run length compressed data #72
Conversation
Thank you |
@shahramn I did. I'm not sure why it doesn't show. |
Figured it out. Noyori-san was sill an author, so I edited the history to list only myself. |
Dear @jfsimoneau First of all I took one of the files in the data set from PR#70 I extracted the first message in via
Running wgrib2 -stats prints:
whereas ecCodes does:
So the minimum is incorrect. The maximum however is correct. Also wgrib2 says there are 6259785 undefined (missing) values but as far as I can see there is no bitmap in this file so I cannot work out why wgrib2 prints that |
Thank you for the comments. I will look into that. I noticed the -1e+100 values too. I'll take a look at the source and the standard to make sure it fits. |
Ok, the code in this PR converts the invalid values to |
One other thing: template.4.50008.def in our definitions as that is a local product definition number. We can use it just for testing that GRIB data from Japan. Q. Do you know if there is some other data which uses Run Length Packing but not a local section 4? |
I don't know of any, unfortunately. I can always try to generate one, but I'm not an expert on the matter. Q. right back at you: If I were to need the template.4.50008.def file locally, how would I install it so ecCodes would be able to use it? |
Dear @jfsimoneau
Now the tools like grib_ls, grib_dump should work |
Thank you for your answers @shahramn! All in all, I think we can simply drop the template.4.50008.def file from this PR since we will pick it up on our side. For the minimum value of -1e100, I don't think it's wrong, since wgrib2 was not right by saying it was a value of 0. It is an invalid (missing) value encoded inside the RLE stream. I have not found a way to tell ecCodes the value is missing without a bitmap. Is there anything else I can do to help? |
I would like to get the same answers as wgrib2. Even if you think they're doing the 'wrong' thing. |
Very well, will do! |
Made new PR: #73 |
This is a rework of Tatsuya Noyori's PR #70. With his authorization, I am submitting it here without the public domain requirements after testing on real JMA data.