ucar.nc2.iosp.grads
Class GradsTimeDimension

java.lang.Object
  extended by ucar.nc2.iosp.grads.GradsDimension
      extended by ucar.nc2.iosp.grads.GradsTimeDimension

public class GradsTimeDimension
extends GradsDimension

Class to hold the complexities of the GrADS time dimension

Author:
Don Murray - CU/CIRES

Field Summary
 
Fields inherited from class ucar.nc2.iosp.grads.GradsDimension
LEVELS, LINEAR
 
Constructor Summary
GradsTimeDimension(String name, int size, String mapping)
          Create new GradsTimeDimension
 
Method Summary
static boolean hasTimeTemplate(String template)
          Does this file definition have a time template in it?
protected  double[] makeLevelValues()
          Make the level values from the specifications
 GradsTimeStruct makeTimeStruct(int timeIndex)
          Make a time struct from the index.
 String replaceFileTemplate(String filespec, int timeIndex)
          Replace the time template parameters in a filename
 
Methods inherited from class ucar.nc2.iosp.grads.GradsDimension
addLevel, getLevels, getName, getSize, getType, getUnit, getValues, setUnit, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GradsTimeDimension

public GradsTimeDimension(String name,
                          int size,
                          String mapping)
Create new GradsTimeDimension

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

makeLevelValues

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

Overrides:
makeLevelValues in class GradsDimension
Returns:
the level values

makeTimeStruct

public GradsTimeStruct makeTimeStruct(int timeIndex)
Make a time struct from the index.

Parameters:
timeIndex - the time value index
Returns:
the corresponding TimeStruct

replaceFileTemplate

public String replaceFileTemplate(String filespec,
                                  int timeIndex)
Replace the time template parameters in a filename

Parameters:
filespec - the file template
timeIndex - the time index
Returns:
the filled in template
See Also:
"http://www.iges.org/grads/gadoc/templates.html"

hasTimeTemplate

public static boolean hasTimeTemplate(String template)
Does this file definition have a time template in it?

Parameters:
template - the file template
Returns:
true if it does


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