ucar.grib.grib1
Class Grib1GDSVariables

java.lang.Object
  extended by ucar.grib.grib1.Grib1GDSVariables
All Implemented Interfaces:
GribGDSVariablesIF

public class Grib1GDSVariables
extends java.lang.Object
implements GribGDSVariablesIF


Field Summary
 
Fields inherited from interface ucar.grib.GribGDSVariablesIF
tenToNegSix, tenToNegThree, tenToSix, tenToThree
 
Constructor Summary
Grib1GDSVariables(byte[] input)
          Constructs a Grib2GDSVariables object from a byte[].
 
Method Summary
 float get80La1()
          octet 11-13.
 float get80Lo1()
          octet 14-16.
 int get80TypeGdsKey()
           
 int getAngle()
          octet 29-31.
 int getBasicAngle()
           
 float getDx()
          octet 24-25.
 float getDy()
          octet 26-27.
 float getEarthRadius()
          EarthRadius static for Grib1
 byte[] getGDSBytes()
          GDS as byte[]
 int getGdsKey()
          .
 int getGdtn()
          Get type of grid.
 int getGridCenter()
          octets 11-13 GridCenter.
 java.lang.String getGridUnits()
          GridUnits
 int getInt(int index)
          Converts byte to int.
 int getIolon()
          are extreme points in the quasi regular grid.
 float getLa1()
          octet 11-13.
 float getLa2()
          octet 18-20.
 float getLaD()
          .
 float getLap()
          octet 11-13.
 float getLatin1()
          octet 24-26.
 float getLatin2()
          octet 32-34.
 int getLength()
           
 float getLo1()
          octet 14-16.
 float getLo2()
          octet 21-23.
 float getLop()
          octet 14-16.
 float getLoV()
          octet 18-20.
 float getMajorAxis()
          MajorAxis static for Grib1
 float getMinorAxis()
          MinorAxis static for Grib1
 int getNp()
          octets 26-27
 float getNr()
          octet 32-34
 int getNumberPoints()
          number of data points .
 int getNV()
          octet 4 NV.
 int getNx()
          octet 7-8.
 int getNy()
          octet 9-10.
 int getOlon()
          olon > 0 is a quasi regular grid.
 int[] getParallels()
          Gets the number of points in each parallel for Quasi/Thin grids
 float getPoleLat()
          .
 float getPoleLon()
          .
 int getProjectionFlag()
          octet 27.
 int getPVorPL()
          octet 5 NV.
 int getResolution()
          octet 17.
 float getRotationAngle()
          .
 int getScanMode()
          octet 28.
 int getSection()
          Number of this section, should be 2.
 int getShape()
          .
 int getSource()
          source of grid definition.
 float getSpLat()
          octet 35-37.
 float getSpLon()
          octet 38-40.
 float getStretchingFactor()
          .
 int getSubDivisions()
          .
 int getUnscaledLa1()
          octet 11-13.
 int getUnscaledLo1()
          octet 14-16.
 double[] getVerticalPressureLevels()
           
 double[] getVerticalPressureLevels(double levelValue)
          get Vertical pressure levels
 float getXo()
          .
 float getXp()
          octet 24-25.
 float getYo()
          .
 float getYp()
          octet 26-27.
 boolean hasVerticalPressureLevels()
          hasVerticalLevels.
 boolean isThin()
          isThin.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Grib1GDSVariables

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

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

getGDSBytes

public byte[] getGDSBytes()
GDS as byte[]

Specified by:
getGDSBytes in interface GribGDSVariablesIF
Returns:
input as byte[]

getLength

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

getSection

public final int getSection()
Number of this section, should be 2.

Specified by:
getSection in interface GribGDSVariablesIF
Returns:
section as int

getNV

public final int getNV()
octet 4 NV.

Returns:
NV as int

getPVorPL

public final int getPVorPL()
octet 5 NV.

Returns:
PVorPL as int

isThin

public final boolean isThin()
isThin.

Returns:
isThin as boolean

hasVerticalPressureLevels

public final boolean hasVerticalPressureLevels()
hasVerticalLevels.

