public class ForecastModelRunInventory extends Object
Data Structures List VertCoord double[] values List TimeCoord double[] offsetHour List Grid VertCoord (optional) List Misssing
Modifier and Type | Class and Description |
---|---|
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.
|
Modifier and Type | Field and Description |
---|---|
static int |
OPEN_FORCE_NEW |
static int |
OPEN_NORMAL |
static int |
OPEN_XML_ONLY |
Modifier and Type | Method and Description |
---|---|
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.jdom2.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.
|
public static final int OPEN_NORMAL
public static final int OPEN_FORCE_NEW
public static final int OPEN_XML_ONLY
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 void writeXML(String filename) throws IOException
filename
- wite to this local fileIOException
- on io errorpublic void writeXML(OutputStream out) throws IOException
out
- write to this OutputStreamIOException
- on io errorpublic String writeXML()
public org.jdom2.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 changedIOException
- on io errorpublic static ForecastModelRunInventory open(GridDataset gds, Date runDate)
public static void main(String[] args) throws IOException
IOException
Copyright © 1999–2014 UCAR/Unidata. All rights reserved.