cdm/src/main/java/ucar/nc2/dataset/conv/COARDSConvention.java
protected AxisType getAxisType( NetcdfDataset ncDataset, VariableEnhanced v) {

    String unit = v.getUnitsString();
    if (unit == null)
      return null;
    unit = unit.trim();
    
    if( unit.equalsIgnoreCase("degrees_east") ||
            unit.equalsIgnoreCase("degrees_E") ||
            unit.equalsIgnoreCase("degreesE") ||
            unit.equalsIgnoreCase("degree_east") ||
            unit.equalsIgnoreCase("degree_E") ||
            unit.equalsIgnoreCase("degreeE"))
      return AxisType.Lon;

    if ( unit.equalsIgnoreCase("degrees_north") ||
            unit.equalsIgnoreCase("degrees_N") ||
            unit.equalsIgnoreCase("degreesN") ||
            unit.equalsIgnoreCase("degree_north") ||
            unit.equalsIgnoreCase("degree_N") ||
            unit.equalsIgnoreCase("degreeN"))
      return AxisType.Lat;

    if (SimpleUnit.isDateUnit(unit)) {
      return AxisType.Time;
    }
    // look for other z coordinate
    if (SimpleUnit.isCompatible("mbar", unit))
      return AxisType.Pressure;
    if (unit.equalsIgnoreCase("level") || unit.equalsIgnoreCase("layer") || unit.equalsIgnoreCase("sigma_level"))
      return AxisType.GeoZ;

    String positive = ncDataset.findAttValueIgnoreCase((Variable) v, CF.POSITIVE, null);
    if (positive != null) {
      if (SimpleUnit.isCompatible("m", unit))
        return AxisType.Height;
      else
        return AxisType.GeoZ;
    }

    // a bad idea, but CDC SST relies on it :
    // :Source = "NOAA/National Climatic Data Center";
   // :Contact = "Dick Reynolds, email: Richard.W.Reynolds@noaa.gov & Chunying Liu, email: Chunying.liu@noaa.gov";
   //:netcdf_Convention = "COARDS";
   // if (checkForMeter && SimpleUnit.isCompatible("m", unit))
   //   return AxisType.Height;

    return null;
  }
protected AxisType getAxisType( NetcdfDataset ncDataset, VariableEnhanced v) {

    String unit = v.getUnitsString();
    if (unit == null)
      return null;
    unit = unit.trim();
    
    if( unit.equalsIgnoreCase("degrees_east") ||
            unit.equalsIgnoreCase("degrees_E") ||
            unit.equalsIgnoreCase("degreesE") ||
            unit.equalsIgnoreCase("degree_east") ||
            unit.equalsIgnoreCase("degree_E") ||
            unit.equalsIgnoreCase("degreeE"))
      return AxisType.Lon;

    if ( unit.equalsIgnoreCase("degrees_north") ||
            unit.equalsIgnoreCase("degrees_N") ||
            unit.equalsIgnoreCase("degreesN") ||
            unit.equalsIgnoreCase("degree_north") ||
            unit.equalsIgnoreCase("degree_N") ||
            unit.equalsIgnoreCase("degreeN"))
      return AxisType.Lat;

    if (SimpleUnit.isDateUnit(unit)) {
      return AxisType.Time;
    }
    // look for other z coordinate
    if (SimpleUnit.isCompatible("mbar", unit))
      return AxisType.Pressure;
    if (unit.equalsIgnoreCase("level") || unit.equalsIgnoreCase("layer") || unit.equalsIgnoreCase("sigma_level"))
      return AxisType.GeoZ;

    String positive = ncDataset.findAttValueIgnoreCase((Variable) v, CF.POSITIVE, null);
    if (positive != null) {
      if (SimpleUnit.isCompatible("m", unit))
        return AxisType.Height;
      else
        return AxisType.GeoZ;
    }

    // a bad idea, but CDC SST relies on it :
    // :Source = "NOAA/National Climatic Data Center";
   // :Contact = "Dick Reynolds, email: Richard.W.Reynolds@noaa.gov & Chunying Liu, email: Chunying.liu@noaa.gov";
   //:netcdf_Convention = "COARDS";
   // if (checkForMeter && SimpleUnit.isCompatible("m", unit))
   //   return AxisType.Height;

    return null;
  }
protected AxisType getAxisType ( NetcdfDataset ncDataset , VariableEnhanced v ) { String unit = v . getUnitsString ( ) ; if ( unit == null ) return null ; unit = unit . trim ( ) ; if ( unit . equalsIgnoreCase ( "degrees_east" ) || unit . equalsIgnoreCase ( "degrees_E" ) || unit . equalsIgnoreCase ( "degreesE" ) || unit . equalsIgnoreCase ( "degree_east" ) || unit . equalsIgnoreCase ( "degree_E" ) || unit . equalsIgnoreCase ( "degreeE" ) ) return AxisType . Lon ; if ( unit . equalsIgnoreCase ( "degrees_north" ) || unit . equalsIgnoreCase ( "degrees_N" ) || unit . equalsIgnoreCase ( "degreesN" ) || unit . equalsIgnoreCase ( "degree_north" ) || unit . equalsIgnoreCase ( "degree_N" ) || unit . equalsIgnoreCase ( "degreeN" ) ) return AxisType . Lat ; if ( SimpleUnit . isDateUnit ( unit ) ) { return AxisType . Time ; } // look for other z coordinate
 if ( SimpleUnit . isCompatible ( "mbar" , unit ) ) return AxisType . Pressure ; if ( unit . equalsIgnoreCase ( "level" ) || unit . equalsIgnoreCase ( "layer" ) || unit . equalsIgnoreCase ( "sigma_level" ) ) return AxisType . GeoZ ; String positive = ncDataset . findAttValueIgnoreCase ( ( Variable ) v , CF . POSITIVE , null ) ; if ( positive != null ) { if ( SimpleUnit . isCompatible ( "m" , unit ) ) return AxisType . Height ; else return AxisType . GeoZ ; } // a bad idea, but CDC SST relies on it :
 // :Source = "NOAA/National Climatic Data Center";
 // :Contact = "Dick Reynolds, email: Richard.W.Reynolds@noaa.gov & Chunying Liu, email: Chunying.liu@noaa.gov";
 //:netcdf_Convention = "COARDS";
 // if (checkForMeter && SimpleUnit.isCompatible("m", unit))
 //   return AxisType.Height;
 return null ; }
we assume that coordinate axes get identified by being coordinate variables
we assume that coordinate axes get identified by being coordinate variables