cdm/src/main/java/ucar/nc2/dataset/conv/AWIPSConvention.java
private List<Dimension> breakupLevels(NetcdfDataset ds, Variable levelVar) throws IOException {
    if (debugBreakup) parseInfo.format("breakupLevels = %s%n", levelVar.getShortName());
    List<Dimension> dimList = new ArrayList<>();

    ArrayChar levelVarData;
    try {
      levelVarData = (ArrayChar) levelVar.read();
    } catch (IOException ioe) {
      return dimList;
    }

    List<String> values = null;
    String currentUnits = null;
    ArrayChar.StringIterator iter = levelVarData.getStringIterator();
    while (iter.hasNext()) {
      String s = iter.next();
      if (debugBreakup) parseInfo.format("   %s%n", s);
      StringTokenizer stoke = new StringTokenizer(s);

/* problem with blank string:
   char pvvLevels(levels_35=35, charsPerLevel=10);
"MB 1000   ", "MB 975    ", "MB 950    ", "MB 925    ", "MB 900    ", "MB 875    ", "MB 850    ", "MB 825    ", "MB 800    ", "MB 775    ", "MB 750    ",
"MB 725    ", "MB 700    ", "MB 675    ", "MB 650    ", "MB 625    ", "MB 600    ", "MB 575    ", "MB 550    ", "MB 525    ", "MB 500    ", "MB 450    ",
"MB 400    ", "MB 350    ", "MB 300    ", "MB 250    ", "MB 200    ", "MB 150    ", "MB 100    ", "BL 0 30   ", "BL 60 90  ", "BL 90 120 ", "BL 120 150",
"BL 150 180", ""
*/
      if (!stoke.hasMoreTokens())
        continue; // skip it

      // first token is the unit
      String units = stoke.nextToken().trim();
      if (!units.equals(currentUnits)) {
        if (values != null)
          dimList.add(makeZCoordAxis(ds, values, currentUnits));
        values = new ArrayList<>();
        currentUnits = units;
      }

      // next token is the value
      if (stoke.hasMoreTokens())
        values.add(stoke.nextToken());
      else
        values.add("0");
    }
    if (values != null)
      dimList.add(makeZCoordAxis(ds, values, currentUnits));

    if (debugBreakup) parseInfo.format("  done breakup%n");

    return dimList;
  }
private List<Dimension> breakupLevels(NetcdfDataset ds, Variable levelVar) throws IOException {
    if (debugBreakup) parseInfo.format("breakupLevels = %s%n", levelVar.getShortName());
    List<Dimension> dimList = new ArrayList<>();

    ArrayChar levelVarData;
    try {
      levelVarData = (ArrayChar) levelVar.read();
    } catch (IOException ioe) {
      return dimList;
    }

    List<String> values = null;
    String currentUnits = null;
    ArrayChar.StringIterator iter = levelVarData.getStringIterator();
    while (iter.hasNext()) {
      String s = iter.next();
      if (debugBreakup) parseInfo.format("   %s%n", s);
      StringTokenizer stoke = new StringTokenizer(s);

/* problem with blank string:
   char pvvLevels(levels_35=35, charsPerLevel=10);
"MB 1000   ", "MB 975    ", "MB 950    ", "MB 925    ", "MB 900    ", "MB 875    ", "MB 850    ", "MB 825    ", "MB 800    ", "MB 775    ", "MB 750    ",
"MB 725    ", "MB 700    ", "MB 675    ", "MB 650    ", "MB 625    ", "MB 600    ", "MB 575    ", "MB 550    ", "MB 525    ", "MB 500    ", "MB 450    ",
"MB 400    ", "MB 350    ", "MB 300    ", "MB 250    ", "MB 200    ", "MB 150    ", "MB 100    ", "BL 0 30   ", "BL 60 90  ", "BL 90 120 ", "BL 120 150",
"BL 150 180", ""
*/
      if (!stoke.hasMoreTokens())
        continue; // skip it

      // first token is the unit
      String units = stoke.nextToken().trim();
      if (!units.equals(currentUnits)) {
        if (values != null)
          dimList.add(makeZCoordAxis(ds, values, currentUnits));
        values = new ArrayList<>();
        currentUnits = units;
      }

      // next token is the value
      if (stoke.hasMoreTokens())
        values.add(stoke.nextToken());
      else
        values.add("0");
    }
    if (values != null)
      dimList.add(makeZCoordAxis(ds, values, currentUnits));

    if (debugBreakup) parseInfo.format("  done breakup%n");

    return dimList;
  }
private List < Dimension > breakupLevels ( NetcdfDataset ds , Variable levelVar ) throws IOException { if ( debugBreakup ) parseInfo . format ( "breakupLevels = %s%n" , levelVar . getShortName ( ) ) ; List < Dimension > dimList = new ArrayList <> ( ) ; ArrayChar levelVarData ; try { levelVarData = ( ArrayChar ) levelVar . read ( ) ; } catch ( IOException ioe ) { return dimList ; } List < String > values = null ; String currentUnits = null ; ArrayChar . StringIterator iter = levelVarData . getStringIterator ( ) ; while ( iter . hasNext ( ) ) { String s = iter . next ( ) ; if ( debugBreakup ) parseInfo . format ( "   %s%n" , s ) ; StringTokenizer stoke = new StringTokenizer ( s ) ; /* problem with blank string:
   char pvvLevels(levels_35=35, charsPerLevel=10);
"MB 1000   ", "MB 975    ", "MB 950    ", "MB 925    ", "MB 900    ", "MB 875    ", "MB 850    ", "MB 825    ", "MB 800    ", "MB 775    ", "MB 750    ",
"MB 725    ", "MB 700    ", "MB 675    ", "MB 650    ", "MB 625    ", "MB 600    ", "MB 575    ", "MB 550    ", "MB 525    ", "MB 500    ", "MB 450    ",
"MB 400    ", "MB 350    ", "MB 300    ", "MB 250    ", "MB 200    ", "MB 150    ", "MB 100    ", "BL 0 30   ", "BL 60 90  ", "BL 90 120 ", "BL 120 150",
"BL 150 180", ""
*/ if ( ! stoke . hasMoreTokens ( ) ) continue ; // skip it
 // first token is the unit
 String units = stoke . nextToken ( ) . trim ( ) ; if ( ! units . equals ( currentUnits ) ) { if ( values != null ) dimList . add ( makeZCoordAxis ( ds , values , currentUnits ) ) ; values = new ArrayList <> ( ) ; currentUnits = units ; } // next token is the value
 if ( stoke . hasMoreTokens ( ) ) values . add ( stoke . nextToken ( ) ) ; else values . add ( "0" ) ; } if ( values != null ) dimList . add ( makeZCoordAxis ( ds , values , currentUnits ) ) ; if ( debugBreakup ) parseInfo . format ( "  done breakup%n" ) ; return dimList ; }
return the list of Dimensions that were created
return the list of Dimensions that were created