if (null == formula_terms) return null;
useAp = formula_terms.indexOf("ap:") >= 0;
CoordinateTransform rs = new VerticalCT("AtmHybridSigmaPressure_Transform_"+ctv.getShortName(), getTransformName(), VerticalCT.Type.HybridSigmaPressure, this);
rs.addParameter(new Parameter("standard_name", getTransformName()));
rs.addParameter(new Parameter("formula_terms", formula_terms));
// parse the formula string
if (useAp) {
String[] values = parseFormula(formula_terms, "ap b ps");
if (values == null) return null;
ap = values[0];
b = values[1];
ps = values[2];
rs.addParameter(new Parameter("formula", "pressure(x,y,z) = ap(z) + b(z)*surfacePressure(x,y)"));
if (!addParameter(rs, HybridSigmaPressure.PS, ds, ps)) return null;
if (!addParameter(rs, HybridSigmaPressure.AP, ds, ap)) return null;
if (!addParameter(rs, HybridSigmaPressure.B, ds, b)) return null;
} else {
String[] values = parseFormula(formula_terms, "a b ps p0");
if (values == null) return null;
a = values[0];
b = values[1];
ps = values[2];
p0 = values[3];
rs.addParameter(new Parameter("formula", "pressure(x,y,z) = a(z)*p0 + b(z)*surfacePressure(x,y)"));
if (!addParameter(rs, HybridSigmaPressure.PS, ds, ps)) return null;
if (!addParameter(rs, HybridSigmaPressure.A, ds, a)) return null;
if (!addParameter(rs, HybridSigmaPressure.B, ds, b)) return null;
if (!addParameter(rs, HybridSigmaPressure.P0, ds, p0)) return null;
}