Returns:
hasVerticalLevels as boolean

getGdtn

public final int getGdtn()
Get type of grid.

Specified by:
getGdtn in interface GribGDSVariablesIF
Returns:
type of grid

getNx

public final int getNx()
octet 7-8.

Specified by:
getNx in interface GribGDSVariablesIF
Returns:
Number of points on x-axis or parallel as a int

getNy

public final int getNy()
octet 9-10.

Specified by:
getNy in interface GribGDSVariablesIF
Returns:
Number of points on y-axis or meridian as a int

getLap

public final float getLap()
octet 11-13.

Specified by:
getLap in interface GribGDSVariablesIF
Returns:
Lap as float

getLop

public final float getLop()
octet 14-16.

Specified by:
getLop in interface GribGDSVariablesIF
Returns:
Lop as float

getGridCenter

public final int getGridCenter()
octets 11-13 GridCenter.

Returns:
GridCenter

getLa1

public final float getLa1()
octet 11-13.

Specified by:
getLa1 in interface GribGDSVariablesIF
Returns:
La1 as float

getUnscaledLa1

public final int getUnscaledLa1()
octet 11-13. used in creating a gdsKey from ints

Returns:
La1 as int

get80La1

public final float get80La1()
octet 11-13.

Returns:
La1 as float

getLo1

public final float getLo1()
octet 14-16.

Specified by:
getLo1 in interface GribGDSVariablesIF
Returns:
Lo1 as float

getUnscaledLo1

public final int getUnscaledLo1()
octet 14-16. used in creating gdsKey from ints

Returns:
Lo1 as int

get80Lo1

public final float get80Lo1()
octet 14-16.

Returns:
Lo1 as float

getResolution

public final int getResolution()
octet 17.

Specified by:
getResolution in interface GribGDSVariablesIF
Returns:
Resolution as int

getLoV

public final float getLoV()
octet 18-20.

Specified by:
getLoV in interface GribGDSVariablesIF
Returns:
LoV as float

getLa2

public final float getLa2()
octet 18-20.

Specified by:
getLa2 in interface GribGDSVariablesIF
Returns:
La2 as float

getLo2

public final float getLo2()
octet 21-23.

Specified by:
getLo2 in interface GribGDSVariablesIF
Returns:
Lo2 as float

getDx

public final float getDx()
octet 24-25.

Specified by:
getDx in interface GribGDSVariablesIF
Returns:
Dx as float

getDy

public final float getDy()
octet 26-27.

Specified by:
getDy in interface GribGDSVariablesIF
Returns:
Dy as float

getXp

public final float getXp()
octet 24-25.

Specified by:
getXp in interface GribGDSVariablesIF
Returns:
Xp as float

getYp

public final float getYp()
octet 26-27.

Specified by:
getYp in interface GribGDSVariablesIF
Returns:
Yp as float

getProjectionFlag

public final int getProjectionFlag()
octet 27.

Specified by:
getProjectionFlag in interface GribGDSVariablesIF
Returns:
ProjectionFlag as int

getScanMode

public final int getScanMode()
octet 28.

Specified by:
getScanMode in interface GribGDSVariablesIF
Returns:
ScanMode as int

getAngle

public final int getAngle()
octet 29-31.

Specified by:
getAngle in interface GribGDSVariablesIF
Returns:
Angle as float

getNr

public final float getNr()
octet 32-34

Specified by:
getNr in interface GribGDSVariablesIF
Returns:
Nr as float

getLatin1

public final float getLatin1()
octet 24-26.

Specified by:
getLatin1 in interface GribGDSVariablesIF
Returns:
Latin1 as float

getLatin2

public final float getLatin2()
octet 32-34.

Specified by:
getLatin2 in interface GribGDSVariablesIF
Returns:
Latin2 as float

getSpLat

public final float getSpLat()
octet 35-37.

Specified by:
getSpLat in interface GribGDSVariablesIF
Returns:
SpLat as float

getSpLon

public final float getSpLon()
octet 38-40.

Specified by:
getSpLon in interface GribGDSVariablesIF
Returns:
SpLon as float

