## edu.wisc.ssec.mcidas
Class GridDirectory

    java.lang.Object
      edu.wisc.ssec.mcidas.GridDirectory

public class GridDirectory
extends Object

Class for modelling a McIDAS grid header.

See Also:
  McIDAS Programmer's Manual

Field Summary
`static int` `COLS_INDEX` number of columns
`static int` `DIRSIZE` GridDirectory block size
`static int` `FTIME_INDEX` forecast time
`static int` `GRID_DESCR_INDEX` grid description
`static int` `GRID_DESCR_LENGTH` grid description length
`static int` `LEVEL_SCALE_INDEX` level scale
`static int` `LEVEL_UNITS_INDEX` level unit
`static int` `LEVEL_VALUE_INDEX` level value
`static int` `NAV_BLOCK_INDEX` navigation index
`static int` `NAV_BLOCK_LENGTH` navigation length
`static int` `PARAM_NAME_INDEX` param name
`static int` `PARAM_SCALE_INDEX` param scale
`static int` `PARAM_TYPE_INDEX` param type
`static int` `PARAM_UNITS_INDEX` param units
`static int` `REFDATE_INDEX` ref date
`static int` `REFTIME_INDEX` ref time
`static int` `ROWS_INDEX` number of rows
`static int` `SECOND_FTIME_INDEX` second forecast time (for time diff or average)
`static int` `SECOND_LEVEL_VALUE_INDEX` second level value

Constructor Summary
`GridDirectory(int[] dirblock)` Construct a GridDirectory from the grid directory block.

Method Summary
`boolean` `equals(Object o)` Check the equality of the object in question with this.
`int` `getColumns()` Get the number of columns in the grid
`int[]` `getDirBlock()` Deprecated. use getDirectoryBlock
`int[]` `getDirectoryBlock()` Get the raw directory block
`int` `getForecastHour()` Get the forecast hour for this parameter if it is a forecast
`String` `getGridDescription()` Get the grid description
`String` `getLevelUnitName()` Get the units of the vertical level.
`double` `getLevelValue()` Get the vertical level value.
`int[]` `getNavBlock()` Get the navigation parameters.
`GRIDnav` `getNavigation()` Get the navigation
`int` `getNavType()` Get the navigation type.
`String` `getParamName()` Get the name of the parameter
`double` `getParamScale()` Get the scale of the parameter values
`String` `getParamUnitName()` Get the unit name of the parameter values
`Date` `getReferenceTime()` Get the reference time for this parameter
`int` `getRows()` Get the number of rows in the grid
`double` `getSecondLevelValue()` Get the second vertical level value if one exists.
`Date` `getSecondTime()` Get the second time for this parameter if it is a time difference
`Date` `getValidTime()` Get the valid time for this parameter if it is a forecast
`String` `toString()` String representation of the GridDirectory

Methods inherited from class java.lang.Object
`clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

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 McIDASException

  Construct a GridDirectory from the grid directory block.

Parameters:
  `dirblock` - directory block from the McIDAS grid

Method Detail

### getDirBlock

    public int[] getDirBlock()

  Deprecated. use getDirectoryBlock

  Get 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 String getParamName()

  Get the name of the parameter

  Returns:
    parameter name

### getGridDescription

    public 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 String getParamUnitName()

  Get the unit name of the parameter values

  Returns:
    unit name for this parameter

### getReferenceTime

    public Date getReferenceTime()

  Get the reference time for this parameter

  Returns:
    reference time

### getValidTime

    public 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 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 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 Also:
    McIDAS Programmer's Manual for a description, `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(Object o)

  Check the equality of the object in question with this.

  Parameters:
    `o` - object in question

### toString

    public String toString()

  String representation of the GridDirectory

  Returns:
    human readable string