wdmtoolbox.wdmtoolbox.setattrib¶
- wdmtoolbox.wdmtoolbox.setattrib(wdmpath, dsn, attrib_name, attrib_val)¶
Set an attribute value for the DSN.
See WDM documentation for full list of possible attributes and valid values.
- Parameters:
wdmpath (str) – Path and WDM filename.
dsn (int) – The Data Set Number (DSN) for the time series in the WDM file. This number must be greater or equal to 1 and less than or equal to 32000. HSPF can only use for input or output DSNs of 1 to 9999, inclusive.
attrib_name –
There are over 400 attributes that can be set for a DSN. Some of the more commonly used ones are:
attrib_name
Alias
Type
Length
Description
IDCONS
Constituent
str
8
Constituent
IDLOCN
Location
str
16
Station ID / Location
IDSCEN
Scenario
str
8
Scenario
STANAM
str
48
Descriptive Name
TCODE
int
Time Series Code
TSBYR
int
Base Year
TSTYPE
str
4
Time Series Type
TSFILL
float
Time Series Fill
TSSTEP
int
Time Series Step
attrib_val – Value for attribute. Must be correct type and a valid value.