Package 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
-
-
Field Summary
Fields Modifier and Type Field Description protected doublealtScaleFactorprotected ucar.unidata.geoloc.LatLonRectboundingBoxprotected Formattererrsprotected StringlatVNameprotected StringlonVNameprotected doublemaxDateprotected doubleminDateprotected ucar.nc2.dataset.NetcdfDatasetncfileprotected StringnomTimeVNameprotected ucar.nc2.DimensionobsDimprotected StringobsTimeVNameprotected ucar.nc2.dataset.StructureDSrecordVarprotected ucar.nc2.ft.point.StationHelperstationHelperprotected ucar.ma2.DataTypestationIdTypeprotected StringstnDescVNameprotected StringstnIdVNameprotected StringstnIndexVNameprotected ucar.nc2.time.CalendarDateUnittimeUnitprotected StringzcoordUnitsprotected StringzcoordVName
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ucar.nc2.ft.PointFeaturefactory(ucar.unidata.geoloc.StationImpl s, ucar.ma2.StructureData sdata, int recno)doublegetLatitude(ucar.ma2.StructureData sdata)ucar.unidata.geoloc.LatLonPointgetLocation(ucar.ma2.StructureData sdata)doublegetLongitude(ucar.ma2.StructureData sdata)protected static doublegetMetersConversionFactor(String unitsString)doublegetObservationTime(ucar.ma2.StructureData sdata)ucar.nc2.time.CalendarDategetObservationTimeAsDate(ucar.ma2.StructureData sdata)intgetRecordCount()ucar.nc2.StructuregetRecordVar()ucar.nc2.time.CalendarDateUnitgetTimeUnit()doublegetZcoordinate(ucar.ma2.StructureData sdata)StringgetZcoordUnits()voidsetLocationInfo(String latVName, String lonVName, String zcoordVName)voidsetShortNames(String latVName, String lonVName, String altVName, String obsTimeVName, String nomTimeVName)voidsetStationInfo(String stnIdVName, String stnDescVName, String stnIndexVName, ucar.nc2.ft.point.StationHelper stationHelper)Set extra information used by station obs datasets.voidsetTimeUnit(ucar.nc2.time.CalendarDateUnit timeUnit)
-
-
-
Field Detail
-
ncfile
protected ucar.nc2.dataset.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 ucar.nc2.ft.point.StationHelper stationHelper
-
stationIdType
protected ucar.ma2.DataType stationIdType
-
recordVar
protected ucar.nc2.dataset.StructureDS recordVar
-
obsDim
protected ucar.nc2.Dimension obsDim
-
boundingBox
protected ucar.unidata.geoloc.LatLonRect boundingBox
-
minDate
protected double minDate
-
maxDate
protected double maxDate
-
timeUnit
protected ucar.nc2.time.CalendarDateUnit timeUnit
-
altScaleFactor
protected double altScaleFactor
-
errs
protected Formatter errs
-
-
Constructor Detail
-
RecordDatasetHelper
public RecordDatasetHelper(ucar.nc2.dataset.NetcdfDataset ncfile, String obsTimeVName, String nomTimeVName, List<ucar.nc2.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.
-
-
Method Detail
-
setStationInfo
public void setStationInfo(String stnIdVName, String stnDescVName, String stnIndexVName, ucar.nc2.ft.point.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
-
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 ucar.nc2.Structure getRecordVar()
-
getRecordCount
public int getRecordCount()
-
setTimeUnit
public void setTimeUnit(ucar.nc2.time.CalendarDateUnit timeUnit)
-
getTimeUnit
public ucar.nc2.time.CalendarDateUnit getTimeUnit()
-
getLocation
public ucar.unidata.geoloc.LatLonPoint getLocation(ucar.ma2.StructureData sdata)
-
getLatitude
public double getLatitude(ucar.ma2.StructureData sdata)
-
getLongitude
public double getLongitude(ucar.ma2.StructureData sdata)
-
getZcoordinate
public double getZcoordinate(ucar.ma2.StructureData sdata)
-
getZcoordUnits
public String getZcoordUnits()
-
getObservationTimeAsDate
public ucar.nc2.time.CalendarDate getObservationTimeAsDate(ucar.ma2.StructureData sdata)
-
getObservationTime
public double getObservationTime(ucar.ma2.StructureData sdata)
-
factory
public ucar.nc2.ft.PointFeature factory(ucar.unidata.geoloc.StationImpl s, ucar.ma2.StructureData sdata, int recno)
-
-