Comments (6)
Actually
NetcdfFile njfile = NetcdfFiles.open (filePathStr);
NetccdfDataset njdataset = NetcdfDatasets.enhance (njfile, ENHANCEMENT, null);
where ENHANCEMENT
is the default enhancement plus allowing for an "incomplete" coordinate system.
If you're wondering why I acquire the dataset in two steps, it's actually because there's also a step where I acquire an unenhanced version in order to see the original CDL description.
from netcdf-java.
@haileyajohnson, I thought about trying to hack up a test of modifying ConvertMissing
to allow for specifying a more flexible relative difference in its fuzzy-equals test. But I took a second look at how many parameters there already are in the constructor and said, "Nah."
from netcdf-java.
@rschmunk just to clarify, the place where Panoply is getting incorrect data is from a call to NetcdfDatasets.openDataset(filename)
with enhanced=all?
from netcdf-java.
@haileyajohnson, I tracked this down, and it has to do with the changes made to the ConvertMissing
filter on January 12. I'm not sure which commit in particular was the coup de grace, as there were about 6 of them that day.
TL;DR - the unpacked data values from the sample dataset are all much smaller than Misc.defaultMaxRelativeDiffFloat
.
Long version...
As noted above, the scale and offset values in the sample dataset are really small. Tiny even. The scale factor is of order 1E-12 and the offset of order 1E-7, and after unpacking, the output data results are of order 1E-8.
The dataset also specifies that the _FillValue
is the same as the missing_value
. Unpacked, the fill/missing value is ~ 0 (actually, also of order 1E-12).
The problem then is that ConvertMissing.isMissing
receives an unpacked data value, checks if it is less than Misc.defaultMaxRelativeDiffFloat
away from the unpacked fill value. Since that default difference is of order 1E-5, then of course the method is returning true. Every value in the array is being deemed invalid and the convert
method sends back NaN for the entire array.
So it seems like a smaller difference value needs to be used in the test when dealing with such tiny scale factors and offsets.
from netcdf-java.
Thanks for tracking that down! We did change the fuzzyequals comparison to use a relative diff instead of absolute diff, and that's what broke this case - I'm planning on reverting that change. But another issue I think is that we need to do the missing and fill value comparisons with unpacked data, so that the fuzyequals implementation doesn't matter. I should have a fix up shortly. Thanks for all your help!
from netcdf-java.
I downloaded a fresh snapshot and built it into Panoply. It plots the sample data as expected, so it looks like #1315 was what was needed.
from netcdf-java.
Related Issues (20)
- NoSuchMethodError for NetCDF Builder [VERSION]: 5.5.3 HOT 1
- Fix S3 NcML datasets
- DAP4: Session and Request Header Support for netcdf-java HOT 2
- [VERSION]: 5.5.2 Exception thrown when accessing char data from NetcdfDatasets.openNcmlDataset
- Exception when opening twoD grib collection as a coverage
- Missing GRIB-1 time range indicators HOT 6
- netcdfAll-5.5.3.jar Unable to release handle after reading file HOT 1
- Build failed due to `gretty:2.0.1` HOT 3
- Some NetCDF data cannot be read by `ucar.nc2.dataset.NetcdfDataset` HOT 7
- DOC: Oudated link to ncml XSD in NCML documentation HOT 1
- Unlimited dimension cannot work without a specified length HOT 3
- Lambert conformal projection does not respect units of the false northing/easting
- BUFR delayed replication descriptor HOT 4
- cdm-radial: Parsing issues with radar files from IDEAM Colombia HOT 4
- Contributors guide says to branch off of `develop`, which appears not to exist
- Grib2 reader issue for data using second order packing and a bitmap section HOT 2
- Problems opening Zipped datasets HOT 3
- Broken link on https://www.unidata.ucar.edu/blogs/news/entry/netcdf-java-version-5-51 webpage HOT 1
- Fix order of Enhancements to use packed fillValues for comparisons to packed data HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from netcdf-java.