-
Notifications
You must be signed in to change notification settings - Fork 19
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
NaN values of attributes get converted to 0.0 when passed through opendap #420
Comments
Can you provide a link to the original file? |
Here's a link to a file with attributes being NaN |
Is there anything I can do to help get this done? |
Hello! I've tried to fix this on my own but I failed to correctly build the BES service, I had a number of problems with finding correct versions of dependency libraries. Is it possible to share the |
@samoylovfp We are working on this issue in our sprint beginning today. If you are still wishing to build the server you might want to review this set of instructions: https://docs.opendap.org/index.php?title=Hyrax_GitHub_Source_Build Which will explain how to deal with the |
@samoylovfp |
@sawer297 thanks! If you have a branch we can build from we could hopefully do some testing with our data as well. |
@larstiq @samoylovfp |
The issue is fixed in Hyrax 1.16.3, thanks a lot! |
I have a .nc file with a variable with an attribute
missing_value = NaNf
. When I download this file from opendap in netcdf3 or netcdf4 format I getmissing_value = 0.0f
in the resulting file.I expect to get the same
NaNf
as in the original fileHere's a script to reproduce the issue (requires bash, docker, wget and ncdump)
https://gist.github.com/samoylovfp/ba1df8ef41f27c44ddeed9f2d4076fc9
I suspect that
istringstream
is the culprit in these placeshttps://github.com/OPENDAP/bes/blob/6724e44/modules/fileout_netcdf/FONcAttributes.cc#L389
https://github.com/OPENDAP/bes/blob/6724e44/modules/fileout_netcdf/FONcAttributes.cc#L1030
Because it cannot parse NaN:
https://ideone.com/bhTntI
https://stackoverflow.com/questions/11420263/is-it-possible-to-read-infinity-or-nan-values-using-input-streams
The text was updated successfully, but these errors were encountered: