ucar.nc2.dt.fmrc
Class FmrcInventory

java.lang.Object
  extended by ucar.nc2.dt.fmrc.FmrcInventory

public class FmrcInventory
extends Object

A collection of ForecastModelRun (aka "run"). The Set if {Run, TimeCoord, Grid} are grouped into "run Sequences" {{Run, TimeCoord} X {Grid}} The FmrcDefinition object defines what is to be expected. The TimeMatrixDataset object keeps an inventory for all variables for the ForecastModelRunCollection. The set of possible valid times vs run times is thought of as a 2D time matrix. All this rigamorole is because NCEP grid files are so irregular.

 Data Structures

  List RunTime Date
  List ForecastTime Date
  List Offsets Double

  List VertTimeCoord
    double[] values

  List TimeCoord
    double[] offsetHour

  List RunSeq    // sequence of runs; ie sequence of TimeCoords; ie actual time coord
    List Run run;
      Date runDate
      TimeCoord

    List UberGrid
     String name
     List RunExpected  // corresponds to the runs in the RunSeq, matches to expected inventory
       Run run;                              //  actual time coord
       ForecastModelRun.Grid grid;           //  contains actual vert coord for this Run
       ForecastModelRun.TimeCoord expected;  // expected time coord
       FmrcDefinition.Grid expectedGrid;     // expected grid, vertCoord

 

Author:
caron

Method Summary
static void doOne(String cat, int n)
           
 FmrcDefinition getDefinition()
           
 String getDefinitionPath()
           
 List<ForecastModelRunInventory.EnsCoord> getEnsCoords()
           
 String getName()
           
 List<ucar.nc2.dt.fmrc.FmrcInventory.RunSeq> getRunSequences()
           
 String getSuffixFilter()
           
 List<ForecastModelRunInventory.TimeCoord> getTimeCoords()
           
 List<ForecastModelRunInventory.VertCoord> getVertCoords()
           
static void main(String[] args)
           
static void main2(String[] args)
           
static void main4(String[] args)
           
static FmrcInventory makeFromCatalog(DiskCache2 cache, String catURL, String collectionName, int maxDatasets, int mode)
           
static FmrcInventory makeFromCatalog(String catURL, String collectionName, int maxDatasets, int mode)
          Create a ForecastModelRun Collection from the datasets in a catalog.
static FmrcInventory makeFromDirectory(String fmrcDefinitionPath, String collectionName, DiskCache2 fmr_cache, String dirName, String suffix, int mode)
          Create a ForecastModelRun Collection from the files in a directory.
 org.jdom.Document makeMatrixDocument()
          Create an XML document for the entire collection
 org.jdom.Document makeMatrixDocument(String varName)
          Create an XML document for a variable
 String showOffsetHour(String varName, String offsetHour)
           
static void writeDefinitionFromCatalog(String catURL, String collectionName, int maxDatasets)
          Create a ForecastModelRun Collection from the datasets in a catalog.
 String writeMatrixXML(String varName)
           
 void writeMatrixXML(String varName, OutputStream os)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getName

public String getName()

getDefinitionPath

public String getDefinitionPath()

getTimeCoords

public List<ForecastModelRunInventory.TimeCoord> getTimeCoords()

getRunSequences

public List<ucar.nc2.dt.fmrc.FmrcInventory.RunSeq> getRunSequences()

getEnsCoords

public List<ForecastModelRunInventory.EnsCoord> getEnsCoords()

getVertCoords

public List<ForecastModelRunInventory.VertCoord> getVertCoords()

getSuffixFilter

public String getSuffixFilter()

getDefinition

public FmrcDefinition getDefinition()

writeMatrixXML

public String writeMatrixXML(String varName)

writeMatrixXML

public void writeMatrixXML(String varName,
                           OutputStream os)
                    throws IOException
Throws:
IOException

makeMatrixDocument

public org.jdom.Document makeMatrixDocument()
Create an XML document for the entire collection


makeMatrixDocument

public org.jdom.Document makeMatrixDocument(String varName)
Create an XML document for a variable


showOffsetHour

public String showOffsetHour(String varName,
                             String offsetHour)

makeFromDirectory

public static FmrcInventory makeFromDirectory(String fmrcDefinitionPath,
                                              String collectionName,
                                              DiskCache2 fmr_cache,
                                              String dirName,
                                              String suffix,
                                              int mode)
                                       throws Exception
Create a ForecastModelRun Collection from the files in a directory.

Parameters:
fmrcDefinitionPath - put/look for fmrc definition files in this directory, may be null
collectionName - the definition file = "name.fmrcDefinition.xml";
fmr_cache - cache fmr inventory files here, may be null
dirName - scan this directory
suffix - filter on this suffix
mode - one of the ForecastModelRun.OPEN_ modes
Returns:
ForecastModelRunCollection or null if no files exist
Throws:
Exception - on bad

main2

public static void main2(String[] args)
                  throws Exception
Throws:
Exception

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception

doOne

public static void doOne(String cat,
                         int n)
                  throws Exception
Throws:
Exception

writeDefinitionFromCatalog

public static void writeDefinitionFromCatalog(String catURL,
                                              String collectionName,
                                              int maxDatasets)
                                       throws Exception
Create a ForecastModelRun Collection from the datasets in a catalog.

Parameters:
catURL - scan this catalog
Throws:
Exception - on bad

makeFromCatalog

public static FmrcInventory makeFromCatalog(String catURL,
                                            String collectionName,
                                            int maxDatasets,
                                            int mode)
                                     throws Exception
Create a ForecastModelRun Collection from the datasets in a catalog.

Parameters:
catURL - scan this catalog
Throws:
Exception - on bad

makeFromCatalog

public static FmrcInventory makeFromCatalog(DiskCache2 cache,
                                            String catURL,
                                            String collectionName,
                                            int maxDatasets,
                                            int mode)
                                     throws Exception
Throws:
Exception

main4

public static void main4(String[] args)
                  throws Exception
Throws:
Exception


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