ucar.nc2.ncml
Class AggregationFmrc

java.lang.Object
  extended by ucar.nc2.ncml.Aggregation
      extended by ucar.nc2.ncml.AggregationOuterDimension
          extended by ucar.nc2.ncml.AggregationFmrc
All Implemented Interfaces:
ProxyReader
Direct Known Subclasses:
AggregationFmrcSingle

public class AggregationFmrc
extends AggregationOuterDimension

Implement NcML Forecast Model Run Collection Aggregation with files that are complete runs (have all forecast times in the same file)

Author:
caron

Nested Class Summary
 
Nested classes/interfaces inherited from class ucar.nc2.ncml.Aggregation
Aggregation.DatasetProxyReader, Aggregation.Type, Aggregation.TypicalDataset
 
Field Summary
 
Fields inherited from class ucar.nc2.ncml.AggregationOuterDimension
aggVarNames, aggVars, cacheList, debugCache, debugInvocation, invocation, timeUnitsChange
 
Fields inherited from class ucar.nc2.ncml.Aggregation
cacheDirty, datasetManager, datasets, dateFormatMark, debugDateParse, debugOpenFile, debugProxy, debugRead, debugSyncDetail, dimName, diskCache2, enhance, executor, explicitDatasets, formatter, isDate, logger, ncDataset, spiObject, type, typicalDatasetMode
 
Constructor Summary
protected AggregationFmrc(NetcdfDataset ncd, java.lang.String dimName, Aggregation.Type type, java.lang.String recheckS)
           
  AggregationFmrc(NetcdfDataset ncd, java.lang.String dimName, java.lang.String recheckS)
           
 
Method Summary
protected  void buildDataset(ucar.nc2.ncml.Aggregation.Dataset typicalDataset, NetcdfFile typical, GridDataset typicalGds, CancelTask cancelTask)
           
protected  void buildDataset(CancelTask cancelTask)
          Call this to build the dataset objects
static void main(java.lang.String[] arg)
          testing
protected  void makeTimeCoordinate(GridDataset gds, CancelTask cancelTask)
           
protected  void makeTimeCoordinateWithDefinition(GridDataset gds, CancelTask cancelTask)
           
 Array read(Variable mainv, CancelTask cancelTask)
          Read an aggregation variable: A variable whose data spans multiple files.
 Array read(Variable mainv, Section section, CancelTask cancelTask)
          Read a section of an aggregation variable.
protected  void readTimeCoordinates(VariableDS timeAxis, CancelTask cancelTask)
           
protected  void rebuildDataset()
          Call this when rescan has found changed datasets
static void setDefinitionDirectory(java.lang.String defDir)
           
 void setInventoryDefinition(java.lang.String invDef)
           
 
Methods inherited from class ucar.nc2.ncml.AggregationOuterDimension
addVariable, buildCoords, getDimensionName, getTotalCoords, makeDataset, promoteGlobalAttributes
 
Methods inherited from class ucar.nc2.ncml.Aggregation
addCrawlableDatasetScan, addDataset, addExplicitDataset, close, closeDatasets, findVariable, finish, getDatasets, getLocation, getType, getTypicalDataset, makeDatasets, persistRead, persistWrite, setDatasetAcquireProxy, setExecutor, setPersistenceCache, setTypicalDatasetMode, sync, syncExtend
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AggregationFmrc

public AggregationFmrc(NetcdfDataset ncd,
                       java.lang.String dimName,
                       java.lang.String recheckS)

AggregationFmrc

protected AggregationFmrc(NetcdfDataset ncd,
                          java.lang.String dimName,
                          Aggregation.Type type,
                          java.lang.String recheckS)
Method Detail

setDefinitionDirectory

public static void setDefinitionDirectory(java.lang.String defDir)

setInventoryDefinition

public void setInventoryDefinition(java.lang.String invDef)

buildDataset

protected void buildDataset(CancelTask cancelTask)
                     throws java.io.IOException
Description copied from class: Aggregation
Call this to build the dataset objects

Specified by:
buildDataset in class Aggregation
Parameters:
cancelTask - maybe cancel
Throws:
java.io.IOException - on read error

buildDataset

protected void buildDataset(ucar.nc2.ncml.Aggregation.Dataset typicalDataset,
                            NetcdfFile typical,
                            GridDataset typicalGds,
                            CancelTask cancelTask)
                     throws java.io.IOException
Throws:
java.io.IOException

rebuildDataset

protected void rebuildDataset()
                       throws java.io.IOException
Description copied from class: Aggregation
Call this when rescan has found changed datasets

Overrides:
rebuildDataset in class AggregationOuterDimension
Throws:
java.io.IOException - on read error

makeTimeCoordinateWithDefinition

protected void makeTimeCoordinateWithDefinition(GridDataset gds,
                                                CancelTask cancelTask)
                                         throws java.io.IOException
Throws:
java.io.IOException

makeTimeCoordinate

protected void makeTimeCoordinate(GridDataset gds,
                                  CancelTask cancelTask)
                           throws java.io.IOException
Throws:
java.io.IOException

read

public Array read(Variable mainv,
                  CancelTask cancelTask)
           throws java.io.IOException
Description copied from class: AggregationOuterDimension
Read an aggregation variable: A variable whose data spans multiple files.

Specified by:
read in interface ProxyReader
Overrides:
read in class AggregationOuterDimension
Parameters:
mainv - the aggregation variable
cancelTask - allow the user to cancel
Returns:
the data array
Throws:
java.io.IOException - on error

read

public Array read(Variable mainv,
                  Section section,
                  CancelTask cancelTask)
           throws java.io.IOException,
                  InvalidRangeException
Read a section of an aggregation variable.

Specified by:
read in interface ProxyReader
Overrides:
read in class AggregationOuterDimension
Parameters:
mainv - the aggregation variable
cancelTask - allow the user to cancel
section - read just this section of the data, array of Range
Returns:
the data array section
Throws:
java.io.IOException
InvalidRangeException - if section has incorrect rank or shape.

readTimeCoordinates

protected void readTimeCoordinates(VariableDS timeAxis,
                                   CancelTask cancelTask)
                            throws java.io.IOException
Throws:
java.io.IOException

main

public static void main(java.lang.String[] arg)
                 throws java.io.IOException
testing

Throws:
java.io.IOException