ucar.grib.grib2
Class Grib2PDSVariables

java.lang.Object
  extended by ucar.grib.grib2.Grib2PDSVariables
All Implemented Interfaces:
GribPDSVariablesIF

public final class Grib2PDSVariables
extends java.lang.Object
implements GribPDSVariablesIF

Representing the product definition section (PDS) of a GRIB product as variables extracted from a byte[]. This is section 4 of a Grib record that contains information about the parameter


Constructor Summary
Grib2PDSVariables(byte[] input)
          Constructs a Grib2PDSVariables object from a byte[].
 
Method Summary
 int calculateForecast(int idx, int forecastTime)
          calculateForecast.
 int getAnalysisGenProcess()
          analysisGenProcess.
 int getBackGenProcess()
          backGenProcess.
 int getChemicalType()
          ChemicalType.
 int getCoordinates()
          Number of this coordinates.
 long getEndTimeInterval()
          End Time Interval for productDefinition 8-14, 42 and 43 type variables.
 int getForecastPercentile()
          ForecastPercentile.
 int getForecastProbability()
          ForecastProbability.
 int getForecastTime()
          forecastTime.
 int[] getForecastTimeInterval()
          forecastTimeInterval for accumulation type variables.
 int getHoursAfter()
          hoursAfter.
 int getIntervalStatType()
           
 int getLength()
           
 int getMinutesAfter()
          minutesAfter.
 int getNB()
          Number Bands for Satellite.
 int getNumberForecasts()
          number of forecasts.
 int getObservationProcess()
          ObservationProcess.
 int getParameterCategory()
          parameter Category .
 int getParameterNumber()
          parameter Number.
 byte[] getPDSBytes()
          PDS as byte[]
 int getPerturbation()
          Perturbation number
 int getProductDefinition()
          productDefinition.
 int[] getSatellite()
          Satellite number.
 int[] getSatelliteInstrument()
          Satellite Instrument.
 int[] getSatelliteSeries()
          SatelliteSeries.
 float[] getSatelliteWave()
          Satellite Wave.
 int getSection()
          octet 5 Number of this section, should be 4.
 int getTimeRangeUnit()
          returns timeRangeUnit .
 int getType()
          Type of Derived Code table 4.7.
 int getTypeFirstFixedSurface()
          typeFirstFixedSurface.
 int getTypeGenProcess()
          type of Generating Process.
 int getTypeSecondFixedSurface()
          typeSecondFixedSurface.
 float getValueFirstFixedSurface()
          FirstFixedSurfaceValue
 float getValueLowerLimit()
          ValueLowerLimit
 float getValueSecondFixedSurface()
          SecondFixedSurfaceValue
 float getValueUpperLimit()
          ValueUpperLimit
 boolean isEnsemble()
          Ensemble type data.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Grib2PDSVariables

public Grib2PDSVariables(byte[] input)
                  throws java.io.IOException
Constructs a Grib2PDSVariables object from a byte[].

Parameters:
input - PDS
Throws:
java.io.IOException - if raf contains no valid GRIB file
Method Detail

getPDSBytes

public byte[] getPDSBytes()
PDS as byte[]

Specified by:
getPDSBytes in interface GribPDSVariablesIF
Returns:
PDS bytes

getLength

public final int getLength()
Specified by:
getLength in interface GribPDSVariablesIF

getSection

public final int getSection()
octet 5 Number of this section, should be 4.

Specified by:
getSection in interface GribPDSVariablesIF
Returns:
section number

getCoordinates

public final int getCoordinates()
Number of this coordinates.

Specified by:
getCoordinates in interface GribPDSVariablesIF
Returns:
Coordinates number

getProductDefinition

public final int getProductDefinition()
productDefinition.

Specified by:
getProductDefinition in interface GribPDSVariablesIF
Returns:
ProductDefinition

getParameterCategory

public final int getParameterCategory()
parameter Category .

Specified by:
getParameterCategory in interface GribPDSVariablesIF
Returns:
parameterCategory as int

getParameterNumber

public final int getParameterNumber()
parameter Number.

Specified by:
getParameterNumber in interface GribPDSVariablesIF
Returns:
ParameterNumber

getTypeGenProcess

public final int getTypeGenProcess()
type of Generating Process.

Specified by:
getTypeGenProcess in interface GribPDSVariablesIF
Returns:
GenProcess

getChemicalType

public final int getChemicalType()
ChemicalType.

Specified by:
getChemicalType in interface GribPDSVariablesIF
Returns:
ChemicalType

getBackGenProcess

public final int getBackGenProcess()
backGenProcess.

Specified by:
getBackGenProcess in interface GribPDSVariablesIF
Returns:
BackGenProcess

getObservationProcess

