ucar.grib.grib1
Class Grib1Pds

java.lang.Object
  extended by ucar.grib.GribPds
      extended by ucar.grib.grib1.Grib1Pds

@Immutable
public final class Grib1Pds
extends GribPds

A class representing the product definition section (PDS) of a GRIB-1 product. This is section 1 of a Grib record that contains information about the parameter


Field Summary
 
Fields inherited from class ucar.grib.GribPds
input
 
Constructor Summary
Grib1Pds(byte[] input)
          Constructs Grib1PDSVariables from a byte[].
Grib1Pds(byte[] input, Calendar cal)
          Constructs Grib1PDSVariables from a byte[].
 
Method Summary
 boolean bmsExists()
          Check if BMS exists.
 boolean gdsExists()
          Check if GDS exists
 int getCenter()
          Center see table 0
 int getDecimalScale()
          Get the exponent of the decimal scale used for all data values.
 float getEastLongitude()
          Eastern Longitude
 int getEcmwfClass()
          Class
 int getExtension()
           
 Date getForecastDate()
          Forecast time as a Date
 int getForecastTime()
          Get the time of the forecast.
 int[] getForecastTimeInterval()
          Get the time interval of the forecast.
 int[] getForecastTimeInterval(int wantTimeUnit)
           
 int getGenProcessId()
          Generating Process Id, see Table A, assigned by originating center
 int getGridId()
          Grid ID see Table B
 int getID()
          ID of ensemble
 long getIntervalTimeEnd()
          Grib-2 encodes an "end of overall time interval" .
 int getLength()
           
 String getLevelName()
           
 int getLevelType1()
          Get the numeric type for 1st level, see Table 3 and 3a
 int getLevelType2()
          Get the numeric type for 2nd level.
 double getLevelValue1()
          Get the numeric value for this level, see Table 3
 double getLevelValue2()
          Get value 2 (if it exists) for this level.
 int[] getMembership()
          Membership
 int getMethod()
          Method
 float getNorthLatitude()
          Northern latitude
 int getNumberClusters()
          number Clusters
 int getNumberEnsembleForecasts()
           
 int getNumberForecasts()
          number members / forecasts
 int getNumberIncludedInAverage()
          Number Included In Average, octet 22 & 23
 int getNumberMissingInAverage()
          Number Missing In Average, octet 24
 int getP1()
          Period of time, octet 19 in units of getTimeRangeUnit()
 int getP2()
          P2 - octet 20 - Period of time or time interval in units of getTimeRangeUnit()
 int getParameterNumber()
          Get the number of the parameter, see Table 2
 int getParameterTableVersion()
          gets the Table version as a int.
 int getPercentileValue()
           
 int getPerturbationNumber()
           
 int getPerturbationType()
           
 double getProbabilityLowerLimit()
           
 int getProbabilityProduct()
          Product of ensemble
 int getProbabilityType()
          Product type of probability
 double getProbabilityUpperLimit()
           
 int getProductID()
          Product of ensemble
 long getReferenceTime()
          gets reference time as a long millis.
 int getSection()
          Number PDS section .
 int getSizeClusters()
          size Clusters
 float getSouthLatitude()
          Southern latitude
 int getSpatialorProbability()
          Spatial Identifier or Probability of ensemble
 int getStatisticalProcessType()
          Get Grib-2 Statistic Type (Table 4-10) by converting Grib-1 Table 5
 int getStream()
          Stream.
 int getSubCenter()
          SubCenter, allocated by center (Table C)
 int getTimeRangeIndicator()
          Time Range indicator - octet 21 (see Table 5)
 int getTimeUnit()
          octet 18 Forecast time unit, see Table 4
 int getType()
           
 float getValueLowerLimit()
          lower limit of probability
 float getValueUpperLimit()
          upper limit of probability
 float getWestLongitude()
          Western Longitude
 boolean isEnsemble()
          NCEP Appendix C Manual 388 http://www.nco.ncep.noaa.gov/pmb/docs/on388/appendixc.html states that if the PDS is > 28 bytes and octet 41 == 1 then it's an ensemble an product.
 boolean isEnsembleDerived()
           
 boolean isInterval()
          Is this a time interval.
 boolean isPercentile()
           
 boolean isProbability()
           
 
