ucar.grid
Class GridDefRecord

java.lang.Object
  extended by ucar.grid.GridDefRecord
Direct Known Subclasses:
GribGridDefRecord

public abstract class GridDefRecord
extends java.lang.Object

Class to represent the grid definition (projection) information purpose is to convert from String representation to native value.


Field Summary
static java.lang.String ANGLE
          Angle
static java.lang.String BASICANGLE
          BasicAngle
static boolean debug
           
static java.lang.String DX
          distance in X direction
static java.lang.String DY
          distance in Y direction
static java.lang.String GDS_KEY
          GDS key
static java.lang.String GRID_NAME
          grid name
static java.lang.String GRID_SHAPE
          GRID_SHAPE
static java.lang.String GRID_SHAPE_CODE
          GRID_SHAPE_CODE
static java.lang.String GRID_TYPE
          grid type
static java.lang.String GRID_UNITS
          grid spacing units (DX, DY)
static java.lang.String J
          J
static java.lang.String K
          K
static java.lang.String LA1
          La1
static java.lang.String LA2
          La2
static java.lang.String LAD
          LoD
static java.lang.String LAP
          Lap
static java.lang.String LATIN
          first lat
static java.lang.String LATIN1
          first lat
static java.lang.String LATIN2
          second lat
static java.lang.String LO1
          Lo1
static java.lang.String LO2
          Lo2
static java.lang.String LOP
          Lop
static java.lang.String LOV
          LoV
static java.lang.String M
          M
static java.lang.String MAJOR_AXIS_EARTH
          major axis of earth
static java.lang.String METHODNORM
          MethodNorm
static java.lang.String MINOR_AXIS_EARTH
          minor axis of earth
static java.lang.String MODEORDER
          ModeOrder
static java.lang.String NP
          Np
static java.lang.String NPPROJ
          North pole PROJ
static java.lang.String NR
          Nr
static java.lang.String NUMBERPARALLELS
          NumberParallels
static java.lang.String NX
          number of points in X direction (columns)
static java.lang.String NY
          number of points in Y direction (rows)
static java.lang.String PLAT
          pLat
static java.lang.String PLON
          pLon
static java.lang.String PROJ
          PROJ
static java.lang.String QUASI
          Quasi
static java.lang.String RADIUS_SPHERICAL_EARTH
          Radius of spherical earth
static java.lang.String RESOLUTION
          resolution
static java.lang.String ROTATIONANGLE
          RotationAngle
static java.lang.String SCANNING_MODE
          Scanning mode for the data
static java.lang.String SPLAT
          SpLat
static java.lang.String SPLON
          SpLon
static java.lang.String STRETCHINGFACTOR
          StretchingFactor
static int UNDEFINED
          UNDEFINED int value
static java.lang.String VECTOR_COMPONENT_FLAG
          resolution
static java.lang.String WIND_FLAG
          Deprecated. use Grib2Tables.VectorComponentFlag
static java.lang.String XO
          Xo
static java.lang.String XP
          Xp
static java.lang.String YO
          Yo
static java.lang.String YP
          Yp
 
Constructor Summary
GridDefRecord()
          constructors.
GridDefRecord(GribGDSVariablesIF gdsv)
           
GridDefRecord(java.lang.String paramsValues)
           
 
Method Summary
 void addParam(java.lang.String key, double value)
          adds a param and value.
 void addParam(java.lang.String key, java.lang.Double value)
          adds a param and value.
 void addParam(java.lang.String key, float value)
          adds a param and value.
 void addParam(java.lang.String key, int value)
          adds a param and value.
 void addParam(java.lang.String key, java.lang.Integer value)
          adds a param and value.
 void addParam(java.lang.String key, java.lang.String value)
          adds a param and value.
static boolean compare(GridDefRecord local, GridDefRecord other)
          Compare GridDefRecords, the numerics will use closeEnough so values that differ in 3 or 4th decimal places will return equal.
 double getDouble(java.lang.String key)
           
 GribGDSVariablesIF getGdsv()
           