getGridUnits

public final java.lang.String getGridUnits()
GridUnits

Specified by:
getGridUnits in interface GribGDSVariablesIF
Returns:
GridUnits as String

getGdsKey

public final int getGdsKey()
Description copied from interface: GribGDSVariablesIF
.

Specified by:
getGdsKey in interface GribGDSVariablesIF
Returns:
gdsKey as int

get80TypeGdsKey

public final int get80TypeGdsKey()
Returns:
gdsKey as int

getMajorAxis

public final float getMajorAxis()
MajorAxis static for Grib1

Specified by:
getMajorAxis in interface GribGDSVariablesIF
Returns:
MajorAxis as float

getMinorAxis

public final float getMinorAxis()
MinorAxis static for Grib1

Specified by:
getMinorAxis in interface GribGDSVariablesIF
Returns:
MajorAxis as float

getEarthRadius

public final float getEarthRadius()
EarthRadius static for Grib1

Specified by:
getEarthRadius in interface GribGDSVariablesIF
Returns:
EarthRadius as float

getOlon

public final int getOlon()
olon > 0 is a quasi regular grid.

Specified by:
getOlon in interface GribGDSVariablesIF
Returns:
olon

getIolon

public final int getIolon()
are extreme points in the quasi regular grid.

Specified by:
getIolon in interface GribGDSVariablesIF
Returns:
iolon

getShape

public final int getShape()
Description copied from interface: GribGDSVariablesIF
.

Specified by:
getShape in interface GribGDSVariablesIF
Returns:
shape as a int

getSource

public final int getSource()
source of grid definition.

Specified by:
getSource in interface GribGDSVariablesIF
Returns:
source

getNumberPoints

public final int getNumberPoints()
number of data points .

Specified by:
getNumberPoints in interface GribGDSVariablesIF
Returns:
numberPoints

getBasicAngle

public final int getBasicAngle()
Returns:
BasicAngle as a int

getSubDivisions

public final int getSubDivisions()
Description copied from interface: GribGDSVariablesIF
.

Specified by:
getSubDivisions in interface GribGDSVariablesIF
Returns:
SubDivisions as a int

getLaD

public final float getLaD()
Description copied from interface: GribGDSVariablesIF
.

Specified by:
getLaD in interface GribGDSVariablesIF
Returns:
LaD as float

getNp

public final int getNp()
octets 26-27

Specified by:
getNp in interface GribGDSVariablesIF
Returns:
Np as a int

getXo

public final float getXo()
Description copied from interface: GribGDSVariablesIF
.

Specified by:
getXo in interface GribGDSVariablesIF
Returns:
Xo as float

getYo

public final float getYo()
Description copied from interface: GribGDSVariablesIF
.

Specified by:
getYo in interface GribGDSVariablesIF
Returns:
Yo as float

getRotationAngle

public final float getRotationAngle()
Description copied from interface: GribGDSVariablesIF
.

Specified by:
getRotationAngle in interface GribGDSVariablesIF
Returns:
RotationAngle as float

getPoleLat

public final float getPoleLat()
Description copied from interface: GribGDSVariablesIF
.

Specified by:
getPoleLat in interface GribGDSVariablesIF
Returns:
PoleLat as float

getPoleLon

public final float getPoleLon()
Description copied from interface: GribGDSVariablesIF
.

Specified by:
getPoleLon in interface GribGDSVariablesIF
Returns:
PoleLon as float

getStretchingFactor

public final float getStretchingFactor()
Description copied from interface: GribGDSVariablesIF
.

Specified by:
getStretchingFactor in interface GribGDSVariablesIF
Returns:
StretchingFactor as float

getParallels

public final int[] getParallels()
Gets the number of points in each parallel for Quasi/Thin grids

Returns:
parallels as int[]

getVerticalPressureLevels

public final double[] getVerticalPressureLevels(double levelValue)
get Vertical pressure levels


getVerticalPressureLevels

public final double[] getVerticalPressureLevels()

getInt

public final int getInt(int index)
Converts byte to int.

Parameters:
index - in the byte[] to convert
Returns:
int byte as int