Package ucar.grid

Examples of ucar.grid.GridParameter


   * @return parameter description
   */
  @Override
  public String getParameterDescription() {
    if (paramDesc == null) {
      GridParameter p = getParameter();
      paramDesc = p.getDescription();
    }
    return paramDesc;
  }
View Full Code Here


    }
    return paramDesc;
  }

  private GridParameter getParameter() {
    GridParameter p = null;
      if (edition == 2) {
        Grib2Pds pds2 = (Grib2Pds) pds;
        p = ParameterTable.getParameter(discipline, pds2.getParameterCategory(), pds.getParameterNumber());

      } else {
View Full Code Here

      String unknown = "UnknownParameter_D"+ Integer.toString(d) +"_C"+
          Integer.toString(c) +"_"+ Integer.toString(p);
      return unknown;
    }

    GridParameter parameter = category.getParameter(p);
    if (parameter == null) {
      String unknown = "UnknownParameter_D"+ Integer.toString(d) +"_C"+
          Integer.toString(c) +"_"+ Integer.toString(p);
      return unknown;
    }

    return parameter.getName();
  }
View Full Code Here

    Category category = discipline.getCategory(c);
    if (category == null) {
      return "Unknown";
    }

    GridParameter parameter = category.getParameter(p);
    if (parameter == null) {
      return "Unknown";
    }

    return parameter.getUnit();
  }
View Full Code Here

      String unknown = "UnknownParameter_D"+ Integer.toString(d) +"_C"+
          Integer.toString(c) +"_"+ Integer.toString(p);
      return unknown;
    }

    GridParameter parameter = category.getParameter(p);
    if (parameter == null) {
      String unknown = "UnknownParameter_D"+ Integer.toString(d) +"_C"+
          Integer.toString(c) +"_"+ Integer.toString(p);
      return unknown;
    }

    return parameter.getDescription();
  }
View Full Code Here

  public static GridParameter getParameter(int d, int c, int p) {
    Discipline discipline = getDiscipline(d);
    if (discipline == null) {
      String unknown = "UnknownParameter_D"+ Integer.toString(d) +"_C"+
          Integer.toString(c) +"_"+ Integer.toString(p);
      return new GridParameter(p, unknown, unknown, "Unknown");
    }

    Category category = discipline.getCategory(c);
    if (category == null) {
      String unknown = "UnknownParameter_D"+ Integer.toString(d) +"_C"+
          Integer.toString(c) +"_"+ Integer.toString(p);
      return new GridParameter(p, unknown, unknown, "Unknown");
    }

    GridParameter parameter = category.getParameter(p);
    if (parameter == null) {
      String unknown = "UnknownParameter_D"+ Integer.toString(d) +"_C"+
          Integer.toString(c) +"_"+ Integer.toString(p);
      return new GridParameter(p, unknown, unknown, "Unknown");
    }

    return parameter;
  }
View Full Code Here

    // local parameters disciplines are offset by center and size of discipline
    Discipline discipline = getDiscipline( center * 255 + d);
    if (discipline == null) {
      String unknown = "UnknownParameter_D"+ Integer.toString(d) +"_C"+
          Integer.toString(c) +"_"+ Integer.toString(p);
      return new GridParameter(p, unknown, unknown, "Unknown");
    }

    Category category = discipline.getCategory(c);
    if (category == null) {
      String unknown = "UnknownParameter_D"+ Integer.toString(d) +"_C"+
          Integer.toString(c) +"_"+ Integer.toString(p);
      return new GridParameter(p, unknown, unknown, "Unknown");
    }

    GridParameter parameter = category.getParameter(p);
    if (parameter == null) {
      String unknown = "UnknownParameter_D"+ Integer.toString(d) +"_C"+
          Integer.toString(c) +"_"+ Integer.toString(p);
      return new GridParameter(p, unknown, unknown, "Unknown");
    }

    return parameter;
  }
View Full Code Here

      if (p_comment.matcher(line).find()) {
        continue;
      }
      m = p_parameter.matcher(line);
      if (m.find() && (m.groupCount() == 6)) {
        GridParameter p = new GridParameter(Integer.parseInt(m.group(3)), m.group(4), m.group(6),
            m.group(5));
        getDiscipline(Integer.parseInt(m.group(1))).getCategory(
            Integer.parseInt(m.group(2))).setParameter(p);
      }
View Full Code Here

      } else if( field.length == 6 ) {
        // 0   1   192  Weather  non-dim  Weather
        // remove non-dim unit
        if( field[ 4 ].compareToIgnoreCase( "non-dim") == 0)
          field[ 4 ] = "";
        GridParameter p = new GridParameter(Integer.parseInt(field[ 2 ]), field[ 3 ], field[ 5 ], field[ 4 ]);
        // unique the discipline number so no conflicts from different centers
        // first time disciplines will not exist
        int d = center * 255 + Integer.parseInt(field[ 0 ]);
        Discipline dis = getDiscipline( d );
        if (dis == null) {
View Full Code Here

TOP

Related Classes of ucar.grid.GridParameter

Copyright © 2018 www.massapicom. 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.