Closed julian1 closed 8 years ago
Fixed in develop branch. EDAL was ordering the files by the values of their time axes, but was reading the time values as longs. When these were all on the same day, no reordering was applied. Fixed by reading time values as floats
I don't quite understand this - aren't the longs accurate to millisecond precision?
We read the time values directly from the NetCDF file, so the precision is whatever the units of the time axis are. In Julian's example, the units were "days since...", the values were stored as floats, and all of the files were on the same day.
Oh I see. Can we just automatically convert the axis to java Date objects (I think this is what is done by a CDM API method)?
Really I think it's bad practice to use non-integer values for the time values - instead, data providers should probably use a smaller time unit, like seconds. But perhaps it was unavoidable in this case.
I've not found an automatic method to convert the values to Date objects (or similar), but it's not really necessary - this only applies to sorting out which order files should appear in in the NcML aggregation. Since we're using "joinExisting" they all need to have the same units anyway (as far as I can tell).
Hi. Everything is ok when we used NCWMS 1.1. Nonetheless, we have been experimenting with the new version of ncwms and testing it against our current configuration and data and I see the following error (We tried both code from master branch and develop branch)
Error report
Stack trace:
java.lang.IllegalArgumentException :Coordinate values must increase or decrease monotonically
uk.ac.rdg.resc.edal.grid.AbstractIrregularAxis.checkAscending(AbstractIrregularAxis.java:113)
uk.ac.rdg.resc.edal.grid.AbstractIrregularAxis.init(AbstractIrregularAxis.java:102)
uk.ac.rdg.resc.edal.grid.AbstractIrregularAxis.
I tried to use the @guygriffiths solution by reading time values as floats . I applied to function getDataset of the file NetcdfDatasetAggregator.java of current developer branch as belows:
//Collections.sort(times); // We made comment to this function and try to reading time values as floats.
final String aggDimName = timeDimName;
Collections.sort(files, new Comparator
}
}
});
Please help us to fix this issue. We appriciate your help.
Have you got any test data you can give us to reproduce this error?
We have found that this is our data error. Thanks.
Hello everyone. We are experimenting this very same error right now, with NcWMS v2.0.4. We will troubleshoot our datasets, but any guidance is appreciated!
@tomLandry - Is this when aggregating multiple files into a single dataset? Do you have any data you could share so that I can reproduce the error?
Thanks for the lightning quick answer! We are simultaneously trying to upgrade of NcWMS version from 2.02 to latest, and massaging data. I'll see if we can send you a sample that is breaking the thing.
Hi, I just downloaded the latest ncWMS server (2.4.1)...just ran it with java to test it. All ECMWF files I try get this error (java.lang.IllegalArgumentException: Coordinate values must increase or decrease monotonically). These files load up into geoserver with no problem. However, geoserver has a bug in rendering wind vectors or barbs at global scale with wrapx so I cant use it. Is there something I need to configure to get ncWMS to work with the ECMWF files out of the box? Or some transform to get them to work? I can certainly post a file but they are 150MB in size.
Hi. We have been experimenting with the new version of ncwms and testing it against our current configuration and data. We noticed the following issue, which affects the many of our datasets.
With a dataset config path,
We get the following exception,
Putting a trace in AbstractIrregularAxis.checkAscending() shows the time data is not ordered,
In fact, the order appears to be arbitrary and matches whatever was returned by the underlying jni filesystem api.
I believe the correct (ncwms v1) behavior would be to open each netcdf, record the time scalar, and then sort to construct the ordered axis of values.
Attempting a fix by sorting the values in place in AbstractIrregularAxis, does get rid of the exception.
However, I don't think this solution is valid, since the local ordering in AbstractIrregularAxis will be inconsistent with other parts of the dataset catalogue.