visad/src/main/java/ucar/nc2/iosp/gempak/GempakFileReader.java
public int getPartNumber(String name) {
    int part = 0;
    if ((parts != null) && !parts.isEmpty()) {
      for (int i = 0; i < parts.size(); i++) {
        String partName = parts.get(i).kprtnm;
        if (partName.equals(name)) {
          // gotta add 1 because parts are 1 based
          part = i + 1;
          break;
        }
      }
    }
    return part;
  }
public int getPartNumber(String name) {
    int part = 0;
    if ((parts != null) && !parts.isEmpty()) {
      for (int i = 0; i < parts.size(); i++) {
        String partName = parts.get(i).kprtnm;
        if (partName.equals(name)) {
          // gotta add 1 because parts are 1 based
          part = i + 1;
          break;
        }
      }
    }
    return part;
  }
Find the part with the particular name.

@param name name of part to find
@return part number.