ucar.grib
Class GribGridRecord

java.lang.Object
  extended by ucar.grib.GribGridRecord
All Implemented Interfaces:
GridRecord

public final class GribGridRecord
extends Object
implements GridRecord

Represents information for one record in the Grib file.


Constructor Summary
GribGridRecord()
          default constructor, used by GribReadIndex (binary indices)
 
Method Summary
 int cdmVariableHash()
          A hash code to group records into a CDM variable
 String cdmVariableName(GridTableLookup lookup, boolean useLevel, boolean useStat)
          A unique name for the CDM variable, must be consistent with cdmVariableHash
 Object getBelongs()
           
 int getCenter()
           
 int getDecimalScale()
          Get the decimal scale
 int getDiscipline()
           
 int getEdition()
           
 int getGdsKey()
           
 long getGdsOffset()
           
 String getGridDefRecordId()
          Get the grid def record id
 double getLevel1()
          Get the first level of this GridRecord
 double getLevel2()
          Get the second level of this GridRecord
 int getLevelType1()
          Get the type for the first level of this GridRecord
 int getLevelType2()
          Get the type for the second level of this GridRecord
 String getParameterDescription()
          Get the parameter description
 String getParameterName()
          Get the parameter name
 int getParameterNumber()
           
 GribPds getPds()
           
 long getPdsOffset()
           
static String getProbabilityVariableNameSuffix(double lowerLimit, double upperLimit, int type)
           
 Date getReferenceTime()
          Get the first reference time of this GridRecord
 long getReferenceTimeInMsecs()
           
 int getStatisticalProcessType()
          Get interval type, GRIB-2 code table 4.10
 String getStatisticalProcessTypeName()
           
 String getStatisticalProcessTypeNameShort()
           
 int getSubCenter()
           
 int getTableVersion()
           
 String getTimeUdunitName()
          Get the time unit as a String.
 int getTimeUnit()
          Get the time unit as a code, which should be Grib2 table 4.4.
 String getTimeUnitName()
           
 Date getValidTime()
          Get the valid time for this record.
 boolean isBmsExists()
           
 boolean isInterval()
           
 String makeSuffix()
           
 void setBelongs(Object gv)
           
 String toString()
           
 String toString2()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GribGridRecord

public GribGridRecord()
default constructor, used by GribReadIndex (binary indices)

Method Detail

getPds

public GribPds getPds()

getEdition

public int getEdition()

getDiscipline

public int getDiscipline()

getCenter

public int getCenter()

getSubCenter

public int getSubCenter()

getTableVersion

public int getTableVersion()

getGdsOffset

public long getGdsOffset()

getPdsOffset

public long getPdsOffset()

getGdsKey

public int getGdsKey()

isBmsExists

public boolean isBmsExists()

getGridDefRecordId

public String getGridDefRecordId()
Description copied from interface: GridRecord
Get the grid def record id

Specified by:
getGridDefRecordId in interface GridRecord
Returns:
parameter name

getLevel1

public double getLevel1()
Get the first level of this GridRecord

Specified by:
getLevel1 in interface GridRecord
Returns:
the first level value

getLevel2

public double getLevel2()
Get the second level of this GridRecord

Specified by:
getLevel2 in interface GridRecord
Returns:
the second level value

getLevelType1

public int getLevelType1()
Get the type for the first level of this GridRecord

Specified by:
getLevelType1 in interface GridRecord
Returns:
level type

getLevelType2

public int getLevelType2()
Get the type for the second level of this GridRecord

Specified by:
getLevelType2 in interface GridRecord
Returns:
level type

getReferenceTime

public Date getReferenceTime()
Get the first reference time of this GridRecord

Specified by:
getReferenceTime in interface GridRecord
Returns:
reference time

getReferenceTimeInMsecs

public long getReferenceTimeInMsecs()

getValidTime

public Date getValidTime()
Get the valid time for this record.

Specified by:
getValidTime in interface GridRecord
Returns:
valid time

getParameterNumber

public int getParameterNumber()

getParameterName

public String getParameterName()
Get the parameter name

Specified by:
getParameterName in interface GridRecord
Returns:
parameter name

getParameterDescription

public String getParameterDescription()
Get the parameter description

Specified by:
getParameterDescription in interface GridRecord
Returns:
parameter description

getDecimalScale

public int getDecimalScale()
Get the decimal scale

Specified by:
getDecimalScale in interface GridRecord
Returns:
decimal scale

getTimeUdunitName

public String getTimeUdunitName()
Description copied from interface: GridRecord
Get the time unit as a String. Must be able to create a udunit like: String udunit = timeUnit + " since " + refDate So this assumes that any conversion factor is applied to the value

Specified by:
getTimeUdunitName in interface GridRecord
Returns:
the time unit as a String

getTimeUnitName

public String getTimeUnitName()

getTimeUnit

public int getTimeUnit()
Description copied from interface: GridRecord
Get the time unit as a code, which should be Grib2 table 4.4.

Specified by:
getTimeUnit in interface GridRecord
Returns:
the time unit as a code

cdmVariableHash

public int cdmVariableHash()
A hash code to group records into a CDM variable

Specified by:
cdmVariableHash in interface GridRecord
Returns:
group hash code

cdmVariableName

public String cdmVariableName(GridTableLookup lookup,
                              boolean useLevel,
                              boolean useStat)
A unique name for the CDM variable, must be consistent with cdmVariableHash

Specified by:
cdmVariableName in interface GridRecord
Returns:
unique CDM variable name

makeSuffix

public String makeSuffix()

getProbabilityVariableNameSuffix

public static String getProbabilityVariableNameSuffix(double lowerLimit,
                                                      double upperLimit,
                                                      int type)

isInterval

public boolean isInterval()

getStatisticalProcessTypeName

public String getStatisticalProcessTypeName()

getStatisticalProcessTypeNameShort

public String getStatisticalProcessTypeNameShort()

getStatisticalProcessType

public int getStatisticalProcessType()
Get interval type, GRIB-2 code table 4.10

Returns:
interval statistic type

toString2

public String toString2()

toString

public String toString()
Overrides:
toString in class Object

getBelongs

public Object getBelongs()

setBelongs

public void setBelongs(Object gv)


Copyright © 1999-2011 UCAR/Unidata. All Rights Reserved.