Examples of GribGridRecord


Examples of ucar.grib.GribGridRecord

    boolean first = true;
    Map<Integer, List<String>> map = new HashMap<Integer, List<String>>();

    List<GridRecord> grList = index.getGridRecords();
    for (GridRecord gr : grList) {
      GribGridRecord ggr = (GribGridRecord) gr;
      int genType = ggr.getPds().getGenProcessId();
      if (!isGrib1) {
        Grib2Pds pds =  (Grib2Pds) ggr.getPds();
        genType = pds.getGenProcessType();
      }
      List<String> uses = map.get(genType);
      if (uses == null) {
        uses = new ArrayList<String>();
        map.put(genType, uses);
      }
      String name = ggr.getParameterName();
      if (!uses.contains(name))
        uses.add(name);

      if (first) {
        System.out.printf("Center=  %d / %d%n", ggr.getCenter(), ggr.getSubCenter());
        first = false;
      }
    }

    List<Integer> sortList = new ArrayList<Integer>();
View Full Code Here

Examples of ucar.grib.GribGridRecord

    boolean first = true;
    Map<String, List<Integer>> map = new HashMap<String, List<Integer>>();

    List<GridRecord> grList = index.getGridRecords();
    for (GridRecord gr : grList) {
      GribGridRecord ggr = (GribGridRecord) gr;
      int genType = ggr.getPds().getStatisticalProcessType();
      if (genType < 0) continue;

      String vname = ggr.getParameterName();
      List<Integer> uses = map.get(vname);
      if (uses == null) {
        uses = new ArrayList<Integer>();
        map.put(vname, uses);
      }
      if (!uses.contains(genType))
        uses.add(genType);

      if (first) {
        System.out.printf("Center=  %d / %d%n", ggr.getCenter(), ggr.getSubCenter());
        first = false;
      }
    }

    List<String> sortList = new ArrayList<String>();
View Full Code Here

Examples of ucar.grib.GribGridRecord

    boolean first = true;
    Set<Integer> versionSet = new HashSet<Integer>();

    List<GridRecord> grList = index.getGridRecords();
    for (GridRecord gr : grList) {
      GribGridRecord ggr = (GribGridRecord) gr;
      int ver = ggr.getTableVersion();
      versionSet.add(ver);
      if (first) {
        System.out.printf(    "Originating Center : (%d) %s%n", ggr.getCenter(), Grib1Tables.getCenter_idName( ggr.getCenter() ));
        System.out.printf("Originating Sub-Center : (%d) %s%n",  ggr.getSubCenter(),  Grib1Tables.getSubCenter_idName( ggr.getCenter(), ggr.getSubCenter()) );
        first = false;
      }
    }

    System.out.printf("Version(s) = ");
View Full Code Here

Examples of ucar.grib.GribGridRecord

    Map<Integer, List<String>> map = new HashMap<Integer, List<String>>();

    List<GridRecord> grList = index.getGridRecords();
    for (GridRecord gr : grList) {
      GribGridRecord ggr = (GribGridRecord) gr;
      if (!ggr.isInterval()) continue;

      Grib2Pds pds = (Grib2Pds) ggr.getPds();
      Grib2Pds.PdsInterval pdsIntv = (Grib2Pds.PdsInterval) pds;
      for (Grib2Pds.TimeInterval intv : pdsIntv.getTimeIntervals()) {
        int val = intv.timeIncrementType;
        List<String> uses = map.get(val);
        if (uses == null) {
          uses = new ArrayList<String>();
          map.put(val, uses);
        }
        String name = ggr.getParameterName();
        if (!uses.contains(name))
          uses.add(name);
      }
    }
View Full Code Here

Examples of ucar.grib.GribGridRecord

    GribGridServiceProvider iosp = (GribGridServiceProvider) ncd.getIosp();
    GridIndex index = (GridIndex) iosp.sendIospMessage("GridIndex");

    List<GridRecord> grList = index.getGridRecords();
    for (GridRecord gr : grList) {
      GribGridRecord ggr = (GribGridRecord) gr;
      if (!ggr.isInterval()) continue;

      Grib2Pds pds = (Grib2Pds) ggr.getPds();
      System.out.printf(" ref=%s fore=%s%n", df.toDateTimeStringISO(gr.getReferenceTime()), df.toDateTimeStringISO(pds.getForecastDate()));

      Grib2Pds.PdsInterval pdsIntv = (Grib2Pds.PdsInterval) pds;
      long timeEnd = pdsIntv.getIntervalTimeEnd();
      int[] intv = pds.getForecastTimeInterval();
View Full Code Here

Examples of ucar.grib.GribGridRecord

    Map<Integer, Product> pdsSet = new HashMap<Integer, Product>();

    List<GridRecord> grList = index.getGridRecords();
    for (GridRecord gr : grList) {
      GribGridRecord ggr = (GribGridRecord) gr;
      GribPds pds =  ggr.getPds();
      if (!pds.isInterval()) continue;

      //int startInterval = ggr.startOfInterval;
      //if ((startInterval == GribNumbers.UNDEFINED) || (startInterval == GribNumbers.MISSING)) continue;

      /* check valid time == base time + forecast
      int forecast = ggr.forecastTime;
      Date validTime = ggr.getValidTime();
      Date refTime = ggr.getReferenceTime();
      if (forecast != startInterval) {
        String name = ParameterTable.getParameterName(ggr.discipline, ggr.category, ggr.paramNumber) +"/" + Grib2Tables.codeTable4_5(ggr.levelType1);
        System.out.printf(" **time %s %d != %d%n", name, forecast, startInterval);
      } */

      Product bean = pdsSet.get(ggr.cdmVariableHash());
      if (bean == null) {
        bean = new Product(ggr);
        pdsSet.put(ggr.cdmVariableHash(), bean);
        nintVars++;
      }
      bean.list.add(ggr);
    }

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.