abstract  java.lang.String getGroupName()
          Get a short name for this GDSKey for the netCDF group.
 int getInt(java.lang.String key)
           
 java.util.Set<java.lang.String> getKeys()
          get the keySet
 java.lang.String getParam(java.lang.String key)
          gets a param and value.
 double getParamDouble(java.lang.String key)
           
 int getParamInt(java.lang.String key)
           
 java.lang.String getParamsValues()
          get the hcs as a String of params values
 double readDouble(java.lang.String name)
          Deprecated. use getParamDouble(String key)
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debug

public static final boolean debug
See Also:
Constant Field Values

UNDEFINED

public static final int UNDEFINED
UNDEFINED int value

See Also:
Constant Field Values

GDS_KEY

public static final java.lang.String GDS_KEY
GDS key

See Also:
Constant Field Values

WIND_FLAG

public static final java.lang.String WIND_FLAG
Deprecated. use Grib2Tables.VectorComponentFlag
Wind flag

See Also:
Constant Field Values

NX

public static final java.lang.String NX
number of points in X direction (columns)

See Also:
Constant Field Values

NY

public static final java.lang.String NY
number of points in Y direction (rows)

See Also:
Constant Field Values

DX

public static final java.lang.String DX
distance in X direction

See Also:
Constant Field Values

DY

public static final java.lang.String DY
distance in Y direction

See Also:
Constant Field Values

RESOLUTION

public static final java.lang.String RESOLUTION
resolution

See Also:
Constant Field Values

VECTOR_COMPONENT_FLAG

public static final java.lang.String VECTOR_COMPONENT_FLAG
resolution

See Also:
Constant Field Values

LATIN

public static final java.lang.String LATIN
first lat

See Also:
Constant Field Values

LATIN1

public static final java.lang.String LATIN1
first lat

See Also:
Constant Field Values

LATIN2

public static final java.lang.String LATIN2
second lat

See Also:
Constant Field Values

LA1

public static final java.lang.String LA1
La1

See Also:
Constant Field Values

LO1

public static final java.lang.String LO1
Lo1

See Also:
Constant Field Values

LA2

public static final java.lang.String LA2
La2

See Also:
Constant Field Values

LO2

public static final java.lang.String LO2
Lo2

See Also:
Constant Field Values

LAD

public static final java.lang.String LAD
LoD

See Also:
Constant Field Values

LOV

public static final java.lang.String LOV
LoV

See Also:
Constant Field Values

LAP

public static final java.lang.String LAP
Lap

See Also:
Constant Field Values

LOP

public static final java.lang.String LOP
Lop

See Also:
Constant Field Values

PLAT

public static final java.lang.String PLAT
pLat

See Also:
Constant Field Values

PLON

public static final java.lang.String PLON
pLon

See Also:
Constant Field Values

SPLAT

public static final java.lang.String SPLAT
SpLat

See Also:
Constant Field Values

SPLON

public static final java.lang.String SPLON
SpLon

See Also:
Constant Field Values

ROTATIONANGLE

public static final java.lang.String ROTATIONANGLE
RotationAngle

See Also:
Constant Field Values

STRETCHINGFACTOR

public static final java.lang.String STRETCHINGFACTOR
StretchingFactor

See Also:
Constant Field Values

ANGLE

public static final java.lang.String ANGLE
Angle

See Also:
Constant Field Values

BASICANGLE

public static final java.lang.String BASICANGLE
BasicAngle

See Also:
Constant Field Values

XP

public static final java.lang.String XP
Xp

See Also:
Constant Field Values

YP

public static final java.lang.String YP
Yp

See Also:
Constant Field Values

XO

public static final java.lang.String XO
Xo

See Also:
Constant Field Values

YO

public static final java.lang.String YO
Yo

See Also:
Constant Field Values

NP

public static final java.lang.String NP
Np

See Also:
Constant Field Values

NR

public static final java.lang.String NR
Nr

See Also:
Constant Field Values

J

public static final java.lang.String J
J

See Also:
Constant Field Values

K

public static final java.lang.String K
K

See Also:
Constant Field Values

M

public static final java.lang.String M
M

See Also:
Constant Field Values

NUMBERPARALLELS

public static final java.lang.String NUMBERPARALLELS
NumberParallels

See Also:
Constant Field Values

METHODNORM

