Skip to content

Fix issue with grid_second_order hanging when encoding fields with Infinite values #248

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

Conversation

pmarguinaud
Copy link
Contributor

Enabling grid_second_order encoding does not fail when the field to encode contains Infinite values. Instead, it never terminates.

This PR :

  • adds a test to highlight the problem
  • adds a test in grib_scaling.cc to fix the issue; make the program abort when infinite (or nan) values are encountered

@pmarguinaud
Copy link
Contributor Author

Apparently, you added the test case yourself to develop. I just had to add it in "examples/F90/CMakeLists.txt".

Is that correct ?

@shahramn
Copy link
Collaborator

shahramn commented Oct 4, 2024

Dear @pmarguinaud
I had to merge all your changes manually to our "develop" branch. The other PR had too many conflicts.
Please take a look at the latest develop to double-check.
By the way there was another bug which I fixed: The error argument to the call
grib_get_binary_scale_fact()
was not being checked by its callers.

Many thanks

@shahramn shahramn closed this Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants