cdm/src/main/java/ucar/unidata/geoloc/vertical/OceanS.java
private Array makeC(Array s, double a, double b) {
    int nz = (int) s.getSize();
    Index sIndex = s.getIndex();
    if (a == 0) return s;  // per R. Signell, USGS

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

    double fac1 = 1.0 - b;
    double denom1 = 1.0 / Math.sinh(a);
    double denom2 = 1.0 / (2.0 * Math.tanh(0.5 * a));

    for (int i = 0; i < nz; i++) {
      double sz = s.getDouble(sIndex.set(i));
      double term1 = fac1 * Math.sinh(a * sz) * denom1;
      double term2 = b * (Math.tanh(a * (sz + 0.5))
          * denom2 - 0.5);
      c.set(i, term1 + term2);
    }

    return c;
  }
private Array makeC(Array s, double a, double b) {
    int nz = (int) s.getSize();
    Index sIndex = s.getIndex();
    if (a == 0) return s;  // per R. Signell, USGS

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

    double fac1 = 1.0 - b;
    double denom1 = 1.0 / Math.sinh(a);
    double denom2 = 1.0 / (2.0 * Math.tanh(0.5 * a));

    for (int i = 0; i < nz; i++) {
      double sz = s.getDouble(sIndex.set(i));
      double term1 = fac1 * Math.sinh(a * sz) * denom1;
      double term2 = b * (Math.tanh(a * (sz + 0.5))
          * denom2 - 0.5);
      c.set(i, term1 + term2);
    }

    return c;
  }
private Array makeC ( Array s , double a , double b ) { int nz = ( int ) s . getSize ( ) ; Index sIndex = s . getIndex ( ) ; if ( a == 0 ) return s ; // per R. Signell, USGS
 ArrayDouble . D1 c = new ArrayDouble . D1 ( nz ) ; double fac1 = 1.0 - b ; double denom1 = 1.0 / Math . sinh ( a ) ; double denom2 = 1.0 / ( 2.0 * Math . tanh ( 0.5 * a ) ) ; for ( int i = 0 ; i < nz ; i ++ ) { double sz = s . getDouble ( sIndex . set ( i ) ) ; double term1 = fac1 * Math . sinh ( a * sz ) * denom1 ; double term2 = b * ( Math . tanh ( a * ( sz + 0.5 ) ) * denom2 - 0.5 ) ; c . set ( i , term1 + term2 ) ; } return c ; }
Make the C array

@param s s Array
@param a "a" value
@param b "b" value
@return the C array
Make the C array