Methods inherited from class ucar.grib.GribPds
factory, getOctet, getPDSBytes, getReferenceDate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Grib1Pds

public Grib1Pds(byte[] input)
         throws IOException
Constructs Grib1PDSVariables from a byte[].

Parameters:
input - PDS
Throws:
IOException - byte[] read

Grib1Pds

public Grib1Pds(byte[] input,
                Calendar cal)
         throws IOException
Constructs Grib1PDSVariables from a byte[].

Parameters:
input - PDS
cal - use this calendar to set the date
Throws:
IOException - byte[] read
Method Detail

getSection

public final int getSection()
Number PDS section .


getLength

public final int getLength()

getParameterTableVersion

public final int getParameterTableVersion()
gets the Table version as a int.

Returns:
table_version

getCenter

public final int getCenter()
Center see table 0

Returns:
center_id

getGenProcessId

public final int getGenProcessId()
Generating Process Id, see Table A, assigned by originating center

Specified by:
getGenProcessId in class GribPds
Returns:
Generating Process code

getGridId

public final int getGridId()
Grid ID see Table B

Returns:
grid_id

gdsExists

public final boolean gdsExists()
Check if GDS exists

Returns:
true, if GDS exists

bmsExists

public final boolean bmsExists()
Check if BMS exists.

Returns:
true, if BMS exists

getParameterNumber

public final int getParameterNumber()
Get the number of the parameter, see Table 2

Specified by:
getParameterNumber in class GribPds
Returns:
index number of parameter in table

getLevelType1

public final int getLevelType1()
Get the numeric type for 1st level, see Table 3 and 3a

Specified by:
getLevelType1 in class GribPds
Returns:
type of level (height or pressure)

getLevelName

public final String getLevelName()

getLevelValue1

public final double getLevelValue1()
Get the numeric value for this level, see Table 3

Specified by:
getLevelValue1 in class GribPds
Returns:
int level value

getLevelType2

public final int getLevelType2()
Get the numeric type for 2nd level.

Specified by:
getLevelType2 in class GribPds
Returns:
type of level always 255, Grib1 doesn't have type 2nd level

getLevelValue2

public final double getLevelValue2()
Get value 2 (if it exists) for this level.

Specified by:
getLevelValue2 in class GribPds
Returns:
int level value

getReferenceTime

public final long getReferenceTime()
gets reference time as a long millis.

Specified by:
getReferenceTime in class GribPds
Returns:
refTime

getTimeUnit

public final int getTimeUnit()
octet 18 Forecast time unit, see Table 4

Specified by:
getTimeUnit in class GribPds
Returns:
int time unit index

getP1

public final int getP1()
Period of time, octet 19 in units of getTimeRangeUnit()

Returns:
P1

getP2

public final int getP2()
P2 - octet 20 - Period of time or time interval in units of getTimeRangeUnit()

Returns:
P2

getTimeRangeIndicator

public final int getTimeRangeIndicator()
Time Range indicator - octet 21 (see Table 5)

Returns:
Time Range indicator

getForecastDate

public final Date getForecastDate()
Description copied from class: GribPds
Forecast time as a Date

Specified by:
getForecastDate in class GribPds
Returns:
Forecast Date

getForecastTime

public final int getForecastTime()
Get the time of the forecast.

Specified by:
getForecastTime in class GribPds
Returns:
date and time

isInterval

public final boolean isInterval()
Description copied from class: GribPds
Is this a time interval. If so, then coordinate is a range [min, max]. Otherwise coord is assumed to be a point (instance) in time.

Specified by:
isInterval in class GribPds
Returns:
if time interval

getIntervalTimeEnd

public long getIntervalTimeEnd()
Description copied from class: GribPds
Grib-2 encodes an "end of overall time interval" . Grib-1 return < 0.

Specified by:
getIntervalTimeEnd in class GribPds
Returns:
end of overall time interval

getForecastTimeInterval

public int[] getForecastTimeInterval()
Get the time interval of the forecast.

