double[] bounds2 = getBound2(); int n = bounds1.length;
double[] bounds2 = getBound2(); int n = bounds1.length;
private void showCoords(CoordinateAxis axis, Formatter f) { try { if (axis instanceof CoordinateAxis1D && axis.isNumeric()) { CoordinateAxis1D axis1D = (CoordinateAxis1D) axis; if (!axis1D.isInterval()) { double[] e = axis1D.getCoordEdges(); for (double anE : e) { f.format("%f,", anE); } } else { double[] b1 = axis1D.getBound1(); double[] b2 = axis1D.getBound2(); for (int i = 0; i < b1.length; i++) { f.format("(%f,%f) = %f%n", b1[i], b2[i], b2[i] - b1[i]); } } } else { f.format("%s", NCdumpW.printVariableData(axis, null)); } } catch (IOException ioe) { f.format(ioe.getMessage()); } f.format(" %s%n", axis.getUnitsString()); }
private void showCoords(CoordinateAxis axis, Formatter f) { try { if (axis instanceof CoordinateAxis1D && axis.isNumeric()) { CoordinateAxis1D axis1D = (CoordinateAxis1D) axis; if (!axis1D.isInterval()) { double[] e = axis1D.getCoordEdges(); for (double anE : e) { f.format("%f,", anE); } } else { double[] b1 = axis1D.getBound1(); double[] b2 = axis1D.getBound2(); for (int i=0; i<b1.length; i++) { f.format("(%f,%f) = %f%n", b1[i], b2[i], b2[i] - b1[i]); } } } else { f.format("%s", NCdumpW.printVariableData(axis, null)); } } catch (IOException ioe) { f.format(ioe.getMessage()); } f.format(" %s%n", axis.getUnitsString()); }
private void showCoords(CoordinateAxis axis, Formatter f) { try { if (axis instanceof CoordinateAxis1D && axis.isNumeric()) { CoordinateAxis1D axis1D = (CoordinateAxis1D) axis; if (!axis1D.isInterval()) { double[] e = axis1D.getCoordEdges(); for (double anE : e) { f.format("%f,", anE); } } else { double[] b1 = axis1D.getBound1(); double[] b2 = axis1D.getBound2(); for (int i=0; i<b1.length; i++) { f.format("(%f,%f) = %f%n", b1[i], b2[i], b2[i] - b1[i]); } } } else { f.format("%s", NCdumpW.printVariableData(axis, null)); } } catch (IOException ioe) { f.format(ioe.getMessage()); } f.format(" %s%n", axis.getUnitsString()); }
private void showCoords(CoordinateAxis axis, Formatter f) { try { if (axis instanceof CoordinateAxis1D && axis.isNumeric()) { CoordinateAxis1D axis1D = (CoordinateAxis1D) axis; if (!axis1D.isInterval()) { double[] e = axis1D.getCoordEdges(); for (double anE : e) { f.format("%f,", anE); } } else { double[] b1 = axis1D.getBound1(); double[] b2 = axis1D.getBound2(); for (int i=0; i<b1.length; i++) { f.format("(%f,%f) = %f%n", b1[i], b2[i], b2[i] - b1[i]); } } } else { f.format("%s", NCdumpW.printVariableData(axis, null)); } } catch (IOException ioe) { f.format(ioe.getMessage()); } f.format(" %s%n", axis.getUnitsString()); }
VertCoord(CoordinateAxis1D axis) { this.axis = axis; this.name = axis.getFullName(); this.units = axis.getUnitsString(); int n = (int) axis.getSize(); if (axis.isInterval()) { values1 = axis.getBound1(); values2 = axis.getBound2(); } else { values1 = new double[n]; for (int i = 0; i < axis.getSize(); i++) values1[i] = axis.getCoordValue(i); } }
VertCoord(CoordinateAxis1D axis) { // this.axis = axis; this.name = axis.getFullName(); this.units = axis.getUnitsString(); int n = (int) axis.getSize(); if (axis.isInterval()) { values1 = axis.getBound1(); values2 = axis.getBound2(); } else { values1 = new double[n]; for (int i = 0; i < axis.getSize(); i++) values1[i] = axis.getCoordValue(i); } }
VertCoord(CoordinateAxis1D axis) { // this.axis = axis; this.name = axis.getFullName(); this.units = axis.getUnitsString(); int n = (int) axis.getSize(); if (axis.isInterval()) { values1 = axis.getBound1(); values2 = axis.getBound2(); } else { values1 = new double[n]; for (int i = 0; i < axis.getSize(); i++) values1[i] = axis.getCoordValue(i); } }
VertCoord(CoordinateAxis1D axis) { // this.axis = axis; this.name = axis.getFullName(); this.units = axis.getUnitsString(); int n = (int) axis.getSize(); if (axis.isInterval()) { values1 = axis.getBound1(); values2 = axis.getBound2(); } else { values1 = new double[n]; for (int i = 0; i < axis.getSize(); i++) values1[i] = axis.getCoordValue(i); } }
double[] bounds2 = getBound2(); int n = bounds1.length;
/** * Copy constructor * @param ncd ok to reparent * @param org copy from here */ CoordinateAxis1D(NetcdfDataset ncd, CoordinateAxis1D org) { super(ncd, org); this.orgName = org.orgName; this.cache = new Variable.Cache(); // decouple cache org.setCaching(true); // copy rest of state this.increment = org.getIncrement(); this.isAscending = org.isAscending; this.isInterval = org.isInterval(); this.isRegular = org.isRegular(); this.coords = org.getCoordValues(); this.edge = org.getCoordEdges(); this.names = org.names; if (isInterval) { this.bound1 = org.getBound1(); this.bound2 = org.getBound2(); } this.wasBoundsDone = org.wasBoundsDone; this.wasCalcRegular = org.wasCalcRegular; this.wasRead = org.wasRead; }
System.out.printf("%s bounded=%s", varName, bounded); double[] bound1 = axis1D.getBound1(); double[] bound2 = axis1D.getBound2(); for (int i = 0; i < axis1D.getSize(); i++) System.out.printf("(%f,%f) ", bound1[i], bound2[i]);
/** * Copy constructor * * @param ncd ok to reparent * @param org copy from here */ CoordinateAxis1D(NetcdfDataset ncd, CoordinateAxis1D org) { super(ncd, org); this.orgName = org.orgName; this.cache = new Variable.Cache(); // decouple cache org.setCaching(true); // copy rest of state this.increment = org.getIncrement(); this.isAscending = org.isAscending; this.isInterval = org.isInterval(); this.isRegular = org.isRegular(); if (isNumeric()) { this.coords = org.getCoordValues(); this.edge = org.getCoordEdges(); } this.names = org.names; if (isInterval) { this.bound1 = org.getBound1(); this.bound2 = org.getBound2(); } this.wasBoundsDone = org.wasBoundsDone; this.wasCalcRegular = org.wasCalcRegular; this.wasRead = org.wasRead; }
double[] result = new double[2 * n]; double[] bounds1 = axis1D.getBound1(); double[] bounds2 = axis1D.getBound2(); int count = 0; for (int i = 0; i < n; i++) {
showArray(f, axis1.getBound1()); f.format("%n bounds2="); showArray(f, axis1.getBound2()); System.out.printf("%s%n", f);
values = new double[2 * ncoords]; double[] bounds1 = axis1D.getBound1(); double[] bounds2 = axis1D.getBound2(); int count = 0; for (int i = 0; i < ncoords; i++) {