edu.wisc.ssec.mcidas
Class GridDirectory
- java.lang.Object
-
- edu.wisc.ssec.mcidas.GridDirectory
-
public class GridDirectory extends java.lang.ObjectClass for modelling a McIDAS grid header.- See Also:
- McIDAS Programmer's Manual
-
-
Field Summary
Fields Modifier and Type Field and Description static intCOLS_INDEXnumber of columnsstatic intDIRSIZEGridDirectory block sizestatic intFTIME_INDEXforecast timestatic intGRID_DESCR_INDEXgrid descriptionstatic intGRID_DESCR_LENGTHgrid description lengthstatic intLEVEL_SCALE_INDEXlevel scalestatic intLEVEL_UNITS_INDEXlevel unitstatic intLEVEL_VALUE_INDEXlevel valuestatic intNAV_BLOCK_INDEXnavigation indexstatic intNAV_BLOCK_LENGTHnavigation lengthstatic intPARAM_NAME_INDEXparam namestatic intPARAM_SCALE_INDEXparam scalestatic intPARAM_TYPE_INDEXparam typestatic intPARAM_UNITS_INDEXparam unitsstatic intREFDATE_INDEXref datestatic intREFTIME_INDEXref timestatic intROWS_INDEXnumber of rowsstatic intSECOND_FTIME_INDEXsecond forecast time (for time diff or average)static intSECOND_LEVEL_VALUE_INDEXsecond level value
-
Constructor Summary
Constructors Constructor and Description GridDirectory(int[] dirblock)Construct a GridDirectory from the grid directory block.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description booleanequals(java.lang.Object o)Check the equality of the object in question with this.intgetColumns()Get the number of columns in the gridint[]getDirBlock()Deprecated.use getDirectoryBlockint[]getDirectoryBlock()Get the raw directory blockintgetForecastHour()Get the forecast hour for this parameter if it is a forecastjava.lang.StringgetGridDescription()Get the grid descriptionjava.lang.StringgetLevelUnitName()Get the units of the vertical level.doublegetLevelValue()Get the vertical level value.int[]getNavBlock()Get the navigation parameters.GRIDnavgetNavigation()Get the navigationintgetNavType()Get the navigation type.java.lang.StringgetParamName()Get the name of the parameterdoublegetParamScale()Get the scale of the parameter valuesjava.lang.StringgetParamUnitName()Get the unit name of the parameter valuesjava.util.DategetReferenceTime()Get the reference time for this parameterintgetRows()Get the number of rows in the griddoublegetSecondLevelValue()Get the second vertical level value if one exists.java.util.DategetSecondTime()Get the second time for this parameter if it is a time differencejava.util.DategetValidTime()Get the valid time for this parameter if it is a forecastjava.lang.StringtoString()String representation of the GridDirectory
-
-
-
Field Detail
-
DIRSIZE
public static final int DIRSIZE
GridDirectory block size- See Also:
- Constant Field Values
-
ROWS_INDEX
public static final int ROWS_INDEX
number of rows- See Also:
- Constant Field Values
-
COLS_INDEX
public static final int COLS_INDEX
number of columns- See Also:
- Constant Field Values
-
REFDATE_INDEX
public static final int REFDATE_INDEX
ref date- See Also:
- Constant Field Values
-
REFTIME_INDEX
public static final int REFTIME_INDEX
ref time- See Also:
- Constant Field Values
-
FTIME_INDEX
public static final int FTIME_INDEX
forecast time- See Also:
- Constant Field Values
-
PARAM_NAME_INDEX
public static final int PARAM_NAME_INDEX
param name- See Also:
- Constant Field Values
-
PARAM_SCALE_INDEX
public static final int PARAM_SCALE_INDEX
param scale- See Also:
- Constant Field Values
-
PARAM_UNITS_INDEX
public static final int PARAM_UNITS_INDEX
param units- See Also:
- Constant Field Values
-
LEVEL_VALUE_INDEX
public static final int LEVEL_VALUE_INDEX
level value- See Also:
- Constant Field Values
-
LEVEL_SCALE_INDEX
public static final int LEVEL_SCALE_INDEX
level scale- See Also:
- Constant Field Values
-
LEVEL_UNITS_INDEX
public static final int LEVEL_UNITS_INDEX
level unit- See Also:
- Constant Field Values
-
PARAM_TYPE_INDEX
public static final int PARAM_TYPE_INDEX
param type- See Also:
- Constant Field Values
-
SECOND_FTIME_INDEX
public static final int SECOND_FTIME_INDEX
second forecast time (for time diff or average)- See Also:
- Constant Field Values
-
SECOND_LEVEL_VALUE_INDEX
public static final int SECOND_LEVEL_VALUE_INDEX
second level value- See Also:
- Constant Field Values
-
NAV_BLOCK_INDEX
public static final int NAV_BLOCK_INDEX
navigation index- See Also:
- Constant Field Values
-
NAV_BLOCK_LENGTH
public static final int NAV_BLOCK_LENGTH
navigation length- See Also:
- Constant Field Values
-
GRID_DESCR_INDEX
public static final int GRID_DESCR_INDEX
grid description- See Also:
- Constant Field Values
-
GRID_DESCR_LENGTH
public static final int GRID_DESCR_LENGTH
grid description length- See Also:
- Constant Field Values
-
-
Constructor Detail
-
GridDirectory
public GridDirectory(int[] dirblock) throws McIDASExceptionConstruct a GridDirectory from the grid directory block.- Parameters:
dirblock- directory block from the McIDAS grid- Throws:
McIDASException
-
-
Method Detail
-
getDirBlock
public int[] getDirBlock()
Deprecated. use getDirectoryBlockGet the raw directory block- Returns:
- array of the raw parameters in int form
-
getDirectoryBlock
public int[] getDirectoryBlock()
Get the raw directory block- Returns:
- array of the raw parameters in int form
-
getParamName
public java.lang.String getParamName()
Get the name of the parameter- Returns:
- parameter name
-
getGridDescription
public java.lang.String getGridDescription()
Get the grid description- Returns:
- grid description
-
getParamScale
public double getParamScale()
Get the scale of the parameter values- Returns:
- parameter scale (power of 10)
-
getParamUnitName
public java.lang.String getParamUnitName()
Get the unit name of the parameter values- Returns:
- unit name for this parameter
-
getReferenceTime
public java.util.Date getReferenceTime()
Get the reference time for this parameter- Returns:
- reference time
-
getValidTime
public java.util.Date getValidTime()
Get the valid time for this parameter if it is a forecast- Returns:
- valid time
-
getForecastHour
public int getForecastHour()
Get the forecast hour for this parameter if it is a forecast- Returns:
- forecast hour
-
getSecondTime
public java.util.Date getSecondTime()
Get the second time for this parameter if it is a time difference- Returns:
- second time (null if only one time associated with this)
-
getLevelValue
public double getLevelValue()
Get the vertical level value.- Returns:
- level By McIDAS conventions, 1013. == mean sea level, 0. == tropopause, 1001. == surface. Otherwise, value is what is returned.
-
getLevelUnitName
public java.lang.String getLevelUnitName()
Get the units of the vertical level.- Returns:
- unit name of the level
-
getSecondLevelValue
public double getSecondLevelValue()
Get the second vertical level value if one exists.- Returns:
- level By McIDAS conventions, 1013. == mean sea level, 0. == tropopause, 1001. == surface. Otherwise, value is what is returned.
-
getRows
public int getRows()
Get the number of rows in the grid- Returns:
- number of rows
-
getColumns
public int getColumns()
Get the number of columns in the grid- Returns:
- number of columns
-
getNavBlock
public int[] getNavBlock()
Get the navigation parameters.- Returns:
- array of nav parameters. The first value is the grid type and subsequent values provide the parameters for that type. see McIDAS Programmer's Manual for a description
- See Also:
getNavType()
-
getNavigation
public GRIDnav getNavigation()
Get the navigation- Returns:
- GRIDnav for this grid (may be null)
-
getNavType
public int getNavType()
Get the navigation type. Type is stored as first element of the nav block.- Returns:
- nav type
types are: 1 = pseudo-Mercator 2 = Polar Stereographic or Lambert Conformal 3 = Equidistant 4 = pseudo-Mercator (more general) 5 = no navigation 6 = Lambert Conformal Tangent Cone - See Also:
getNavBlock()
-
equals
public boolean equals(java.lang.Object o)
Check the equality of the object in question with this.- Overrides:
equalsin classjava.lang.Object- Parameters:
o- object in question
-
toString
public java.lang.String toString()
String representation of the GridDirectory- Overrides:
toStringin classjava.lang.Object- Returns:
- human readable string
-
-
DMelt 3.0 © DataMelt by jWork.ORG