HashMap<AxisType, VarProcess> map = new HashMap<AxisType, VarProcess>();
// find existing axes, so we dont duplicate
for (VarProcess vp : varList) {
if (vp.isCoordinateAxis) {
AxisType atype = getAxisType(ds, (VariableEnhanced) vp.v);
if (atype != null)
map.put(atype, vp);
}
}
// look for variables to turn into axes
for (VarProcess vp : varList) {
if (vp.isCoordinateVariable) continue;
Variable ncvar = vp.v;
if (!(ncvar instanceof VariableDS)) continue; // cant be a structure
AxisType atype = getAxisType(ds, (VariableEnhanced) vp.v);
if (atype != null) {
if (map.get(atype) == null) {
vp.isCoordinateAxis = true;
parseInfo.format(" Coordinate Axis added (GDV forced) = %s for axis %s\n", vp.v.getFullName(), atype);
}