Package ucar.nc2.iosp.gempak
Class GempakGridRecord
- java.lang.Object
-
- ucar.nc2.iosp.gempak.GempakGridRecord
-
- All Implemented Interfaces:
GridRecord
public class GempakGridRecord extends Object implements GridRecord
A class to hold grid record information
-
-
Field Summary
Fields Modifier and Type Field Description int
gridNumber
grid numberint
ivcord
coordinate typeint
level1
Level 1int
level2
Level 2NavigationBlock
navBlock
packing typeint
packingType
packing typeString
param
parameterString
time1
Time 1String
time2
Time 2
-
Constructor Summary
Constructors Constructor Description GempakGridRecord(int number, int[] header)
Create a grid header from the integer bits
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
cdmVariableHash()
A hash code to group records into a CDM variableString
cdmVariableName(GridTableLookup lookup, boolean useLevel, boolean useStat)
A unique name for the CDM variable, must be consistent with cdmVariableHashint
getDecimalScale()
Get the decimal scaleString
getGridDefRecordId()
Get the grid def record idint
getGridNumber()
Get the grid numberdouble
getLevel1()
Get the first level of this GridRecorddouble
getLevel2()
Get the second level of this GridRecordint
getLevelType1()
Get the type for the first level of this GridRecordint
getLevelType2()
Get the type for the second level of this GridRecordString
getParameterDescription()
Get the parameter descriptionString
getParameterName()
Get the parameter nameDate
getReferenceTime()
Get the first reference time of this GridRecordString
getTimeUdunitName()
Get the time unit as a String.int
getTimeUnit()
Get the time unit as a code, which should be Grib2 table 4.4.Date
getValidTime()
Get the valid time for this grid.int
getValidTimeOffset()
Get valid time offset (minutes) of this GridRecordString
toString()
Get a String representation of this object
-
-
-
Field Detail
-
time1
public String time1
Time 1
-
time2
public String time2
Time 2
-
level1
public int level1
Level 1
-
level2
public int level2
Level 2
-
ivcord
public int ivcord
coordinate type
-
param
public String param
parameter
-
gridNumber
public int gridNumber
grid number
-
packingType
public int packingType
packing type
-
navBlock
public NavigationBlock navBlock
packing type
-
-
Method Detail
-
getLevel1
public double getLevel1()
Get the first level of this GridRecord- Specified by:
getLevel1
in interfaceGridRecord
- Returns:
- the first level value
-
getLevel2
public double getLevel2()
Get the second level of this GridRecord- Specified by:
getLevel2
in interfaceGridRecord
- Returns:
- the second level value
-
getLevelType1
public int getLevelType1()
Get the type for the first level of this GridRecord- Specified by:
getLevelType1
in interfaceGridRecord
- Returns:
- level type
-
getLevelType2
public int getLevelType2()
Get the type for the second level of this GridRecord- Specified by:
getLevelType2
in interfaceGridRecord
- Returns:
- level type
-
getReferenceTime
public Date getReferenceTime()
Get the first reference time of this GridRecord- Specified by:
getReferenceTime
in interfaceGridRecord
- Returns:
- reference time
-
getValidTime
public Date getValidTime()
Get the valid time for this grid.- Specified by:
getValidTime
in interfaceGridRecord
- Returns:
- valid time
-
getValidTimeOffset
public int getValidTimeOffset()
Get valid time offset (minutes) of this GridRecord- Returns:
- time offset
-
getParameterName
public String getParameterName()
Get the parameter name- Specified by:
getParameterName
in interfaceGridRecord
- Returns:
- parameter name
-
getParameterDescription
public String getParameterDescription()
Get the parameter description- Specified by:
getParameterDescription
in interfaceGridRecord
- Returns:
- parameter description
-
getGridDefRecordId
public String getGridDefRecordId()
Get the grid def record id- Specified by:
getGridDefRecordId
in interfaceGridRecord
- Returns:
- parameter name
-
getGridNumber
public int getGridNumber()
Get the grid number- Returns:
- grid number
-
getDecimalScale
public int getDecimalScale()
Get the decimal scale- Specified by:
getDecimalScale
in interfaceGridRecord
- Returns:
- decimal scale
-
getTimeUnit
public int getTimeUnit()
Description copied from interface:GridRecord
Get the time unit as a code, which should be Grib2 table 4.4.- Specified by:
getTimeUnit
in interfaceGridRecord
- Returns:
- the time unit as a code
-
getTimeUdunitName
public String getTimeUdunitName()
Description copied from interface:GridRecord
Get the time unit as a String. Must be able to create a udunit like: String udunit = timeUnit + " since " + refDate So this assumes that any conversion factor is applied to the value- Specified by:
getTimeUdunitName
in interfaceGridRecord
- Returns:
- the time unit as a String
-
cdmVariableHash
public int cdmVariableHash()
Description copied from interface:GridRecord
A hash code to group records into a CDM variable- Specified by:
cdmVariableHash
in interfaceGridRecord
- Returns:
- group hash code
-
cdmVariableName
public String cdmVariableName(GridTableLookup lookup, boolean useLevel, boolean useStat)
Description copied from interface:GridRecord
A unique name for the CDM variable, must be consistent with cdmVariableHash- Specified by:
cdmVariableName
in interfaceGridRecord
- Returns:
- unique CDM variable name
-
-