return new ArrayFloat.D3(dimensions[0], dimensions[1], dimensions[2]); } else if (varDataType == DataType.DOUBLE) { return new ArrayDouble.D3(dimensions[0], dimensions[1], dimensions[2]); } else if (varDataType == DataType.BYTE) { return new ArrayByte.D3(dimensions[0], dimensions[1], dimensions[2]);
ArrayDouble.D3 bounds = axis2D.getCoordBoundsArray(); if (bounds == null) throw new IllegalStateException("No bounds array"); int[] shape = bounds.getShape(); int count = 0; values = new double[ncoords + 1]; for (int i = 0; i < shape[0]; i++) { for (int j = 0; j < shape[1]; j++) { values[count++] = bounds.get(i, j, 0); values[count] = bounds.get(shape[0] - 1, shape[1] - 1, 1); // last edge ArrayDouble.D3 bounds = axis2D.getCoordBoundsArray(); if (bounds == null) throw new IllegalStateException("No bounds array"); int[] shape = bounds.getShape(); int count = 0; values = new double[2 * ncoords]; for (int i = 0; i < shape[0]; i++) { for (int j = 0; j < shape[1]; j++) { values[count++] = bounds.get(i, j, 0); values[count++] = bounds.get(i, j, 1);
int[] shape = array.getShape(); int[] newShape = new int[3]; System.arraycopy(shape, 0, newShape, 0, 3); int nj = newShape[1]; int nk = newShape[2]; ArrayDouble.D3 newArray = new ArrayDouble.D3(ni, nj, nk); origin[1] = j; origin[2] = k; IndexIterator it = array.section(origin, eshape).getIndexIterator(); for (int l = 0; l < n; l++) { newArray.section(origin, neweshape).getIndexIterator(); for (int l = 0; l < n + 1; l++) {
assert (tValues instanceof ArrayDouble.D3); ArrayDouble.D3 Ta = (ArrayDouble.D3) tValues; Assert2.assertNearlyEquals(Ta.get(0, 0, 0), 1.0f); Assert2.assertNearlyEquals(Ta.get(1, 1, 1), 10.0f); assert (tValues instanceof ArrayDouble.D3); Ta = (ArrayDouble.D3) tValues; Assert2.assertNearlyEquals(Ta.get(0, 0, 0), 1.0f); Assert2.assertNearlyEquals(Ta.get(1, 1, 1), 10.0f);
ArrayDouble A = new ArrayDouble.D3(1, latDim.getLength(), lonDim.getLength() / 2); int i, j; Index ima = A.getIndex();
int[] shape = array.getShape(); int[] newShape = new int[3]; for (int i = 0; i < 3; i++) { int nj = newShape[1]; int nk = newShape[2]; ArrayDouble.D3 newArray = new ArrayDouble.D3(ni, nj, nk); origin[1] = j; origin[2] = k; IndexIterator it = array.section(origin, eshape).getIndexIterator(); for (int l = 0; l < n; l++) { newArray.section(origin, neweshape).getIndexIterator(); for (int l = 0; l < n + 1; l++) {
assert (tValues instanceof ArrayDouble.D3); ArrayDouble.D3 Ta = (ArrayDouble.D3) tValues; Assert2.assertNearlyEquals(Ta.get(0, 0, 0), 1.0f); Assert2.assertNearlyEquals(Ta.get(1, 1, 1), 10.0f); assert (tValues instanceof ArrayDouble.D3); Ta = (ArrayDouble.D3) tValues; Assert2.assertNearlyEquals(Ta.get(0, 0, 0), 1.0f); Assert2.assertNearlyEquals(Ta.get(1, 1, 1), 10.0f);
ucar.ma2.ArrayDouble.D3 coordVals = vt.getCoordinateArray(i); assert (null != coordVals); Section cSection = new Section(coordVals.getShape()); if (show) System.out.printf("%s: varSection shape = %s %n", v.getFullName(), varSection); if (show) System.out.printf("%s: coordVal shape = %s %n", v.getFullName(), cSection);
int[] shape = array.getShape(); int[] newShape = new int[3]; System.arraycopy(shape, 0, newShape, 0, 3); int nj = newShape[1]; int nk = newShape[2]; ArrayDouble.D3 newArray = new ArrayDouble.D3(ni, nj, nk); origin[1] = j; origin[2] = k; IndexIterator it = array.section(origin, eshape).getIndexIterator(); for (int l = 0; l < n; l++) { newArray.section(origin, neweshape).getIndexIterator(); for (int l = 0; l < n + 1; l++) {
ArrayDouble data = new ArrayDouble.D3(1, latDim.getLength(), lonDim.getLength()); ArrayInt timeData = new ArrayInt.D1(1 ,false); int[] origin = new int[v.getRank()];
ArrayDouble.D3 tempData = new ArrayDouble.D3(1, latDim.getLength(), lonDim.getLength()); Array timeData = Array.factory(DataType.INT, new int[]{1}); Index ima = rhData.getIndex(); for (int lonIdx = 0; lonIdx < lonDim.getLength(); lonIdx++) { rhData.setInt(ima.set(0, latIdx, lonIdx), timeIdx * latIdx * lonIdx); tempData.set(0, latIdx, lonIdx, timeIdx * latIdx * lonIdx / 3.14159);
ArrayDouble.D3 tempData = new ArrayDouble.D3(1, latDim.getLength(), lonDim.getLength()); Array timeData = Array.factory(DataType.INT, new int[]{1}); for (int lon = 0; lon < lonDim.getLength(); lon++) { rhData.setInt(ima.set(0, lat, lon), time * lat * lon); tempData.set(0, lat, lon, time * lat * lon / 3.14159);
Index depthIndex = depth.getIndex(); ArrayDouble.D3 height = new ArrayDouble.D3(nz, ny, nx); double hterm = Sterm + term3 * term4; height.set(z, y, x, hterm);
Index depthIndex = depth.getIndex(); ArrayDouble.D3 height = new ArrayDouble.D3(nz, ny, nx); double hterm = Sterm + term3 * term4; height.set(z, y, x, hterm);
Index depthIndex = depth.getIndex(); ArrayDouble.D3 height = new ArrayDouble.D3(nz, ny, nx); double hterm = Sterm + term3 * term4; height.set(z, y, x, hterm);
Index depthIndex = depth.getIndex(); ArrayDouble.D3 height = new ArrayDouble.D3(nz, ny, nx); double hterm = term3 + term4; height.set(z, y, x,hterm);
ArrayDouble.D3 press = new ArrayDouble.D3(nz, ny, nx); for (int x = 0; x < nx; x++) { ps = psArray.getDouble(psIndex.set( y, x)); press.set(z, y, x, term1 + bz * ps);
ArrayDouble.D3 press = new ArrayDouble.D3(nz, ny, nx); for (int x = 0; x < nx; x++) { ps = psArray.getDouble(psIndex.set( y, x)); press.set(z, y, x, term1 + bz * ps);
ArrayDouble.D3 press = new ArrayDouble.D3(nz, ny, nx); for (int x = 0; x < nx; x++) { ps = psArray.getDouble(psIndex.set( y, x)); press.set(z, y, x, term1 + bz * ps);