grib/src/main/java/ucar/nc2/grib/grib2/Grib2Pds.java
@Nullable
  public static Grib2Pds factory(int template, byte[] input) {
    switch (template) {
      case 0:
        return new Grib2Pds0(input);
      case 1:
        return new Grib2Pds1(input);
      case 2:
        return new Grib2Pds2(input);
      case 5:
        return new Grib2Pds5(input);
      case 6:
        return new Grib2Pds6(input);
      case 8:
        return new Grib2Pds8(input);
      case 9:
        return new Grib2Pds9(input);
      case 10:
        return new Grib2Pds10(input);
      case 11:
        return new Grib2Pds11(input);
      case 12:
        return new Grib2Pds12(input);
      case 15:
        return new Grib2Pds15(input);
      case 30:
        return new Grib2Pds30(input);
      case 31:
        return new Grib2Pds31(input);
      case 48:
          return new Grib2Pds48(input);
      case 61:
          return new Grib2Pds61(input);
      default:
        log.warn("Missing template " + template);
        return null;
    }
  }
@Nullable
  public static Grib2Pds factory(int template, byte[] input) {
    switch (template) {
      case 0:
        return new Grib2Pds0(input);
      case 1:
        return new Grib2Pds1(input);
      case 2:
        return new Grib2Pds2(input);
      case 5:
        return new Grib2Pds5(input);
      case 6:
        return new Grib2Pds6(input);
      case 8:
        return new Grib2Pds8(input);
      case 9:
        return new Grib2Pds9(input);
      case 10:
        return new Grib2Pds10(input);
      case 11:
        return new Grib2Pds11(input);
      case 12:
        return new Grib2Pds12(input);
      case 15:
        return new Grib2Pds15(input);
      case 30:
        return new Grib2Pds30(input);
      case 31:
        return new Grib2Pds31(input);
      case 48:
          return new Grib2Pds48(input);
      case 61:
          return new Grib2Pds61(input);
      default:
        log.warn("Missing template " + template);
        return null;
    }
  }
Factory for Grib2Pds

@param template pds template number
@param input   raw bytes
@return Grib2Pds or null on error