|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectucar.nc2.dt.fmrc.ForecastModelRunInventory
public class ForecastModelRunInventory
This reads and writes XML files to summarize the inventory for a single ForecastModelRun. The underlying dataset is a GridDataset.
Tracks unique TimeCoords (aka "valid times" aka "forecast times" aka "offset hours"), and tracks the list of variables (aka grids) that use that TimeCoord. Tracks unique VertCoords; grids have a reference to one if they are 3D.Data Structures List VertCoord double[] values List TimeCoord double[] offsetHour List Grid VertCoord (optional) List Misssing
Nested Class Summary | |
---|---|
static class |
ForecastModelRunInventory.EnsCoord
Represents a ensemble coordinate. |
static class |
ForecastModelRunInventory.Grid
A Grid variable has a name, timeCoord and optionally a Vertical Coordinate, and list of Missing. |
static class |
ForecastModelRunInventory.Missing
|
static class |
ForecastModelRunInventory.TimeCoord
Represents a list of valid times. |
static class |
ForecastModelRunInventory.VertCoord
Represents a vertical coordinate. |
Field Summary | |
---|---|
static int |
OPEN_FORCE_NEW
|
static int |
OPEN_NORMAL
|
static int |
OPEN_XML_ONLY
|
Method Summary | |
---|---|
void |
close()
|
ForecastModelRunInventory.Grid |
findGrid(String name)
|
LatLonRect |
getBB()
|
String |
getName()
|
static double |
getOffsetInHours(Date origin,
Date date)
|
Date |
getRunDate()
Get the date of the ForecastModelRun |
String |
getRunDateString()
Get string representation of the date of the ForecastModelRun |
List<ForecastModelRunInventory.TimeCoord> |
getTimeCoords()
Get a list of unique TimeCoords, which contain the list of variables that all use that TimeCoord. |
List<ForecastModelRunInventory.VertCoord> |
getVertCoords()
Get a list of unique VertCoords. |
static void |
main(String[] args)
|
static void |
main2(String[] args)
|
static ForecastModelRunInventory |
open(DiskCache2 cache,
String ncfileLocation,
int mode,
boolean isFile)
Open a GridDataset and construct a ForecastModelRun. |
static ForecastModelRunInventory |
open(GridDataset gds,
Date runDate)
|
static ForecastModelRunInventory |
readXML(String xmlLocation)
Construct a ForecastModelRun from its XML representation |
void |
releaseDataset()
Release and close the dataset, and allow CG. |
void |
setName(String name)
|
org.jdom.Document |
writeDocument()
Create the XML representation |
String |
writeXML()
Write the XML representation to a String. |
void |
writeXML(OutputStream out)
Write the XML representaion to an OutputStream. |
void |
writeXML(String filename)
Write the XML representation to a local file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int OPEN_NORMAL
public static final int OPEN_FORCE_NEW
public static final int OPEN_XML_ONLY
Method Detail |
---|
public void close() throws IOException
IOException
public void setName(String name)
public String getName()
public Date getRunDate()
public String getRunDateString()
public List<ForecastModelRunInventory.TimeCoord> getTimeCoords()
public List<ForecastModelRunInventory.VertCoord> getVertCoords()
public LatLonRect getBB()
public void releaseDataset() throws IOException
IOException
- on io errorpublic ForecastModelRunInventory.Grid findGrid(String name)
public static double getOffsetInHours(Date origin, Date date)
public void writeXML(String filename) throws IOException
filename
- wite to this local file
IOException
- on io errorpublic void writeXML(OutputStream out) throws IOException
out
- write to this OutputStream
IOException
- on io errorpublic String writeXML()
public org.jdom.Document writeDocument()
public static ForecastModelRunInventory readXML(String xmlLocation) throws IOException
xmlLocation
- location of xml - assumed to be a local file.
IOException
- on io errorpublic static ForecastModelRunInventory open(DiskCache2 cache, String ncfileLocation, int mode, boolean isFile) throws IOException
cache
- use this cache to look for fmrInv.xml files (may be null)ncfileLocation
- location of the grid dataset.mode
- one of OPEN_NORMAL, OPEN_FORCE_NEW, OPEN_XML_ONLY constantsisFile
- if its a file: new File( ncfileLocation) makes sense, so we can check if its changed
IOException
- on io errorpublic static ForecastModelRunInventory open(GridDataset gds, Date runDate)
public static void main2(String[] args) throws Exception
Exception
public static void main(String[] args) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |