ucar.nc2.ft.fmrc
Class Fmrc

java.lang.Object
  extended by ucar.nc2.ft.fmrc.Fmrc

@ThreadSafe
public class Fmrc
extends Object

Forecast Model Run Collection, manages dynamic collections of GridDatasets. Fmrc represents a virtual dataset. To instantiate, you obtain an FmrcInv "snapshot" from which you can call getDatatset().

Assumes that we dont have multiple runtimes in the same file. Can handle different time steps in different files. Can handle different grids in different files. However this creates problems for the "typical dataset". Cannot handle different ensembles in different files. (LOOK fix) Cannot handle different levels in different files. ok

Since:
Jan 11, 2010
Author:
caron

Constructor Summary
Fmrc(DatasetCollectionManager manager, FeatureCollectionConfig config)
           
 
Method Summary
 boolean checkInvState(long lastInvChange)
           
 void checkNeeded(boolean force)
           
 boolean checkProtoState(long lastProtoChanged)
           
 void close()
           
 GridDataset getConstantForecastDataset(Date time)
           
 GridDataset getConstantOffsetDataset(double hour)
           
 GridDataset getDataset2D(NetcdfDataset result)
           
 GridDataset getDatasetBest()
           
 GridDataset getDatasetBest(FeatureCollectionConfig.BestDataset bd)
           
 DateRange getDateRangeForOffset(double offset)
           
 DateRange getDateRangeForRun(Date run)
           
 FmrcInv getFmrcInv(Formatter debug)
           
 List<Date> getForecastDates()
           
 double[] getForecastOffsets()
           
 CollectionManager getManager()
           
 List<Date> getRunDates()
           
 GridDataset getRunTimeDataset(Date run)
           
static void main(String[] args)
           
static Fmrc open(FeatureCollectionConfig config, Formatter errlog)
           
static Fmrc open(String collection, Formatter errlog)
          Factory method
 void setNcml(org.jdom.Element outerNcml, org.jdom.Element innerNcml)
           
 void showDetails(Formatter out)
           
 void update()
           
 void updateProto()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Fmrc

public Fmrc(DatasetCollectionManager manager,
            FeatureCollectionConfig config)
Method Detail

open

public static Fmrc open(String collection,
                        Formatter errlog)
                 throws IOException
Factory method

Parameters:
collection - describes the collection. May be one of:
  1. collection specification string
  2. catalog:catalogURL
  3. filename.ncml
collectionSpec date extraction is used to get rundates
errlog - place error messages here
Returns:
Fmrc or null on error
Throws:
IOException - on read error
See Also:
"http://www.unidata.ucar.edu/software/netcdf-java/reference/collections/CollectionSpecification.html"

open

public static Fmrc open(FeatureCollectionConfig config,
                        Formatter errlog)
                 throws IOException
Throws:
IOException

setNcml

public void setNcml(org.jdom.Element outerNcml,
                    org.jdom.Element innerNcml)

close

public void close()

getManager

public CollectionManager getManager()

getFmrcInv

public FmrcInv getFmrcInv(Formatter debug)
                   throws IOException
Throws:
IOException

getDateRangeForRun

public DateRange getDateRangeForRun(Date run)

getDateRangeForOffset

public DateRange getDateRangeForOffset(double offset)

getRunDates

public List<Date> getRunDates()
                       throws IOException
Throws:
IOException

getForecastDates

public List<Date> getForecastDates()
                            throws IOException
Throws:
IOException

getForecastOffsets

public double[] getForecastOffsets()
                            throws IOException
Throws:
IOException

getDataset2D

public GridDataset getDataset2D(NetcdfDataset result)
                         throws IOException
Throws:
IOException

getDatasetBest

public GridDataset getDatasetBest()
                           throws IOException
Throws:
IOException

getDatasetBest

public GridDataset getDatasetBest(FeatureCollectionConfig.BestDataset bd)
                           throws IOException
Throws:
IOException

getRunTimeDataset

public GridDataset getRunTimeDataset(Date run)
                              throws IOException
Throws:
IOException

getConstantForecastDataset

public GridDataset getConstantForecastDataset(Date time)
                                       throws IOException
Throws:
IOException

getConstantOffsetDataset

public GridDataset getConstantOffsetDataset(double hour)
                                     throws IOException
Throws:
IOException

updateProto

public void updateProto()

update

public void update()

checkInvState

public boolean checkInvState(long lastInvChange)
                      throws IOException
Throws:
IOException

checkProtoState

public boolean checkProtoState(long lastProtoChanged)
                        throws IOException
Throws:
IOException

checkNeeded

public void checkNeeded(boolean force)

showDetails

public void showDetails(Formatter out)
                 throws IOException
Throws:
IOException

main

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


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