Package ucar.grib

Examples of ucar.grib.GribGridRecord


   *
   * @param gr GridRecord
   * @return Parameter.
   */
  public final GridParameter getParameter(GridRecord gr) {
    GribGridRecord ggr = (GribGridRecord) gr;
    try {
      GribPDSParamTable pt;
      pt = GribPDSParamTable.getParameterTable(ggr.getCenter(), ggr.getSubCenter(), ggr.getTableVersion());
      return pt.getParameter(ggr.getParameterNumber());
    } catch (NotSupportedException noSupport) {
      logger.error("Grib1GridTableLookup: Parameter "+ ggr.getParameterNumber() +" not found for center"+
          ggr.getCenter() +" subcenter "+ ggr.getSubCenter() +" table number "+ ggr.getTableVersion());
      logger.error("NotSupportedException : " + noSupport);
      return new GridParameter();
    }
  }
View Full Code Here


  /**
   * @param gr GridRecord
   * @return result
   */
  public int[] getParameterId(GridRecord gr) {
    GribGridRecord ggr = (GribGridRecord) gr;
    int[] result = new int[4];
    result[0] = 1;
    result[1] = ggr.getCenter(); //firstPDS.getCenter();
    result[2] = ggr.getTableVersion(); //firstPDS.getTableVersion();
    result[3] = ggr.getParameterNumber();
    return result;
  }
View Full Code Here

   *
   * @param gr GridRecord
   * @return ProductDefinitionName
   */
  public final String getProductDefinitionName(GridRecord gr) {
    GribGridRecord ggr = (GribGridRecord) gr;
    return Grib1Tables.getTimeRangeIndicatorName( ggr.getTimeUnit()); // pretty bloody wierd
  }
View Full Code Here

   *
   * @param gr GridRecord
   * @return typeGenProcessName
   */
  public final String getGenProcessName(GridRecord gr) {
    GribGridRecord ggr = (GribGridRecord) gr;
    return Grib1Tables.getTypeGenProcessName( firstPDSV.getCenter(), ggr.getPds().getGenProcessId() );
  }
View Full Code Here

   *
   * @param gr GridRecord
   * @return LevelName
   */
  public final String getLevelName(GridRecord gr) {
    GribGridRecord ggr = (GribGridRecord) gr;
    return GribPDSLevel.getNameShort(ggr.getLevelType1());
  }
View Full Code Here

   *
   * @param gr GridRecord
   * @return LevelDescription
   */
  public final String getLevelDescription(GridRecord gr) {
    GribGridRecord ggr = (GribGridRecord) gr;
    return GribPDSLevel.getLevelDescription(ggr.getLevelType1());
  }
View Full Code Here

   *
   * @param gr GridRecord
   * @return LevelUnit
   */
  public final String getLevelUnit(GridRecord gr) {
    GribGridRecord ggr = (GribGridRecord) gr;
    return GribPDSLevel.getUnits(ggr.getLevelType1());
  }
View Full Code Here

   * @param gr GridRecord
   * @return isVerticalCoordinate
   */
  public final boolean isVerticalCoordinate(GridRecord gr) {

    GribGridRecord ggr = (GribGridRecord) gr;
    int levelType = ggr.getLevelType1();

    if (levelType == 20) {
      return true;
    }
    if (levelType == 100) {
View Full Code Here

   *
   * @param gr GridRecord
   * @return isPositiveUp
   */
  public final boolean isPositiveUp(GridRecord gr) {
    GribGridRecord ggr = (GribGridRecord) gr;
    int levelType = ggr.getLevelType1();

    if (levelType == 103) {
      return true;
    }
    if (levelType == 104) {
View Full Code Here

   *
   * @param gr GridRecord
   * @return true if a layer
   */
  public final boolean isLayer(GridRecord gr) {
    GribGridRecord ggr = (GribGridRecord) gr;
    int levelType = ggr.getLevelType1();

    if (levelType == 101) return true;
    if (levelType == 104) return true;
    if (levelType == 106) return true;
    if (levelType == 108) return true;
View Full Code Here

TOP

Related Classes of ucar.grib.GribGridRecord

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.