Package ucar.nc2.iosp.grid
Class GridDefRecord
- java.lang.Object
-
- ucar.nc2.iosp.grid.GridDefRecord
-
- Direct Known Subclasses:
McGridDefRecord,NavigationBlock
public abstract class GridDefRecord extends Object
Class to represent the grid definition (projection) information purpose is to convert from String representation to native value.
-
-
Field Summary
Fields Modifier and Type Field Description static StringANGLEAnglestatic StringBASICANGLEBasicAnglestatic booleandebugstatic StringDXdistance in X directionstatic StringDYdistance in Y directionstatic StringGDS_KEYGDS keystatic StringGRID_NAMEgrid namestatic StringGRID_SHAPEGRID_SHAPEstatic StringGRID_SHAPE_CODEGRID_SHAPE_CODEstatic StringGRID_TYPEgrid typestatic StringGRID_UNITSgrid spacing units (DX, DY)static StringJJstatic StringKKstatic StringLA1La1static StringLA2La2static StringLADLoDstatic StringLAPLapstatic StringLATINfirst latstatic StringLATIN1first latstatic StringLATIN2second latstatic StringLO1Lo1static StringLO2Lo2static StringLOPLopstatic StringLOVLoVstatic StringMMstatic StringMAJOR_AXIS_EARTHmajor axis of earthstatic StringMETHODNORMMethodNormstatic StringMINOR_AXIS_EARTHminor axis of earthstatic StringMODEORDERModeOrderstatic StringNPNpstatic StringNPPROJNorth pole PROJstatic StringNRNrstatic StringNUMBERPARALLELSNumberParallelsstatic StringNXnumber of points in X direction (columns)static StringNYnumber of points in Y direction (rows)static StringPLATpLatstatic StringPLONpLonstatic StringPROJPROJstatic StringQUASIQuasistatic StringRADIUS_SPHERICAL_EARTHRadius of spherical earthstatic StringRESOLUTIONresolutionstatic StringROTATIONANGLERotationAnglestatic StringSCANNING_MODEScanning mode for the datastatic StringSPLATSpLatstatic StringSPLONSpLonstatic StringSTRETCHINGFACTORStretchingFactorstatic intUNDEFINEDUNDEFINED int valuestatic StringVECTOR_COMPONENT_FLAGresolutionstatic StringWIND_FLAGDeprecated.use Grib2Tables.VectorComponentFlagstatic StringXOXostatic StringXPXpstatic StringYOYostatic StringYPYp
-
Constructor Summary
Constructors Constructor Description GridDefRecord()constructors.GridDefRecord(String paramsValues)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddParam(String key, double value)adds a param and value.voidaddParam(String key, float value)adds a param and value.voidaddParam(String key, int value)adds a param and value.voidaddParam(String key, Double value)adds a param and value.voidaddParam(String key, Integer value)adds a param and value.voidaddParam(String key, String value)adds a param and value.static booleancompare(GridDefRecord local, GridDefRecord other)Compare GridDefRecords, the numerics will use nearlyEquals so values that differ in 3 or 4th decimal places will return equal.doublegetDouble(String key)abstract StringgetGroupName()Get a short name for this GDSKey for the netCDF group.intgetInt(String key)Set<String>getKeys()get the keySetStringgetParam(String key)gets a param and value.doublegetParamDouble(String key)intgetParamInt(String key)StringgetParamsValues()get the hcs as a String of params valuesdoublereadDouble(String name)Deprecated.use getParamDouble(String key)
-
-
-
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 String GDS_KEY
GDS key- See Also:
- Constant Field Values
-
WIND_FLAG
public static final String WIND_FLAG
Deprecated.use Grib2Tables.VectorComponentFlagWind flag- See Also:
- Constant Field Values
-
NX
public static final String NX
number of points in X direction (columns)- See Also:
- Constant Field Values
-
NY
public static final String NY
number of points in Y direction (rows)- See Also:
- Constant Field Values
-
DX
public static final String DX
distance in X direction- See Also:
- Constant Field Values
-
DY
public static final String DY
distance in Y direction- See Also:
- Constant Field Values
-
RESOLUTION
public static final String RESOLUTION
resolution- See Also:
- Constant Field Values
-
VECTOR_COMPONENT_FLAG
public static final String VECTOR_COMPONENT_FLAG
resolution- See Also:
- Constant Field Values
-
LATIN
public static final String LATIN
first lat- See Also:
- Constant Field Values
-
LATIN1
public static final String LATIN1
first lat- See Also:
- Constant Field Values
-
LATIN2
public static final String LATIN2
second lat- See Also:
- Constant Field Values
-
LA1
public static final String LA1
La1- See Also:
- Constant Field Values
-
LO1
public static final String LO1
Lo1- See Also:
- Constant Field Values
-
LA2
public static final String LA2
La2- See Also:
- Constant Field Values
-
LO2
public static final String LO2
Lo2- See Also:
- Constant Field Values
-
LAD
public static final String LAD
LoD- See Also:
- Constant Field Values
-
LOV
public static final String LOV
LoV- See Also:
- Constant Field Values
-
LAP
public static final String LAP
Lap- See Also:
- Constant Field Values
-
LOP
public static final String LOP
Lop- See Also:
- Constant Field Values
-
PLAT
public static final String PLAT
pLat- See Also:
- Constant Field Values
-
PLON
public static final String PLON
pLon- See Also:
- Constant Field Values
-
SPLAT
public static final String SPLAT
SpLat- See Also:
- Constant Field Values
-
SPLON
public static final String SPLON
SpLon- See Also:
- Constant Field Values
-
ROTATIONANGLE
public static final String ROTATIONANGLE
RotationAngle- See Also:
- Constant Field Values
-
STRETCHINGFACTOR
public static final String STRETCHINGFACTOR
StretchingFactor- See Also:
- Constant Field Values
-
ANGLE
public static final String ANGLE
Angle- See Also:
- Constant Field Values
-
BASICANGLE
public static final String BASICANGLE
BasicAngle- See Also:
- Constant Field Values
-
XP
public static final String XP
Xp- See Also:
- Constant Field Values
-
YP
public static final String YP
Yp- See Also:
- Constant Field Values
-
XO
public static final String XO
Xo- See Also:
- Constant Field Values
-
YO
public static final String YO
Yo- See Also:
- Constant Field Values
-
NP
public static final String NP
Np- See Also:
- Constant Field Values
-
NR
public static final String NR
Nr- See Also:
- Constant Field Values
-
J
public static final String J
J- See Also:
- Constant Field Values
-
K
public static final String K
K- See Also:
- Constant Field Values
-
M
public static final String M
M- See Also:
- Constant Field Values
-
NUMBERPARALLELS
public static final String NUMBERPARALLELS
NumberParallels- See Also:
- Constant Field Values
-
METHODNORM
public static final String METHODNORM
MethodNorm- See Also:
- Constant Field Values
-
MODEORDER
public static final String MODEORDER
ModeOrder- See Also:
- Constant Field Values
-
PROJ
public static final String PROJ
PROJ- See Also:
- Constant Field Values
-
NPPROJ
public static final String NPPROJ
North pole PROJ- See Also:
- Constant Field Values
-
GRID_TYPE
public static final String GRID_TYPE
grid type- See Also:
- Constant Field Values
-
GRID_NAME
public static final String GRID_NAME
grid name- See Also:
- Constant Field Values
-
GRID_SHAPE_CODE
public static final String GRID_SHAPE_CODE
GRID_SHAPE_CODE- See Also:
- Constant Field Values
-
GRID_SHAPE
public static final String GRID_SHAPE
GRID_SHAPE- See Also:
- Constant Field Values
-
RADIUS_SPHERICAL_EARTH
public static final String RADIUS_SPHERICAL_EARTH
Radius of spherical earth- See Also:
- Constant Field Values
-
MAJOR_AXIS_EARTH
public static final String MAJOR_AXIS_EARTH
major axis of earth- See Also:
- Constant Field Values
-
MINOR_AXIS_EARTH
public static final String MINOR_AXIS_EARTH
minor axis of earth- See Also:
- Constant Field Values
-
QUASI
public static final String QUASI
Quasi- See Also:
- Constant Field Values
-
GRID_UNITS
public static final String GRID_UNITS
grid spacing units (DX, DY)- See Also:
- Constant Field Values
-
SCANNING_MODE
public static final String SCANNING_MODE
Scanning mode for the data- See Also:
- Constant Field Values
-
-
Constructor Detail
-
GridDefRecord
public GridDefRecord()
constructors.
-
GridDefRecord
public GridDefRecord(String paramsValues)
-
-
Method Detail
-
addParam
public final void addParam(String key, String value)
adds a param and value.- Parameters:
key- name of the paramvalue- of the param
-
addParam
public final void addParam(String key, int value)
adds a param and value.- Parameters:
key- name of the paramvalue- of the param
-
addParam
public final void addParam(String key, Integer value)
adds a param and value.- Parameters:
key- name of the paramvalue- of the param
-
addParam
public final void addParam(String key, float value)
adds a param and value.- Parameters:
key- name of the paramvalue- of the param
-
addParam
public final void addParam(String key, double value)
adds a param and value.- Parameters:
key- name of the paramvalue- of the param
-
addParam
public final void addParam(String key, Double value)
adds a param and value.- Parameters:
key- name of the paramvalue- of the param
-
getParam
public final String getParam(String key)
gets a param and value.- Parameters:
key- name of the param- Returns:
- the value or null
-
getParamInt
public final int getParamInt(String key)
-
getInt
public final int getInt(String key)
-
getParamDouble
public final double getParamDouble(String key)
-
getDouble
public final double getDouble(String key)
-
getParamsValues
public String getParamsValues()
get the hcs as a String of params values- Returns:
- the hcs as a String of params values
-
getGroupName
public abstract String getGroupName()
Get a short name for this GDSKey for the netCDF group. Subclasses should implement as a short description- Returns:
- short name
-
readDouble
public final double readDouble(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
-
compare
public static boolean compare(GridDefRecord local, GridDefRecord other)
Compare GridDefRecords, the numerics will use nearlyEquals 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.
-
-