Package ucar.nc2.ft.fmrc
Class GridDatasetInv
- java.lang.Object
-
- ucar.nc2.ft.fmrc.GridDatasetInv
-
public class GridDatasetInv extends Object
The data inventory of one GridDataset. Track grids, time, vert, ens coordinates. Grids are grouped by the time coordinated that they use. Uses dense time, vert coordinates - just the ones that are in the file. Note: Not sure if the vert coords will ever be different across the time coords. Should be immutable, once the file is finished writing.- Since:
- Jan 11, 2010
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
GridDatasetInv.Grid
A Grid variable has a name, timeCoord and optionally a Vertical and Ensemble Coordinate
-
Constructor Summary
Constructors Constructor Description GridDatasetInv(GridDataset gds, CalendarDate runDate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description GridDatasetInv.Grid
findGrid(String name)
long
getLastModified()
String
getLocation()
CalendarDate
getRunDate()
Get the date of the ForecastModelRunString
getRunDateString()
Get string representation of the date of the ForecastModelRunList<TimeCoord>
getTimeCoords()
Get a list of unique TimeCoords, which contain the list of variables that all use that TimeCoord.List<VertCoord>
getVertCoords()
Get a list of unique VertCoords.boolean
isXmlVersionCompatible()
Check if the GribDatasetInv xml format can be fully understood by this code.static GridDatasetInv
open(MCollection cm, MFile mfile, org.jdom2.Element ncml)
static GridDatasetInv
readXML(byte[] xmlString)
Construct a GridDatasetInv from its XML representationString
toString()
String
writeCompactXML(Date lastModified)
Write the XML representation to a compact String.String
writeXML(Date lastModified)
Write the XML representation to a String.
-
-
-
Constructor Detail
-
GridDatasetInv
public GridDatasetInv(GridDataset gds, CalendarDate runDate)
-
-
Method Detail
-
open
public static GridDatasetInv open(MCollection cm, MFile mfile, org.jdom2.Element ncml) throws IOException
- Throws:
IOException
-
isXmlVersionCompatible
public boolean isXmlVersionCompatible()
Check if the GribDatasetInv xml format can be fully understood by this code.- Returns:
- true if version can be fully understood, otherwise false.
-
getLocation
public String getLocation()
-
getLastModified
public long getLastModified()
-
getRunDate
public CalendarDate getRunDate()
Get the date of the ForecastModelRun- Returns:
- the date of the ForecastModelRun
-
getRunDateString
public String getRunDateString()
Get string representation of the date of the ForecastModelRun- Returns:
- string representation of the date of the ForecastModelRun
-
getTimeCoords
public List<TimeCoord> getTimeCoords()
Get a list of unique TimeCoords, which contain the list of variables that all use that TimeCoord.- Returns:
- list of TimeCoord
-
getVertCoords
public List<VertCoord> getVertCoords()
Get a list of unique VertCoords.- Returns:
- list of VertCoord
-
findGrid
public GridDatasetInv.Grid findGrid(String name)
-
writeCompactXML
public String writeCompactXML(Date lastModified)
Write the XML representation to a compact String.- Returns:
- the compact XML representation to a String.
-
writeXML
public String writeXML(Date lastModified)
Write the XML representation to a String.- Returns:
- the XML representation to a String.
-
readXML
public static GridDatasetInv readXML(byte[] xmlString) throws IOException
Construct a GridDatasetInv from its XML representation- Parameters:
xmlString
- the xml string- Returns:
- ForecastModelRun
- Throws:
IOException
- on io error
-
-