public static final java.lang.String METHODNORM
MethodNorm

See Also:
Constant Field Values

MODEORDER

public static final java.lang.String MODEORDER
ModeOrder

See Also:
Constant Field Values

PROJ

public static final java.lang.String PROJ
PROJ

See Also:
Constant Field Values

NPPROJ

public static final java.lang.String NPPROJ
North pole PROJ

See Also:
Constant Field Values

GRID_TYPE

public static final java.lang.String GRID_TYPE
grid type

See Also:
Constant Field Values

GRID_NAME

public static final java.lang.String GRID_NAME
grid name

See Also:
Constant Field Values

GRID_SHAPE_CODE

public static final java.lang.String GRID_SHAPE_CODE
GRID_SHAPE_CODE

See Also:
Constant Field Values

GRID_SHAPE

public static final java.lang.String GRID_SHAPE
GRID_SHAPE

See Also:
Constant Field Values

RADIUS_SPHERICAL_EARTH

public static final java.lang.String RADIUS_SPHERICAL_EARTH
Radius of spherical earth

See Also:
Constant Field Values

MAJOR_AXIS_EARTH

public static final java.lang.String MAJOR_AXIS_EARTH
major axis of earth

See Also:
Constant Field Values

MINOR_AXIS_EARTH

public static final java.lang.String MINOR_AXIS_EARTH
minor axis of earth

See Also:
Constant Field Values

QUASI

public static final java.lang.String QUASI
Quasi

See Also:
Constant Field Values

GRID_UNITS

public static final java.lang.String GRID_UNITS
grid spacing units (DX, DY)

See Also:
Constant Field Values

SCANNING_MODE

public static final java.lang.String SCANNING_MODE
Scanning mode for the data

See Also:
Constant Field Values
Constructor Detail

GridDefRecord

public GridDefRecord()
constructors.


GridDefRecord

public GridDefRecord(GribGDSVariablesIF gdsv)

GridDefRecord

public GridDefRecord(java.lang.String paramsValues)
Method Detail

addParam

public final void addParam(java.lang.String key,
                           java.lang.String value)
adds a param and value.

Parameters:
key - name of the param
value - of the param

addParam

public final void addParam(java.lang.String key,
                           int value)
adds a param and value.

Parameters:
key - name of the param
value - of the param

addParam

public final void addParam(java.lang.String key,
                           java.lang.Integer value)
adds a param and value.

Parameters:
key - name of the param
value - of the param

addParam

public final void addParam(java.lang.String key,
                           float value)
adds a param and value.

Parameters:
key - name of the param
value - of the param

addParam

public final void addParam(java.lang.String key,
                           double value)
adds a param and value.

Parameters:
key - name of the param
value - of the param

addParam

public final void addParam(java.lang.String key,
                           java.lang.Double value)
adds a param and value.

Parameters:
key - name of the param
value - of the param

getParam

public final java.lang.String getParam(java.lang.String key)
gets a param and value.

Parameters:
key - name of the param
Returns:
the value or null

getParamInt

public final int getParamInt(java.lang.String key)

getInt

public final int getInt(java.lang.String key)

getParamDouble

public final double getParamDouble(java.lang.String key)

getDouble

public final double getDouble(java.lang.String key)

getParamsValues

public java.lang.String getParamsValues()
get the hcs as a String of params values

Returns:
the hcs as a String of params values

getGroupName

public abstract java.lang.String getGroupName()
Get a short name for this GDSKey for the netCDF group. Subclasses should implement as a short description

Returns:
short name

getKeys

public final java.util.Set<java.lang.String> getKeys()
get the keySet

Returns:
the set of keys

readDouble

public final double readDouble(java.lang.String name)
Deprecated. use getParamDouble(String key)

returns the value of the param.

Parameters:
name - param name
Returns:
value, or NaN if value doest exist

getGdsv

public GribGDSVariablesIF getGdsv()

compare

public static boolean compare(GridDefRecord local,
                              GridDefRecord other)
Compare GridDefRecords, the numerics will use closeEnough so values that differ in 3 or 4th decimal places will return equal. This is being coded because the NDFD model dx differ in the 3 decimal place otherwise equal.