ucar.nc2.dt.fmrc
Class FmrcImpl

java.lang.Object
  extended by ucar.nc2.dt.fmrc.FmrcImpl
All Implemented Interfaces:
ForecastModelRunCollection

public class FmrcImpl
extends java.lang.Object
implements ForecastModelRunCollection

ForecastModelRunCollection implementation. Uses a GridDataset that has two time dimensions. Assume all grids have the same runTime dimension.

Version:
$Revision$ $Date$
Author:
caron

Constructor Summary
FmrcImpl(NetcdfDataset ncd)
           
FmrcImpl(java.lang.String filename)
           
 
Method Summary
 void close()
           
 NetcdfDataset getBestTimeSeries()
          Get a NetcdfDataset that has the "best" time series, across model runs.
 NetcdfDataset getFmrcDataset()
          Get a NetcdfDataset that is the underlying datasets with the "2d time"
 java.util.List getForecastDates()
          Get the list of possible forecast dates, to be used in getForecastTimeDataset().
 NetcdfDataset getForecastOffsetDataset(double hours)
          Get a NetcdfDataset that has all the data for a fixed forecast offset, across model runs.
 java.util.List getForecastOffsets()
          Get the list of possible forecast offsets, to be used in getForecastOffsetDataset().
 NetcdfDataset getForecastTimeDataset(java.util.Date forecastTime)
          Get a NetcdfDataset that has all the data for a fixed forecast time, across model runs.
 GridDataset getGridDataset()
          Get the underlying GridDataset.
 java.util.List getRunDates()
          Get the list of possible run dates, to be used in getRunTimeDataset().
 NetcdfDataset getRunTimeDataset(java.util.Date wantRuntime)
          Get a NetcdfDataset that has all the data for a model run.
static void main(java.lang.String[] args)
           
 boolean sync()
          Check if file has changed, and reread metadata if needed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FmrcImpl

public FmrcImpl(java.lang.String filename)
         throws java.io.IOException
Throws:
java.io.IOException

FmrcImpl

public FmrcImpl(NetcdfDataset ncd)
         throws java.io.IOException
Throws:
java.io.IOException
Method Detail

sync

public boolean sync()
             throws java.io.IOException
Check if file has changed, and reread metadata if needed. All previous object references (variables, dimensions, etc) may become invalid - you must re-obtain.

Specified by:
sync in interface ForecastModelRunCollection
Returns:
true if file was changed.
Throws:
java.io.IOException

getGridDataset

public GridDataset getGridDataset()
Description copied from interface: ForecastModelRunCollection
Get the underlying GridDataset.

Specified by:
getGridDataset in interface ForecastModelRunCollection
Returns:
the GridDataset containing that data.

close

public void close()
           throws java.io.IOException
Specified by:
close in interface ForecastModelRunCollection
Throws:
java.io.IOException

getRunDates

public java.util.List getRunDates()
Description copied from interface: ForecastModelRunCollection
Get the list of possible run dates, to be used in getRunTimeDataset().

Specified by:
getRunDates in interface ForecastModelRunCollection
Returns:
List of Date

getRunTimeDataset

public NetcdfDataset getRunTimeDataset(java.util.Date wantRuntime)
Description copied from interface: ForecastModelRunCollection
Get a NetcdfDataset that has all the data for a model run. The time coordinate will be the forecast time. The runtime will be a global attribute called "_runTime" containing an ISO date string.

Specified by:
getRunTimeDataset in interface ForecastModelRunCollection
Parameters:
wantRuntime - names the run
Returns:
the NetcdfDataset for that data.

getForecastDates

public java.util.List getForecastDates()
Description copied from interface: ForecastModelRunCollection
Get the list of possible forecast dates, to be used in getForecastTimeDataset().

Specified by:
getForecastDates in interface ForecastModelRunCollection
Returns:
List of Date

getForecastTimeDataset

public NetcdfDataset getForecastTimeDataset(java.util.Date forecastTime)
Description copied from interface: ForecastModelRunCollection
Get a NetcdfDataset that has all the data for a fixed forecast time, across model runs. The time coordinate will be the run time. The forecast time will be a global attribute called "_forecastTime" containing an ISO date string.

Specified by:
getForecastTimeDataset in interface ForecastModelRunCollection
Parameters:
forecastTime - the forecast time to fix.
Returns:
the NetcdfDataset for that data.

getForecastOffsets

public java.util.List getForecastOffsets()
Description copied from interface: ForecastModelRunCollection
Get the list of possible forecast offsets, to be used in getForecastOffsetDataset().

Specified by:
getForecastOffsets in interface ForecastModelRunCollection
Returns:
List of Double

getForecastOffsetDataset

public NetcdfDataset getForecastOffsetDataset(double hours)
Description copied from interface: ForecastModelRunCollection
Get a NetcdfDataset that has all the data for a fixed forecast offset, across model runs. The time coordinate will be the forecast time. There will be a String-valued variable called "RunTime(time)" containing an array of ISO date strings.

Specified by:
getForecastOffsetDataset in interface ForecastModelRunCollection
Parameters:
hours - the forecast offset time to fix, in hours.
Returns:
the NetcdfDataset containing that data.

getBestTimeSeries

public NetcdfDataset getBestTimeSeries()
Description copied from interface: ForecastModelRunCollection
Get a NetcdfDataset that has the "best" time series, across model runs. The time coordinate will be the forecast time. There will be a String-valued variable called "RunTime(time)" containing an array of ISO date strings.

Specified by:
getBestTimeSeries in interface ForecastModelRunCollection
Returns:
the NetcdfDataset containing that data.

getFmrcDataset

public NetcdfDataset getFmrcDataset()
Description copied from interface: ForecastModelRunCollection
Get a NetcdfDataset that is the underlying datasets with the "2d time"

Specified by:
getFmrcDataset in interface ForecastModelRunCollection
Returns:
the NetcdfDataset containing that data.

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
Throws:
java.io.IOException