|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.nc2.dt.point.RecordDatasetHelper
public class RecordDatasetHelper
Helper class for using the netcdf-3 record dimension. Can be used for PointObs or StationObs.
| Nested Class Summary | |
|---|---|
class |
RecordDatasetHelper.RecordPointObs
|
class |
RecordDatasetHelper.RecordStationObs
|
| Field Summary | |
|---|---|
protected double |
altScaleFactor
|
protected java.lang.String |
altVName
|
protected LatLonRect |
boundingBox
|
protected java.lang.StringBuffer |
errs
|
protected java.lang.String |
latVName
|
protected java.lang.String |
lonVName
|
protected double |
maxDate
|
protected double |
minDate
|
protected NetcdfDataset |
ncfile
|
protected java.lang.String |
nomTimeVName
|
protected Dimension |
obsDim
|
protected java.lang.String |
obsTimeVName
|
protected StructureDS |
recordVar
|
protected boolean |
showErrors
|
protected DataType |
stationIdType
|
protected java.lang.String |
stnDescVName
|
protected java.util.Map<java.lang.Object,Station> |
stnHash
|
protected java.lang.String |
stnIdVName
|
protected java.lang.String |
stnNameVName
|
protected DateUnit |
timeUnit
|
| Constructor Summary | |
|---|---|
RecordDatasetHelper(NetcdfDataset ncfile,
java.lang.String obsTimeVName,
java.lang.String nomTimeVName,
java.util.List typedDataVariables)
Constructor. |
|
RecordDatasetHelper(NetcdfDataset ncfile,
java.lang.String obsTimeVName,
java.lang.String nomTimeVName,
java.util.List typedDataVariables,
java.lang.StringBuffer errBuffer)
|
|
RecordDatasetHelper(NetcdfDataset ncfile,
java.lang.String obsTimeVName,
java.lang.String nomTimeVName,
java.util.List typedDataVariables,
java.lang.String recDimName,
java.lang.StringBuffer errBuffer)
Constructor. |
|
| Method Summary | |
|---|---|
java.util.List |
getData(java.util.ArrayList records,
LatLonRect boundingBox,
CancelTask cancel)
|
java.util.List |
getData(java.util.ArrayList records,
LatLonRect boundingBox,
double startTime,
double endTime,
CancelTask cancel)
|
int |
getRecordCount()
|
Structure |
getRecordVar()
|
DateUnit |
getTimeUnit()
|
java.util.ArrayList |
readAllCreateObs(CancelTask cancel)
This reads through all the records in the dataset, and constructs a list of RecordPointObs or RecordStationObs. |
void |
setLocationInfo(java.lang.String latVName,
java.lang.String lonVName,
java.lang.String altVName)
|
void |
setShortNames(java.lang.String latVName,
java.lang.String lonVName,
java.lang.String altVName,
java.lang.String obsTimeVName,
java.lang.String nomTimeVName)
|
void |
setStationInfo(java.lang.String stnIdVName,
java.lang.String stnDescVName)
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 |
| Field Detail |
|---|
protected NetcdfDataset ncfile
protected java.lang.String obsTimeVName
protected java.lang.String nomTimeVName
protected java.lang.String stnIdVName
protected java.lang.String stnNameVName
protected java.lang.String stnDescVName
protected java.lang.String latVName
protected java.lang.String lonVName
protected java.lang.String altVName
protected DataType stationIdType
protected java.util.Map<java.lang.Object,Station> stnHash
protected StructureDS recordVar
protected Dimension obsDim
protected LatLonRect boundingBox
protected double minDate
protected double maxDate
protected DateUnit timeUnit
protected double altScaleFactor
protected java.lang.StringBuffer errs
protected boolean showErrors
| Constructor Detail |
|---|
public RecordDatasetHelper(NetcdfDataset ncfile,
java.lang.String obsTimeVName,
java.lang.String nomTimeVName,
java.util.List typedDataVariables)
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)
java.lang.IllegalArgumentException - if ncfile has no unlimited dimension.
public RecordDatasetHelper(NetcdfDataset ncfile,
java.lang.String obsTimeVName,
java.lang.String nomTimeVName,
java.util.List typedDataVariables,
java.lang.StringBuffer errBuffer)
public RecordDatasetHelper(NetcdfDataset ncfile,
java.lang.String obsTimeVName,
java.lang.String nomTimeVName,
java.util.List typedDataVariables,
java.lang.String recDimName,
java.lang.StringBuffer errBuffer)
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)
java.lang.IllegalArgumentException - if ncfile has no unlimited dimension and recDimName is null.| Method Detail |
|---|
public void setStationInfo(java.lang.String stnIdVName,
java.lang.String stnDescVName)
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
public void setLocationInfo(java.lang.String latVName,
java.lang.String lonVName,
java.lang.String altVName)
public Structure getRecordVar()
public int getRecordCount()
public void setTimeUnit(DateUnit timeUnit)
public DateUnit getTimeUnit()
public java.util.ArrayList readAllCreateObs(CancelTask cancel)
throws java.io.IOException
If stnIdVName is not null, its a StationDataset, then construct a Station HashMap of StationImpl objects. Add the RecordStationObs into the list of obs for that station.
cancel - allow user to cancel
java.io.IOException
public void setShortNames(java.lang.String latVName,
java.lang.String lonVName,
java.lang.String altVName,
java.lang.String obsTimeVName,
java.lang.String nomTimeVName)
public java.util.List getData(java.util.ArrayList records,
LatLonRect boundingBox,
CancelTask cancel)
throws java.io.IOException
java.io.IOException
public java.util.List getData(java.util.ArrayList records,
LatLonRect boundingBox,
double startTime,
double endTime,
CancelTask cancel)
throws java.io.IOException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||