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

Fix grib collection NaNs bug #1313

Merged
merged 1 commit into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ public CoverageCoordAxisBuilder setDependsOn(String dependsOn) {
// for point: values are the points, values[npts]
// for intervals: values are the edges, values[2*npts]: low0, high0, low1, high1

public void setMissingTolerance(double tolerance) {
missingTolerance = tolerance;
}

public void setSpacingFromValues(boolean isInterval) {
if (isInterval) {
setSpacingFromIntervalValues();
Expand Down Expand Up @@ -227,7 +231,7 @@ private void setSpacingFromIntervalValues() {
}
}

private static final double missingTolerance = .05;
private double missingTolerance = .05;

private boolean isRegular(Counters.Counter resol) {
if (resol.getUnique() == 1) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -852,6 +852,7 @@ private CoverageCoordAxis makeRuntimeAuxCoord(CoordinateTimeAbstract time) {
CoverageCoordAxisBuilder builder =
new CoverageCoordAxisBuilder(refName, master.getUnit(), Grib.GRIB_RUNTIME, DataType.DOUBLE, AxisType.RunTime,
atts, CoverageCoordAxis.DependenceType.dependent, time.getName(), null, length, 0, 0, 0, data, this);
builder.setMissingTolerance(0.0);
builder.setSpacingFromValues(false);

return new CoverageCoordAxis1D(builder);
Expand Down
Loading