## visad.jmet
Class NetcdfGrids

    java.lang.Object
      visad.jmet.NetcdfGrids

public class NetcdfGrids
extends Object

Reads data from netCDF NCEP model grids one parameter at a time instead of the whole file (see Plain). This is pretty focused on delivering grids that are renderable in 3D.

Field Summary
`(package private) Integer2DSet` `dom_set`
`(package private) File` `filename`
`(package private) RealTupleType` `grid_domain`
`(package private) CoordinateSystem` `gridCoord`
`(package private) int` `gridNumber`
`(package private) int` `gridTypeCode`
`(package private) RealType` `level`
`(package private) NetcdfFile` `nc`
`(package private) int` `num_levels`
`(package private) int` `num_records`
`(package private) RealType` `pres`
`(package private) double[]` `pressureLevels`
`(package private) Set` `time_set`
`(package private) RealType` `time_type`
`(package private) int[]` `timeIndex`
`(package private) double[][]` `times`
`(package private) DateTime[]` `validDateTime`
`(package private) double[]` `valtime`
`(package private) RealType` `x`
`(package private) int` `xval`
`(package private) RealType` `y`
`(package private) int` `yval`

Constructor Summary
`NetcdfGrids(File filename)`
`NetcdfGrids(String filename)` set up to read grids from a netCDF file

Method Summary
`Vector` `get3dVariables()` fetch a list of 3D Variable names, long_names, and units for those parameters that have dimensions (x,y,level,record)
`Vector` `get4dVariables()` fetch a list of 4D Variable names, long_names, and units for those parameters that have dimensions (x,y,level,record)
`double` `getAspect()`
`Dimension` `getDimension()`
`Integer2DSet` `getDomainSet()`
`Tuple[]` `getGrids(String name, RealType values, double[][] range)` fetch the grids for one parameter
`Tuple[][]` `getGridsWithTime(String name, RealType values, double[][] range)` fetches grids are returns a Tuple [level][record] of FlatFields this was implemented to test the offset between mapping to animator or just doing one at a time...
`int` `getNumberOfLevels()`
`int` `getNumberOfTimes()`
`double[]` `getPressureLevels()`
`String[][]` `getVariableNames()` fetch a list of Variable names, long_names, and units
`static void` `main(String[] args)` Test routine: java NetcdfGrids <name of netCDF file>
`void` `setRealTypes(RealType x, RealType y, RealType level, RealType time_type, RealType pres)` set the RealTypes to use for coordinates (x,y,z,t) and pressure values

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

Field Detail

### filename

    File filename

### nc

    NetcdfFile nc

### pressureLevels

    double[] pressureLevels

### valtime

    double[] valtime

### times

    double[][] times

### time_set

    Set time_set

### timeIndex

    int[] timeIndex

### validDateTime

    DateTime[] validDateTime

### num_levels

    int num_levels

### num_records

    int num_records

### xval

    int xval

### yval

    int yval

### x

    RealType x

### y

    RealType y

### level

    RealType level

### time_type

    RealType time_type

### pres

    RealType pres

### grid_domain

    RealTupleType grid_domain

### dom_set

    Integer2DSet dom_set

### gridCoord

    CoordinateSystem gridCoord

### gridNumber

    int gridNumber

### gridTypeCode

    int gridTypeCode

Constructor Detail

### NetcdfGrids

    public NetcdfGrids(String filename)

  set up to read grids from a netCDF file

Parameters:
  `filename` - is the name of the netCDF file to read from

### NetcdfGrids

    public NetcdfGrids(File filename)

Method Detail

### setRealTypes

    public void setRealTypes(RealType x,
                             RealType y,
                             RealType level,
                             RealType time_type,
                             RealType pres)

  set the RealTypes to use for coordinates (x,y,z,t) and pressure values

  Parameters:
    `x` - X-coordinate
    `y` - Y-coordinate
    `level` - level dimension
    `time_type` - forecast valid time
    `pres` - MathType of vertical coordinate in display

### get4dVariables

    public Vector get4dVariables()

  fetch a list of 4D Variable names, long_names, and units for those parameters that have dimensions (x,y,level,record)

  Returns:
    names[0][k] is name; [1][k] is long_name, [2][k] is unit

### get3dVariables

    public Vector get3dVariables()

  fetch a list of 3D Variable names, long_names, and units for those parameters that have dimensions (x,y,level,record)

  Returns:
    names[0][k] is name; [1][k] is long_name, [2][k] is unit

### getVariableNames

    public String[][] getVariableNames()

  fetch a list of Variable names, long_names, and units

  Returns:
    names[0][k] is name; [1][k] is long_name, [2][k] is unit

### getAspect

    public double getAspect()

### getNumberOfLevels

    public int getNumberOfLevels()

### getPressureLevels

    public double[] getPressureLevels()

### getNumberOfTimes

    public int getNumberOfTimes()

### getDimension

    public Dimension getDimension()

### getDomainSet

    public Integer2DSet getDomainSet()

### getGrids

    public Tuple[] getGrids(String name,
                            RealType values,
                            double[][] range)

  fetch the grids for one parameter

  Parameters:
    `name` - the name of the parameter
    `values` - the RealType associated with name
  Returns:
    Tuple[2] where Tuple[0] is the vertical coordinate value and Tuple[1] is the FlatField(s) of data

### main

    public static void main(String[] args)

  Test routine: java NetcdfGrids <name of netCDF file>

### getGridsWithTime

    public Tuple[][] getGridsWithTime(String name,
                                      RealType values,
                                      double[][] range)

  fetches grids are returns a Tuple [level][record] of FlatFields this was implemented to test the offset between mapping to animator or just doing one at a time...