for (int x = 0; x < nx; x++) { ps = psArray.getDouble(psIndex.set( y, x)); press.set(z, y, x, term1 + bz * ps);
for (int x = 0; x < nx; x++) { ps = psArray.getDouble(psIndex.set( y, x)); press.set(z, y, x, term1 + bz * ps);
double hterm = Sterm + term3 * term4; height.set(z, y, x, hterm);
double hterm = Sterm + term3 * term4; height.set(z, y, x,hterm);
double hterm = term3 + term4; height.set(z, y, x,hterm);
double hterm = term3 + term4; height.set(z, y, x,hterm);
double hterm = Sterm + term3 * term4; height.set(z, y, x,hterm);
double hterm = term3 + term4; height.set(z, y, x,hterm);
double depthVal = depth.getDouble(depthIndex.set(y, x)); height.set(z, y, x, etaVal + sigmaVal * (depthVal + etaVal));
for (int x = 0; x < nx; x++) { double orog = orogArray.getDouble(orogIndex.set(y, x)); height.set(z, y, x, az + bz * orog);
for (int x = 0; x < nx; x++) { double orog = orogArray.getDouble(orogIndex.set(y, x)); height.set(z, y, x, az + bz * orog);
for (int x = 0; x < nx; x++) { double orog = orogArray.getDouble(orogIndex.set(y, x)); height.set(z, y, x, az + bz * orog);
double depthVal = depth.getDouble(depthIndex.set(y, x)); height.set(z, y, x, etaVal + sigmaVal * (depthVal + etaVal));
double depthVal = depth.getDouble(depthIndex.set(y, x)); height.set(z, y, x, etaVal + sigmaVal * (depthVal + etaVal));
/** * Get the 3D vertical coordinate array for this time step. * * @param timeIndex the time index. Ignored if !isTimeDependent(). * @return vertical coordinate array * @throws IOException problem reading data * @throws InvalidRangeException _more_ */ public ArrayDouble.D3 getCoordinateArray(int timeIndex) throws IOException, InvalidRangeException { Array ps = readArray(psVar, timeIndex); Index psIndex = ps.getIndex(); int nz = sigma.length; int[] shape2D = ps.getShape(); int ny = shape2D[0]; int nx = shape2D[1]; ArrayDouble.D3 result = new ArrayDouble.D3(nz, ny, nx); for (int y = 0; y < ny; y++) { for (int x = 0; x < nx; x++) { double psVal = ps.getDouble(psIndex.set(y, x)); for (int z = 0; z < nz; z++) { result.set(z, y, x, ptop + sigma[z] * (psVal - ptop)); } } } return result; }
/** * Get the 3D vertical coordinate array for this time step. * * @param timeIndex the time index. Ignored if !isTimeDependent(). * @return vertical coordinate array * @throws IOException problem reading data * @throws InvalidRangeException _more_ */ public ArrayDouble.D3 getCoordinateArray(int timeIndex) throws IOException, InvalidRangeException { Array ps = readArray(psVar, timeIndex); Index psIndex = ps.getIndex(); int nz = sigma.length; int[] shape2D = ps.getShape(); int ny = shape2D[0]; int nx = shape2D[1]; ArrayDouble.D3 result = new ArrayDouble.D3(nz, ny, nx); for (int y = 0; y < ny; y++) { for (int x = 0; x < nx; x++) { double psVal = ps.getDouble(psIndex.set(y, x)); for (int z = 0; z < nz; z++) { result.set(z, y, x, ptop + sigma[z] * (psVal - ptop)); } } } return result; }
/** * Get the 3D vertical coordinate array for this time step. * * @param timeIndex the time index. Ignored if !isTimeDependent(). * @return vertical coordinate array * @throws IOException problem reading data * @throws ucar.ma2.InvalidRangeException _more_ */ public ArrayDouble.D3 getCoordinateArray(int timeIndex) throws IOException, InvalidRangeException { int nz = (int) pressure.getSize(); int[] shape2D = pressure.getShape(); int ny = shape2D[0]; int nx = shape2D[1]; ArrayDouble.D3 result = new ArrayDouble.D3(nz, ny, nx); IndexIterator ii = pressure.getIndexIterator(); for (int z = 0; z < nz; z++) { double p = ii.getDoubleNext(); for (int y = 0; y < ny; y++) { for (int x = 0; x < nx; x++) { result.set(z, y, x, p); } } } return result; }
/** * Get the 3D vertical coordinate array for this time step. * * @param timeIndex the time index. Ignored if !isTimeDependent(). * @return vertical coordinate array * @throws IOException problem reading data * @throws InvalidRangeException _more_ */ public ArrayDouble.D3 getCoordinateArray(int timeIndex) throws IOException, InvalidRangeException { Array ps = readArray(psVar, timeIndex); Index psIndex = ps.getIndex(); int nz = sigma.length; int[] shape2D = ps.getShape(); int ny = shape2D[0]; int nx = shape2D[1]; ArrayDouble.D3 result = new ArrayDouble.D3(nz, ny, nx); for (int y = 0; y < ny; y++) { for (int x = 0; x < nx; x++) { double psVal = ps.getDouble(psIndex.set(y, x)); for (int z = 0; z < nz; z++) { result.set(z, y, x, ptop + sigma[z] * (psVal - ptop)); } } } return result; }
/** * Get the 3D vertical coordinate array for this time step. * * @param timeIndex the time index. Ignored if !isTimeDependent(). * @return vertical coordinate array * @throws IOException problem reading data * @throws ucar.ma2.InvalidRangeException _more_ */ public ArrayDouble.D3 getCoordinateArray(int timeIndex) throws IOException, InvalidRangeException { int nz = (int) pressure.getSize(); int[] shape2D = pressure.getShape(); int ny = shape2D[0]; int nx = shape2D[1]; ArrayDouble.D3 result = new ArrayDouble.D3(nz, ny, nx); IndexIterator ii = pressure.getIndexIterator(); for (int z = 0; z < nz; z++) { double p = ii.getDoubleNext(); for (int y = 0; y < ny; y++) { for (int x = 0; x < nx; x++) { result.set(z, y, x, p); } } } return result; }
/** * Get the 3D vertical coordinate array for this time step. * * @param timeIndex the time index. Ignored if !isTimeDependent(). * @return vertical coordinate array * @throws IOException problem reading data * @throws ucar.ma2.InvalidRangeException _more_ */ public ArrayDouble.D3 getCoordinateArray(int timeIndex) throws IOException, InvalidRangeException { // LOOK! we dont know what size to make this !! Array ps = null; // readArray(psVar, timeIndex); Index psIndex = ps.getIndex(); int nz = (int) pressure.getSize(); int[] shape2D = ps.getShape(); int ny = shape2D[0]; int nx = shape2D[1]; ArrayDouble.D3 result = new ArrayDouble.D3(nz, ny, nx); IndexIterator ii = pressure.getIndexIterator(); for (int z = 0; z < nz; z++) { double p = ii.getDoubleNext(); for (int y = 0; y < ny; y++) { for (int x = 0; x < nx; x++) { result.set(z, y, x, p); } } } return result; }