ucar.grib
Class GribGridRecord

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

public final class GribGridRecord
extends java.lang.Object
implements GridRecord

Represents index information for one record in the Grib file.


Field Summary
 boolean bmsExists
          bms (Bit mapped section) Exists of record.
 int category
          product definition template, param category, param number
 int center
          center subCenter table of record.
 int decimalScale
          decimalScale for Grib1 data.
 int discipline
          discipline (from indicator section)
 int ensembleNumber
          Ensemble number.
 int forecastTime
          forecastTime as int.
 int gdsKey
          gdsKey of record.
 int intervalStatType
           
 boolean isEnsemble
          is this record an Ensemble
 int levelType1
          levelType1, levelType2 of record.
 int levelType2
          levelType1, levelType2 of record.
 double levelValue1
          levelValue1, levelValue2 of record.
 double levelValue2
          levelValue1, levelValue2 of record.
 float lowerLimit
          lowerLimit, upperLimit of Probability type
 int numberForecasts
          numberForecasts of Ensemble.
 long offset1
          offset1 of record.
 long offset2
          offset2 of record.
 int paramNumber
          product definition template, param category, param number
 int productTemplate
          product definition template, param category, param number
 java.util.Date refTime
          refTime as Date
 int startOfInterval
          if forecast time is an interval, this is the start of the interval
 int subCenter
          center subCenter table of record.
 int table
          center subCenter table of record.
 int timeUnit
          time unit of forecast time
 int type
          Type of ensemble or Probablity forecast
 int typeGenProcess
          typeGenProcess of record.
 float upperLimit
          lowerLimit, upperLimit of Probability type
 
Constructor Summary
GribGridRecord()
          default constructor, used by GribReadIndex (binary indices)
 
Method Summary
 int getDecimalScale()
          Get the decimal scale
 int getEnsembleNumber()
          if ensemble, ensemble member number
 int getEnsembleType()
          if ensemble, ensemble type
 java.lang.String getGridDefRecordId()
          Get the grid def record id
 int getGridDefRecordIdInt()
          Get the grid def record id
 int getGridNumber()
          Get the grid number
 java.lang.String getIntervalTypeName()
           
 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
 int getNumberForecasts()
          total number of ensemble forecasts
 java.lang.String getParameterName()
          Get the parameter name
static java.lang.String getProbabilityVariableNameSuffix(float lowerLimit, float upperLimit, int type)
           
 java.util.Date getReferenceTime()
          Get the first reference time of this GridRecord
 java.util.Date getValidTime()
          Get the valid time for this record.
 int getValidTimeOffset()
          Get valid time offset (minutes) of this GridRecord
 boolean isEnsemble()
          is this an ensemble type record
 boolean isInterval()
           
 java.lang.String makeIntervalName()
          Makes an interval name for template between 8 and 15 inclusive.
 java.lang.String makeSuffix()
          Makes a Ensemble, Derived, Probability or error Suffix
 void setValidTime(java.util.Date t)
          Set the valid time for this record.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

discipline

public int discipline
discipline (from indicator section)


refTime

public java.util.Date refTime
refTime as Date


center

public int center
center subCenter table of record.


subCenter

public int subCenter
center subCenter table of record.


table

public int table
center subCenter table of record.


productTemplate

public int productTemplate
product definition template, param category, param number


category

public int category
product definition template, param category, param number


paramNumber

public int paramNumber
product definition template, param category, param number


typeGenProcess

public int typeGenProcess
typeGenProcess of record.


levelType1

public int levelType1
levelType1, levelType2 of record.


levelType2

public int levelType2
levelType1, levelType2 of record.


levelValue1

public double levelValue1
levelValue1, levelValue2 of record.


levelValue2

public double levelValue2
levelValue1, levelValue2 of record.


forecastTime

public int forecastTime
forecastTime as int. if forecast time is an interval, it's the end of the interval


startOfInterval

public int startOfInterval
if forecast time is an interval, this is the start of the interval


timeUnit

public int timeUnit
time unit of forecast time


decimalScale

public int decimalScale
decimalScale for Grib1 data.


isEnsemble

public boolean isEnsemble
is this record an Ensemble


ensembleNumber

public int ensembleNumber
Ensemble number.


numberForecasts

public int numberForecasts
numberForecasts of Ensemble.


type

public int type
Type of ensemble or Probablity forecast


lowerLimit

public float lowerLimit
lowerLimit, upperLimit of Probability type


upperLimit

public float upperLimit
lowerLimit, upperLimit of Probability type


intervalStatType

public int intervalStatType

bmsExists

public boolean bmsExists
bms (Bit mapped section) Exists of record.


gdsKey

public int gdsKey
gdsKey of record.


offset1

public long offset1
offset1 of record.


offset2

public long offset2
offset2 of record.

Constructor Detail

GribGridRecord

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

Method Detail

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 java.util.Date getReferenceTime()
Get the first reference time of this GridRecord

Specified by:
getReferenceTime in interface GridRecord
Returns:
reference time

getValidTime

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

Specified by:
getValidTime in interface GridRecord
Returns:
valid time

setValidTime

public void setValidTime(java.util.Date t)
Set the valid time for this record.

Parameters:
t - valid time

getValidTimeOffset

public int getValidTimeOffset()
Get valid time offset (minutes) of this GridRecord

Specified by:
getValidTimeOffset in interface GridRecord
Returns:
time offset

getParameterName

public java.lang.String getParameterName()
Get the parameter name

Specified by:
getParameterName in interface GridRecord
Returns:
parameter name

getGridDefRecordIdInt

public int getGridDefRecordIdInt()
Get the grid def record id

Returns:
parameter name

getGridDefRecordId

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

Specified by:
getGridDefRecordId in interface GridRecord
Returns:
parameter name

getGridNumber

public int getGridNumber()
Get the grid number

Returns:
grid number

getDecimalScale

public int getDecimalScale()
Get the decimal scale

Specified by:
getDecimalScale in interface GridRecord
Returns:
decimal scale

isEnsemble

public boolean isEnsemble()
is this an ensemble type record

Returns:
isEnsemble

getEnsembleType

public int getEnsembleType()
if ensemble, ensemble type

Returns:
type as int

getEnsembleNumber

public int getEnsembleNumber()
if ensemble, ensemble member number

Returns:
ensembleNumber

getNumberForecasts

public int getNumberForecasts()
total number of ensemble forecasts

Returns:
numberForecasts

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

makeIntervalName

public java.lang.String makeIntervalName()
Makes an interval name for template between 8 and 15 inclusive.

Returns:
interval name if there is one or an empty string

isInterval

public boolean isInterval()

getIntervalTypeName

public java.lang.String getIntervalTypeName()

makeSuffix

public java.lang.String makeSuffix()
Makes a Ensemble, Derived, Probability or error Suffix

Returns:
suffix as String

getProbabilityVariableNameSuffix

public static java.lang.String getProbabilityVariableNameSuffix(float lowerLimit,
                                                                float upperLimit,
                                                                int type)