cdm/src/main/java/ucar/unidata/geoloc/vertical/HybridSigmaPressure.java
public D1 getCoordinateArray1D(int timeIndex, int xIndex, int yIndex)
  		throws IOException, InvalidRangeException {
	  
	    Array psArray = readArray(psVar, timeIndex);

	    if (null == aArray) {
	      aArray = aVar.read();
	      bArray = bVar.read();
	      //p0 = (p0Var == null) ? 1.0 : p0Var.readScalarDouble();
	      p0 = computeP0();
	    }

	    int nz = (int) aArray.getSize();
	    Index aIndex = aArray.getIndex();
	    Index bIndex = bArray.getIndex();

	    // it's possible to have rank 3 because pressure can have a level, usually 1
	    // Check if rank 3 and try to reduce
	    if( psArray.getRank() == 3) 
	      psArray = psArray.reduce(0);

	    Index psIndex = psArray.getIndex();

	    ArrayDouble.D1 press = new ArrayDouble.D1(nz);

	    double ps;
	    for (int z = 0; z < nz; z++) {
	    	    	
	      double term1 = aArray.getDouble(aIndex.set(z)) * p0;
	      //AP might need unit conversion
	      if(!apUnits.equals(units) ){
	    	  term1 = convertPressureToPSUnits(apUnits, term1);
	      }	      
	      
	      double bz = bArray.getDouble(bIndex.set(z));

          ps = psArray.getDouble(psIndex.set( yIndex, xIndex));
          press.set(z, term1 + bz * ps);
          
	    }

	    return press;
	  
	  
  }
public D1 getCoordinateArray1D(int timeIndex, int xIndex, int yIndex)
  		throws IOException, InvalidRangeException {
	  
	    Array psArray = readArray(psVar, timeIndex);

	    if (null == aArray) {
	      aArray = aVar.read();
	      bArray = bVar.read();
	      //p0 = (p0Var == null) ? 1.0 : p0Var.readScalarDouble();
	      p0 = computeP0();
	    }

	    int nz = (int) aArray.getSize();
	    Index aIndex = aArray.getIndex();
	    Index bIndex = bArray.getIndex();

	    // it's possible to have rank 3 because pressure can have a level, usually 1
	    // Check if rank 3 and try to reduce
	    if( psArray.getRank() == 3) 
	      psArray = psArray.reduce(0);

	    Index psIndex = psArray.getIndex();

	    ArrayDouble.D1 press = new ArrayDouble.D1(nz);

	    double ps;
	    for (int z = 0; z < nz; z++) {
	    	    	
	      double term1 = aArray.getDouble(aIndex.set(z)) * p0;
	      //AP might need unit conversion
	      if(!apUnits.equals(units) ){
	    	  term1 = convertPressureToPSUnits(apUnits, term1);
	      }	      
	      
	      double bz = bArray.getDouble(bIndex.set(z));

          ps = psArray.getDouble(psIndex.set( yIndex, xIndex));
          press.set(z, term1 + bz * ps);
          
	    }

	    return press;
	  
	  
  }
public D1 getCoordinateArray1D ( int timeIndex , int xIndex , int yIndex ) throws IOException , InvalidRangeException { Array psArray = readArray ( psVar , timeIndex ) ; if ( null == aArray ) { aArray = aVar . read ( ) ; bArray = bVar . read ( ) ; //p0 = (p0Var == null) ? 1.0 : p0Var.readScalarDouble();
 p0 = computeP0 ( ) ; } int nz = ( int ) aArray . getSize ( ) ; Index aIndex = aArray . getIndex ( ) ; Index bIndex = bArray . getIndex ( ) ; // it's possible to have rank 3 because pressure can have a level, usually 1
 // Check if rank 3 and try to reduce
 if ( psArray . getRank ( ) == 3 ) psArray = psArray . reduce ( 0 ) ; Index psIndex = psArray . getIndex ( ) ; ArrayDouble . D1 press = new ArrayDouble . D1 ( nz ) ; double ps ; for ( int z = 0 ; z < nz ; z ++ ) { double term1 = aArray . getDouble ( aIndex . set ( z ) ) * p0 ; //AP might need unit conversion
 if ( ! apUnits . equals ( units ) ) { term1 = convertPressureToPSUnits ( apUnits , term1 ) ; } double bz = bArray . getDouble ( bIndex . set ( z ) ) ; ps = psArray . getDouble ( psIndex . set ( yIndex , xIndex ) ) ; press . set ( z , term1 + bz * ps ) ; } return press ; }
Get the 1D vertical coordinate array for this time step and point

@param timeIndex the time index. Ignored if !isTimeDependent().
@param xIndex    the x index
@param yIndex    the y index
@return vertical coordinate array
@throws java.io.IOException problem reading data
@throws ucar.ma2.InvalidRangeException _more_
Get the 1D vertical coordinate array for this time step and point