ucar.nc2.ncml
Class AggregationFmrc

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

public class AggregationFmrc
extends Aggregation

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.Dataset, Aggregation.DatasetProxyReader, Aggregation.DirectoryScan, Aggregation.MyFile, Aggregation.MyReplaceVariableCheck, Aggregation.Type
 
Field Summary
 
Fields inherited from class ucar.nc2.ncml.Aggregation
debugCacheDetail, debugOpenFile, debugProxy, debugRead, debugScan, debugSyncDetail, dimName, diskCache2, explicitDatasets, formatter, isDate, lastChecked, logger, ncDataset, nestedDatasets, recheck, scanList, spiObject, type, TYPICAL_DATASET_LATEST, TYPICAL_DATASET_PENULTIMATE, TYPICAL_DATASET_RANDOM, typicalDatasetMode, wasChanged
 
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(Aggregation.Dataset typicalDataset, GridDataset typicalGds, CancelTask cancelTask)
           
protected  void buildDataset(boolean isNew, CancelTask cancelTask)
           
static void main(java.lang.String[] arg)
          testing
protected  void makeTimeCoordinate(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, CancelTask cancelTask, java.util.List section)
          Read a section of an aggregation variable.
static void setDefinitionDirectory(java.lang.String defDir)
           
 void setInventoryDefinition(java.lang.String invDef)
           
 void setTimeUnitsChange(boolean timeUnitsChange)
           
protected  void syncDataset(CancelTask cancelTask)
           
 
Methods inherited from class ucar.nc2.ncml.Aggregation
addDataset, addDirectoryScan, addExplicitDataset, addVariable, buildCoords, close, finish, getCoordinateType, getDimensionName, getNestedDatasets, getTotalCoords, getType, getTypicalDataset, getVariables, isDate, makeDataset, makeProxies, persist, persistRead, readAggCoord, readAggCoord, scan, setPersistenceCache, setTypicalDatasetMode, sync, syncExtend, timeToRescan
 
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)

setTimeUnitsChange

public void setTimeUnitsChange(boolean timeUnitsChange)

setInventoryDefinition

public void setInventoryDefinition(java.lang.String invDef)

buildDataset

protected void buildDataset(boolean isNew,
                            CancelTask cancelTask)
                     throws java.io.IOException
Specified by:
buildDataset in class Aggregation
Throws:
java.io.IOException

buildDataset

protected void buildDataset(Aggregation.Dataset typicalDataset,
                            GridDataset typicalGds,
                            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: Aggregation
Read an aggregation variable: A variable whose data spans multiple files.

Specified by:
read in interface ProxyReader
Overrides:
read in class Aggregation
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,
                  CancelTask cancelTask,
                  java.util.List section)
           throws java.io.IOException,
                  InvalidRangeException
Read a section of an aggregation variable.

Specified by:
read in interface ProxyReader
Overrides:
read in class Aggregation
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 is incorrect rank or shape.

syncDataset

protected void syncDataset(CancelTask cancelTask)
                    throws java.io.IOException
Overrides:
syncDataset in class Aggregation
Throws:
java.io.IOException

main

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

Throws:
java.io.IOException