HecDss get() and put() functions return DataContainer objects. DataContainers are a base for different types of data. The
TimeSeriesContainer and PairedDataContainer classes discussed below are both types of
DataContainer classes. DataContainer objects have no methods that can be
called by the user, but all data fields of DataContainer objects are directly accessible.
DataContainer data fields are described in the table below.
You can also exchange DataContainers with HecMath objects. Both TimeSeriesContainer and PairedDataContainer classes are extracted from HecMath objects using the getData() method as documented in the Get Data Container section. HecMath objects can be updated from DataContainer objects using the setData() method as documented in the Set Data Container section.
DataContainer Data Fields
|
Field |
Type |
Description |
|
fullName |
string |
The full name associated with the data in the data store (DSS pathname, if the DataContainer is associated with a DSS file) |
|
location |
string |
The location associated with the data (DSS pathname B-part if the DataContainer is associated with a DSS file). |
|
subVersion |
string |
The sub-version associated with the data. |
|
Version |
string |
The version associated with the data (DSS pathname F-part if the DataContainer is associated with a DSS file). |
|
Watershed |
string |
The watershed associated with the data (DSS pathname A-part if the DataContainer is associated with a DSS file). |
|
Example: Extracting a DataContainer from HecMath
from hec.script import * from hec.hecmath import * theFile = DSS.open(“myFile.dss”) flowDataSet = theFile.read(“/BASIN/LOC/FLOW/01NOV2002/1HOUR/OBS/”) theFile.done() flowData = flowDataSet.getData() thisWatershed = flowData.watershed
|
More: