Package ucar.nc2.iosp.mcidas
Class McIDASGridRecord
- java.lang.Object
-
- ucar.mcidas.GridDirectory
-
- ucar.nc2.iosp.mcidas.McIDASGridRecord
-
- All Implemented Interfaces:
GridRecord
public class McIDASGridRecord extends ucar.mcidas.GridDirectory implements GridRecord
A class to hold McIDAS grid record information
-
-
Field Summary
-
Fields inherited from class ucar.mcidas.GridDirectory
COLS_INDEX, DIRSIZE, FTIME_INDEX, GRID_DESCR_INDEX, GRID_DESCR_LENGTH, LEVEL_SCALE_INDEX, LEVEL_UNITS_INDEX, LEVEL_VALUE_INDEX, NAV_BLOCK_INDEX, NAV_BLOCK_LENGTH, PARAM_NAME_INDEX, PARAM_SCALE_INDEX, PARAM_TYPE_INDEX, PARAM_UNITS_INDEX, REFDATE_INDEX, REFTIME_INDEX, ROWS_INDEX, SECOND_FTIME_INDEX, SECOND_LEVEL_VALUE_INDEX
-
-
Constructor Summary
Constructors Constructor Description McIDASGridRecord(int offset, int[] header)Create a grid header from the integer bits
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcdmVariableHash()A hash code to group records into a CDM variableStringcdmVariableName(GridTableLookup lookup, boolean useLevel, boolean useStat)A unique name for the CDM variable, must be consistent with cdmVariableHashintgetDecimalScale()Get the decimal scaleMcGridDefRecordgetGridDefRecord()Get the grid def record idStringgetGridDefRecordId()Get the grid def record iddoublegetLevel1()Get the first level of this GridRecorddoublegetLevel2()Get the second level of this GridRecordintgetLevelType1()Get the type for the first level of this GridRecordintgetLevelType2()Get the type for the second level of this GridRecordintgetOffsetToHeader()Get the offset to the grid header (4 byte words)StringgetParameterDescription()Get the parameter descriptionStringgetParameterName()Get the parameter nameStringgetTimeUdunitName()Get the time unit as a String.intgetTimeUnit()Get the time unit as a code, which should be Grib2 table 4.4.intgetValidTimeOffset()Get valid time offset (minutes) of this GridRecordbooleanhasGribInfo()Had GRIB info?-
Methods inherited from class ucar.mcidas.GridDirectory
equals, getColumns, getDirBlock, getDirectoryBlock, getForecastHour, getGridDescription, getLevelUnitName, getLevelValue, getNavBlock, getNavigation, getNavType, getParamName, getParamScale, getParamUnitName, getReferenceTime, getRows, getSecondLevelValue, getSecondTime, getValidTime, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface ucar.nc2.iosp.grid.GridRecord
getReferenceTime, getValidTime
-
-
-
-
Constructor Detail
-
McIDASGridRecord
public McIDASGridRecord(int offset, int[] header) throws ucar.mcidas.McIDASExceptionCreate a grid header from the integer bits- Parameters:
offset- offset to grid header in fileheader- header words- Throws:
ucar.mcidas.McIDASException- Problem creating the record
-
-
Method Detail
-
getLevel1
public double getLevel1()
Get the first level of this GridRecord- Specified by:
getLevel1in interfaceGridRecord- Returns:
- the first level value
-
getLevel2
public double getLevel2()
Get the second level of this GridRecord- Specified by:
getLevel2in interfaceGridRecord- Returns:
- the second level value
-
getLevelType1
public int getLevelType1()
Get the type for the first level of this GridRecord- Specified by:
getLevelType1in interfaceGridRecord- Returns:
- level type
-
getLevelType2
public int getLevelType2()
Get the type for the second level of this GridRecord- Specified by:
getLevelType2in interfaceGridRecord- Returns:
- level type
-
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:
getParameterNamein interfaceGridRecord- Returns:
- parameter name
-
getParameterDescription
public String getParameterDescription()
Get the parameter description- Specified by:
getParameterDescriptionin interfaceGridRecord- Returns:
- parameter description
-
getDecimalScale
public int getDecimalScale()
Get the decimal scale- Specified by:
getDecimalScalein interfaceGridRecord- Returns:
- decimal scale
-
getGridDefRecordId
public String getGridDefRecordId()
Get the grid def record id- Specified by:
getGridDefRecordIdin interfaceGridRecord- Returns:
- parameter name
-
getGridDefRecord
public McGridDefRecord getGridDefRecord()
Get the grid def record id- Returns:
- parameter name
-
getOffsetToHeader
public int getOffsetToHeader()
Get the offset to the grid header (4 byte words)- Returns:
- word offset
-
hasGribInfo
public boolean hasGribInfo()
Had GRIB info?- Returns:
- true if has grib info
-
getTimeUnit
public int getTimeUnit()
Description copied from interface:GridRecordGet the time unit as a code, which should be Grib2 table 4.4.- Specified by:
getTimeUnitin interfaceGridRecord- Returns:
- the time unit as a code
-
getTimeUdunitName
public String getTimeUdunitName()
Description copied from interface:GridRecordGet 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:
getTimeUdunitNamein interfaceGridRecord- Returns:
- the time unit as a String
-
cdmVariableHash
public int cdmVariableHash()
Description copied from interface:GridRecordA hash code to group records into a CDM variable- Specified by:
cdmVariableHashin interfaceGridRecord- Returns:
- group hash code
-
cdmVariableName
public String cdmVariableName(GridTableLookup lookup, boolean useLevel, boolean useStat)
Description copied from interface:GridRecordA unique name for the CDM variable, must be consistent with cdmVariableHash- Specified by:
cdmVariableNamein interfaceGridRecord- Returns:
- unique CDM variable name
-
-