ucar.nc2.iosp.grads
Class GradsDimension

java.lang.Object
  extended by ucar.nc2.iosp.grads.GradsDimension
Direct Known Subclasses:
GradsEnsembleDimension, GradsTimeDimension

public class GradsDimension
extends Object

Hold information about a GradDimension

Author:
Don Murray - CU/CIRES

Field Summary
static String LEVELS
          levels type mapping
static String LINEAR
          linear type mapping
 
Constructor Summary
GradsDimension(String name, int size, String mapping)
          Make a new GradsDimension from the values
 
Method Summary
protected  void addLevel(String level)
          Add a level to the list of levels
protected  List<String> getLevels()
          Get the levels
 String getName()
          Get the name of this dimension
 int getSize()
          Get the size of this dimension
 String getType()
          Get the mapping type
 String getUnit()
          Get the units
 double[] getValues()
          Get the values
protected  double[] makeLevelValues()
          Make the level values from the specifications
protected  void setUnit(String unit)
          Set the unit
 String toString()
          Return a String representation of this object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LINEAR

public static final String LINEAR
linear type mapping

See Also:
Constant Field Values

LEVELS

public static final String LEVELS
levels type mapping

See Also:
Constant Field Values
Constructor Detail

GradsDimension

public GradsDimension(String name,
                      int size,
                      String mapping)
Make a new GradsDimension from the values

Parameters:
name - the dimension name
size - the dimension size
mapping - the dimension mapping type
Method Detail

addLevel

protected void addLevel(String level)
Add a level to the list of levels

Parameters:
level - level to add

getLevels

protected List<String> getLevels()
Get the levels

Returns:
the list of levels

getName

public String getName()
Get the name of this dimension

Returns:
the name

getSize

public int getSize()
Get the size of this dimension

Returns:
the size

getValues

public double[] getValues()
Get the values

Returns:
the values

getUnit

public String getUnit()
Get the units

Returns:
the units

setUnit

protected void setUnit(String unit)
Set the unit

Parameters:
unit - the unit

getType

public String getType()
Get the mapping type

Returns:
the mapping type

makeLevelValues

protected double[] makeLevelValues()
Make the level values from the specifications

Returns:
the level values

toString

public String toString()
Return a String representation of this object

Overrides:
toString in class Object
Returns:
a String representation of this object


Copyright © 1999-2011 UCAR/Unidata. All Rights Reserved.