ucar.nc2.dt.fmrc
Class FmrcDefinition
java.lang.Object
ucar.nc2.dt.fmrc.FmrcDefinition
- All Implemented Interfaces:
- FmrcCoordSys
public class FmrcDefinition
- extends Object
- implements FmrcCoordSys
Defines the expected inventory of a Forecast Model Run Collection.
Data Structures
List VertTimeCoord
double[] values
List TimeCoord
double[] offsetHour
List RunSeq
List Run - runHour dependent TimeCoord
double hour
TimeCoord
List Grid
String name
VertTimeCoord - time dependent vertical coordinate
VertCoord
TimeCoord (optional)
Abstractly, the data is a table:
Run Grid TimeCoord VertCoord
Run Grid TimeCoord VertCoord
Run Grid TimeCoord VertCoord
...
We will use the notation ({} means list)
{Run, Grid, TimeCoord, VertCoord}
The simplest case would be if all runs have the same grids, which all use the same time coord, and each grid always
uses the same vert coord :
(1) {runTime} X {Grid, VertCoord} X TimeCoord (X means product)
The usual case is that there are multiple TimeCoords, but a grid always uses the same one:
(2) {runTime} X {Grid, VertCoord, TimeCoord}
Since all runTimes are the same, the definition only need be:
(2d) {Grid, VertCoord, TimeCoord}
Another case is that different run hours use different TimeCoords. We will call this a RunSeq, and we associate with each
RunSeq the list of grids that use it:
Run = runHour, TimeCoord
RunSeq = {runHour, TimeCoord} X {Grid, VertCoord}
Different grids use different RunSeqs, so we have a list of RunSeq:
(3d) {{runHour, TimeCoord} X {Grid, VertCoord}}
We can recast (2d), when all runHours are the same, as:
(2d') {TimeCoord X {Grid, VertCoord}}
which means that we are grouping grids by unique TimeCoord. (1d) would be the case where there is only one in the list.
Another case is when the VertCoord depends on the TimeCoord, but all run hours are the same:
(4d) {TimeCoord X {Grid, VertCoord(TimeCoord)}}
Which lead us to generalize a VertCoord to a time-dependent one, called VertTimeCoord.
The most general case is then
{{runHour, TimeCoord} X {Grid, VertTimeCoord}}
- Author:
- caron
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
fmrcDatasets
public static String[] fmrcDatasets
fmrcDatasets_41
public static String[] fmrcDatasets_41
FmrcDefinition
public FmrcDefinition()
getSuffixFilter
public String getSuffixFilter()
getRunSequences
public List<FmrcDefinition.RunSeq> getRunSequences()
hasVariable
public boolean hasVariable(String searchName)
- Specified by:
hasVariable
in interface FmrcCoordSys
findVertCoordForVariable
public FmrcCoordSys.VertCoord findVertCoordForVariable(String searchName)
- Specified by:
findVertCoordForVariable
in interface FmrcCoordSys
findTimeCoordForVariable
public FmrcCoordSys.TimeCoord findTimeCoordForVariable(String searchName,
Date runTime)
- Specified by:
findTimeCoordForVariable
in interface FmrcCoordSys
findSeqForVariable
public FmrcDefinition.RunSeq findSeqForVariable(String name)
writeDefinitionXML
public String writeDefinitionXML()
writeDefinitionXML
public void writeDefinitionXML(OutputStream os)
throws IOException
- Throws:
IOException
makeDefinitionXML
public org.jdom.Document makeDefinitionXML()
- Create an XML document for the entire collection
- Returns:
- an XML document for the entire collection
readDefinitionXML
public boolean readDefinitionXML(String xmlLocation)
throws IOException
- Throws:
IOException
makeFromCollectionInventory
public void makeFromCollectionInventory(FmrcInventory fmrc)
addVertCoordsFromCollectionInventory
public void addVertCoordsFromCollectionInventory(FmrcInventory fmrc)
- Add just the vertical coord info to the definition
- Parameters:
fmrc
- the collection inventory
getDefinitionFiles
public static String[] getDefinitionFiles()
main
public static void main(String[] args)
throws IOException
- Throws:
IOException
Copyright © 1999-2011 UCAR/Unidata. All Rights Reserved.