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

Grib1Reader ReadRecordRawData only returning 0 values #9

Closed
da-br opened this issue Nov 23, 2023 · 2 comments · Fixed by #10
Closed

Grib1Reader ReadRecordRawData only returning 0 values #9

da-br opened this issue Nov 23, 2023 · 2 comments · Fixed by #10

Comments

@da-br
Copy link
Contributor

da-br commented Nov 23, 2023

Hello again 😄 ,

Let me preface this by saying I am new to Grib files in general.


When calling ReadRecordRawData on a grib1 file I only retrieve values = 0. I have worked my way through the library code a little and can see Brib1BinaryDataSection.isConstant = true which means the number of bits per value is 0 and therefore returning the refValue (0 in this case)

I can use the grib1 file in the test folder which does return values. I assume it must be the files I am using

When opening the file in Panoply some of the values are displayed as NaN. Not sure if this will have any affect.

image

I am not sure I can attach the file being used, I will find out and attach it if I can.

Any help would be appreciated.


Latest version of NGrib
Windows
DotNet 472

@nmangue
Copy link
Owner

nmangue commented Nov 23, 2023

Hello !

It could be a bug or an unsupported format. Data can be serialized in many different way in a grib file.
To be able to help you, I need access to the file. If you can't post it publicly, you could directly send it to me.

@da-br
Copy link
Contributor Author

da-br commented Nov 24, 2023

After a bit of digging again, I have answered my own question.

There was a BMS section in the file that was being skipped. I have added support for this in the linked PR. However, I do not know if this was done for a specific reason.

Thanks 😀

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 a pull request may close this issue.

2 participants