ucar.nc2.ft.point
Class RecordDatasetHelper
java.lang.Object
ucar.nc2.ft.point.RecordDatasetHelper
public class RecordDatasetHelper
- extends Object
Helper class for using the netcdf-3 record dimension.
- Since:
- Feb 29, 2008
- Author:
- caron
Method Summary |
PointFeature |
factory(StationImpl s,
StructureData sdata,
int recno)
|
double |
getLatitude(StructureData sdata)
|
LatLonPoint |
getLocation(StructureData sdata)
|
double |
getLongitude(StructureData sdata)
|
protected static double |
getMetersConversionFactor(String unitsString)
|
double |
getObservationTime(StructureData sdata)
|
Date |
getObservationTimeAsDate(StructureData sdata)
|
int |
getRecordCount()
|
Structure |
getRecordVar()
|
DateUnit |
getTimeUnit()
|
double |
getZcoordinate(StructureData sdata)
|
String |
getZcoordUnits()
|
void |
setLocationInfo(String latVName,
String lonVName,
String zcoordVName)
|
void |
setShortNames(String latVName,
String lonVName,
String altVName,
String obsTimeVName,
String nomTimeVName)
|
void |
setStationInfo(String stnIdVName,
String stnDescVName,
String stnIndexVName,
StationHelper stationHelper)
Set extra information used by station obs datasets. |
void |
setTimeUnit(DateUnit timeUnit)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ncfile
protected NetcdfDataset ncfile
obsTimeVName
protected String obsTimeVName
nomTimeVName
protected String nomTimeVName
latVName
protected String latVName
lonVName
protected String lonVName
zcoordVName
protected String zcoordVName
zcoordUnits
protected String zcoordUnits
stnIdVName
protected String stnIdVName
stnIndexVName
protected String stnIndexVName
stnDescVName
protected String stnDescVName
stationHelper
protected StationHelper stationHelper
stationIdType
protected DataType stationIdType
recordVar
protected StructureDS recordVar
obsDim
protected Dimension obsDim
boundingBox
protected LatLonRect boundingBox
minDate
protected double minDate
maxDate
protected double maxDate
timeUnit
protected DateUnit timeUnit
altScaleFactor
protected double altScaleFactor
errs
protected Formatter errs
showErrors
protected boolean showErrors
RecordDatasetHelper
public RecordDatasetHelper(NetcdfDataset ncfile,
String obsTimeVName,
String nomTimeVName,
List<VariableSimpleIF> typedDataVariables,
String recDimName,
Formatter errBuffer)
- Constructor.
- Parameters:
ncfile
- the netccdf filetypedDataVariables
- list of data variables; all record variables will be added to this list, except . You
can remove extraobsTimeVName
- observation time variable name (required)nomTimeVName
- nominal time variable name (may be null)
- Throws:
IllegalArgumentException
- if ncfile has no unlimited dimension and recDimName is null.
setStationInfo
public void setStationInfo(String stnIdVName,
String stnDescVName,
String stnIndexVName,
StationHelper stationHelper)
- Set extra information used by station obs datasets.
Use stnIdVName or stnIndexVName.
- Parameters:
stnIdVName
- the obs variable that is used to find the station in the stnHash; may be type int or a String (char).stnDescVName
- optional station var containing station description
setLocationInfo
public void setLocationInfo(String latVName,
String lonVName,
String zcoordVName)
setShortNames
public void setShortNames(String latVName,
String lonVName,
String altVName,
String obsTimeVName,
String nomTimeVName)
getMetersConversionFactor
protected static double getMetersConversionFactor(String unitsString)
throws Exception
- Throws:
Exception
getRecordVar
public Structure getRecordVar()
getRecordCount
public int getRecordCount()
setTimeUnit
public void setTimeUnit(DateUnit timeUnit)
getTimeUnit
public DateUnit getTimeUnit()
getLocation
public LatLonPoint getLocation(StructureData sdata)
getLatitude
public double getLatitude(StructureData sdata)
getLongitude
public double getLongitude(StructureData sdata)
getZcoordinate
public double getZcoordinate(StructureData sdata)
getZcoordUnits
public String getZcoordUnits()
getObservationTimeAsDate
public Date getObservationTimeAsDate(StructureData sdata)
getObservationTime
public double getObservationTime(StructureData sdata)
factory
public PointFeature factory(StationImpl s,
StructureData sdata,
int recno)
Copyright © 1999-2011 UCAR/Unidata. All Rights Reserved.