Specified by:
getForecastTimeInterval in class GribPds
Returns:
interval as int[2]

getForecastTimeInterval

public int[] getForecastTimeInterval(int wantTimeUnit)
Specified by:
getForecastTimeInterval in class GribPds

getStatisticalProcessType

public int getStatisticalProcessType()
Get Grib-2 Statistic Type (Table 4-10) by converting Grib-1 Table 5

Specified by:
getStatisticalProcessType in class GribPds
Returns:
Grib-2 Statistic Type (Table 4-10)

getNumberIncludedInAverage

public final int getNumberIncludedInAverage()
Number Included In Average, octet 22 & 23

Returns:
Number Included In Average

getNumberMissingInAverage

public final int getNumberMissingInAverage()
Number Missing In Average, octet 24

Returns:
Number Missing In Average

getSubCenter

public final int getSubCenter()
SubCenter, allocated by center (Table C)

Returns:
subCenter

getDecimalScale

public final int getDecimalScale()
Get the exponent of the decimal scale used for all data values.

Returns:
exponent of decimal scale

getExtension

public final int getExtension()

getEcmwfClass

public final int getEcmwfClass()
Class

Returns:
Class

getID

public final int getID()
ID of ensemble

Returns:
ID

getStream

public final int getStream()
Stream.

Returns:
Stream.

getProductID

public final int getProductID()
Product of ensemble

Returns:
ID

getSpatialorProbability

public final int getSpatialorProbability()
Spatial Identifier or Probability of ensemble

Returns:
ID

getProbabilityProduct

public final int getProbabilityProduct()
Product of ensemble

Returns:
ID

getProbabilityType

public final int getProbabilityType()
Product type of probability

Specified by:
getProbabilityType in class GribPds
Returns:
ID

isPercentile

public boolean isPercentile()
Specified by:
isPercentile in class GribPds

getPercentileValue

public int getPercentileValue()
Specified by:
getPercentileValue in class GribPds

isEnsemble

public final boolean isEnsemble()
NCEP Appendix C Manual 388 http://www.nco.ncep.noaa.gov/pmb/docs/on388/appendixc.html states that if the PDS is > 28 bytes and octet 41 == 1 then it's an ensemble an product.

Specified by:
isEnsemble in class GribPds
Returns:
true if this is an ensemble

getPerturbationType

public final int getPerturbationType()
Specified by:
getPerturbationType in class GribPds

getPerturbationNumber

public final int getPerturbationNumber()
Specified by:
getPerturbationNumber in class GribPds

getNumberEnsembleForecasts

public int getNumberEnsembleForecasts()
Specified by:
getNumberEnsembleForecasts in class GribPds

isEnsembleDerived

public boolean isEnsembleDerived()
Specified by:
isEnsembleDerived in class GribPds

isProbability

public boolean isProbability()
Specified by:
isProbability in class GribPds

getProbabilityLowerLimit

public double getProbabilityLowerLimit()
Specified by:
getProbabilityLowerLimit in class GribPds

getProbabilityUpperLimit

public double getProbabilityUpperLimit()
Specified by:
getProbabilityUpperLimit in class GribPds

getType

public final int getType()

getValueLowerLimit

public final float getValueLowerLimit()
lower limit of probability

Returns:
ID

getValueUpperLimit

public final float getValueUpperLimit()
upper limit of probability

Returns:
ID

getNumberForecasts

public final int getNumberForecasts()
number members / forecasts

Returns:
ID

getSizeClusters

public final int getSizeClusters()
size Clusters

Returns:
ID

getNumberClusters

public final int getNumberClusters()
number Clusters

Returns:
Number

getMethod

public final int getMethod()
Method

Returns:
Method

getNorthLatitude

public final float getNorthLatitude()
Northern latitude

Returns:
Northern latitude

getSouthLatitude

public final float getSouthLatitude()
Southern latitude

Returns:
Southern latitude

getEastLongitude

public final float getEastLongitude()
Eastern Longitude

Returns:
Eastern Longitude

getWestLongitude

public final float getWestLongitude()
Western Longitude

Returns:
Western Longitude

getMembership

public final int[] getMembership()
Membership

Returns:
Membership


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