public final int getObservationProcess()
ObservationProcess.

Specified by:
getObservationProcess in interface GribPDSVariablesIF
Returns:
ObservationProcess

getNB

public final int getNB()
Number Bands for Satellite.

Specified by:
getNB in interface GribPDSVariablesIF
Returns:
NB

getSatelliteSeries

public final int[] getSatelliteSeries()
SatelliteSeries.

Returns:
series

getSatellite

public final int[] getSatellite()
Satellite number.

Returns:
satellite

getSatelliteInstrument

public final int[] getSatelliteInstrument()
Satellite Instrument.

Returns:
instrument

getSatelliteWave

public final float[] getSatelliteWave()
Satellite Wave.

Returns:
ss2

getAnalysisGenProcess

public final int getAnalysisGenProcess()
analysisGenProcess.

Specified by:
getAnalysisGenProcess in interface GribPDSVariablesIF
Returns:
analysisGenProcess

getHoursAfter

public final int getHoursAfter()
hoursAfter.

Specified by:
getHoursAfter in interface GribPDSVariablesIF
Returns:
HoursAfter

getMinutesAfter

public final int getMinutesAfter()
minutesAfter.

Specified by:
getMinutesAfter in interface GribPDSVariablesIF
Returns:
MinutesAfter

getTimeRangeUnit

public final int getTimeRangeUnit()
returns timeRangeUnit .

Specified by:
getTimeRangeUnit in interface GribPDSVariablesIF
Returns:
TimeRangeUnitName

getForecastTime

public final int getForecastTime()
forecastTime.

Specified by:
getForecastTime in interface GribPDSVariablesIF
Returns:
ForecastTime

calculateForecast

public final int calculateForecast(int idx,
                                   int forecastTime)
calculateForecast.

Parameters:
idx - where to start in the byte[]
forecastTime - initial forecast time
Returns:
calculateForecast as int

getForecastTimeInterval

public final int[] getForecastTimeInterval()
forecastTimeInterval for accumulation type variables.

Returns:
ForecastTimeInterval int[] start, end of interval

getEndTimeInterval

public final long getEndTimeInterval()
End Time Interval for productDefinition 8-14, 42 and 43 type variables.

Returns:
EndTimeInterval long

getTypeFirstFixedSurface

public final int getTypeFirstFixedSurface()
typeFirstFixedSurface.

Specified by:
getTypeFirstFixedSurface in interface GribPDSVariablesIF
Returns:
FirstFixedSurface as int

getValueFirstFixedSurface

public float getValueFirstFixedSurface()
FirstFixedSurfaceValue

Specified by:
getValueFirstFixedSurface in interface GribPDSVariablesIF
Returns:
float FirstFixedSurfaceValue

getTypeSecondFixedSurface

public final int getTypeSecondFixedSurface()
typeSecondFixedSurface.

Specified by:
getTypeSecondFixedSurface in interface GribPDSVariablesIF
Returns:
SecondFixedSurface as int

getValueSecondFixedSurface

public float getValueSecondFixedSurface()
SecondFixedSurfaceValue

Specified by:
getValueSecondFixedSurface in interface GribPDSVariablesIF
Returns:
float SecondFixedSurfaceValue

isEnsemble

public final boolean isEnsemble()
Ensemble type data.

Returns:
ensemble type of data

getType

public final int getType()
Type of Derived Code table 4.7. Type of Ensemble code table 4.6 Type of Probability code table 4.9

Specified by:
getType in interface GribPDSVariablesIF
Returns:
int Type Derived, Ensemble, or Probability

getForecastProbability

public final int getForecastProbability()
ForecastProbability.

Specified by:
getForecastProbability in interface GribPDSVariablesIF
Returns:
int ForecastProbability

getForecastPercentile

public final int getForecastPercentile()
ForecastPercentile.

Specified by:
getForecastPercentile in interface GribPDSVariablesIF
Returns:
int ForecastPercentile

getPerturbation

public final int getPerturbation()
Perturbation number

Specified by:
getPerturbation in interface GribPDSVariablesIF
Returns:
int Perturbation

getNumberForecasts

public final int getNumberForecasts()
number of forecasts.

Specified by:
getNumberForecasts in interface GribPDSVariablesIF
Returns:
int

getValueLowerLimit

public final float getValueLowerLimit()
ValueLowerLimit

Specified by:
getValueLowerLimit in interface GribPDSVariablesIF
Returns:
float ValueLowerLimit

getValueUpperLimit

public final float getValueUpperLimit()
ValueUpperLimit

Specified by:
getValueUpperLimit in interface GribPDSVariablesIF
Returns:
float ValueUpperLimit

getIntervalStatType

public int getIntervalStatType()