TexasStorm¶
Texas dimensionless hyetographs: empirical percentile curves, the triangular model, and the L-gamma model.
Usage¶
from hms_commander import TexasStorm
# Empirical: 2nd-quartile, median curve, 24-hr class '12-24', 8 in
hyeto = TexasStorm.generate_hyetograph(
total_depth_inches=8.0, duration_hours=24, method="empirical",
quartile=2, percentile=50, duration_class="12-24", time_interval_min=30,
)
# Triangular: the parameter set must be named (the sources publish two)
hyeto = TexasStorm.generate_hyetograph(
8.0, 12, "triangular", param_set="nws_hourly", time_interval_min=60,
)
# L-gamma
hyeto = TexasStorm.generate_hyetograph(15.0, 24, "lgamma", duration_class="12-24")
The result has the same columns as ScsTypeStorm and Atlas14Storm
(hour, incremental_depth, cumulative_depth, with a t=0 row). The source
and selections are in hyeto.attrs["provenance"].
HDM recommendation and duration-class selection¶
The TxDOT HDM (2019, p. 4-80) recommends the 50th-percentile combined (first- through fourth-quartile) curve for the 0-72 hr group, tabulated in HDM Table 4-16, for any storm duration. To request it:
hyeto = TexasStorm.generate_hyetograph(
total_depth_inches=8.0, duration_hours=24, method="empirical",
quartile="all", duration_class="0-72", percentile=50,
)
The 0-72 class is never selected automatically. When duration_class is
omitted, the empirical method picks the duration-specific class (0-6, 6-12,
12-24, 24-72 hr) that contains the duration, as offered in SIR 2004-5075; the
HDM does not use these duration-specific classes. quartile must always be
given.
Sources and data origin¶
| Method | Source | Data origin |
|---|---|---|
| empirical | Williams-Sether and others (2004), USGS SIR 2004-5075, Supplements 4 and 5 (SIR Table 4 is the median of Supplement 5, 0-72 hr) | Runoff-producing storms on small watersheds in Texas, 1959-86 |
triangular, usgs_runoff |
Asquith and others (2005), TxDOT 0-4194-4, Tables 4-5; Eq. 1-2 (HDM Eq. 4-26, 4-27) | The same small-watershed runoff-producing storm database |
triangular, nws_hourly |
0-4194-4 Tables 7-9; HDM 2019 Table 4-13 (the only triangular set the HDM publishes) | National Weather Service hourly point gages (Texas, Oklahoma, New Mexico), storms of at least 1 inch |
| lgamma | TxDOT 0-4194-4; HDM 2019 Eq. 4-28, Table 4-15 | See 0-4194-4 |
The tabulated empirical values are in hms_commander/data/texas_empirical_hyetographs.csv.
scripts/texas_hyetograph_transcription.py compares two independent readings
of the report (PDF text layer and OCR of the page images) and writes the file.
Selections the caller must make¶
- Triangular parameter set. Two sets are published and they differ:
usgs_runoff(0-4194-4 Tables 4-5: a = 0.23 for 0-24 hr, 0.35 for 24-72 hr) andnws_hourly(0-4194-4 Tables 7-9 and HDM Table 4-13: a = 0.02197, 0.28936, 0.38959 for 5-12, 13-24, 25-72 hr). No default is applied. - Duration class. Classes are 0-6, 6-12, 12-24, 24-72 hr (empirical);
0-12, 12-24, 24-72 hr (L-gamma); and the triangular classes above. A
duration on an overlapping class boundary needs an explicit
duration_class. Thenws_hourlyclasses do not overlap, so durations of exactly 12 or 24 hr select automatically (the 5-12 or 13-24 hr class, respectively). HDM says to use the class giving the more severe runoff for exactly 12 or 24 hr; that choice is left to the caller where classes overlap. - Quartile (empirical): 1, 2, 3, 4, or
"all". - Non-monotone published columns (empirical): see below.
Supported durations¶
- All methods: more than 0 and at most 72 hr; the duration must be a whole
multiple of
time_interval_min. nws_hourly: 5-12, 13-24 and 25-72 hr (HDM Table 4-13, p. 4-74). Durations between the classes (12-13 hr and 24-25 hr) are not tabulated and are rejected; an explicitduration_classdoes not change this. Durations under 5 hr are also rejected. A 6 hr storm uses the 5-12 hr class, which is how 0-4194-4 Example 1 applies the model (it calls it the 0-12 hour model). The 5 hr lower bound reflects the hourly-data sample in 0-4194-4.
Applicability¶
- The sources state a limit of less than about 160 mi2 for the empirical
curves (SIR 2004-5075; HDM p. 4-77). Pass
drainage_area_sqmito get aUserWarningabove the limit; the warning is issued formethod="empirical"only. Other methods are not checked against an area limit. total_depth_inchesandduration_hoursmust be finite and positive, anddrainage_area_sqmi, if given, must be finite and positive. NaN and infinity are rejected withValueError.- Storms of at least 1 inch of rainfall (warning below), durations up to 72 hr.
- The source reports no data for the 10th and 90th percentiles of
fourth-quartile 0-6 hr storms; requesting them raises
ValueError.
Empirical curve handling¶
- End points. The curves are tabulated at the centers of 2.5-percent intervals (2.5 to 97.5). Generation adds (0, 0) and (100, 100) and interpolates linearly. The SIR does not tabulate these end points; HDM Table 4-16 lists them.
- 2.5-percent value of the combined median. HDM Table 4-16 prints 8.70 for the 50th percentile at 2.5 percent of duration. SIR 2004-5075 Table 4 and Supplement 5 give 6.37 (8.70 is the first-quartile value in SIR Table 4). This module uses the SIR value, 6.37.
-
Non-monotone published columns. Eight tabulated columns decrease somewhere with time (Supplement 4: quartile 1 24-72 hr 75th, quartile 3 0-6 hr 10th; Supplement 5: quartile 1 24-72 hr 90th, quartile 3 12-24 hr 10th, 25th, 30th, 40th, 50th percentiles). All median curves other than quartile 3 12-24 hr are monotone, and the combined 0-72 hr curve is unaffected. The
nonmonotoneargument controls the behavior:"raise"(default):ValueErrornaming the supplement table page and the opt-in option. Example: Supplement 5, p. 113, quartile 3, 12-24 hr, 40th percentile."running_max": the running maximum is applied. The number of adjusted ordinates (monotone_points_adjusted) and the largest adjustment in percent points (max_monotone_adjustment_pct; 1.09 for the case above, 11.76 raised to 12.85 at 37.5 percent of duration) are recorded inhyeto.attrs["provenance"]. The sources do not prescribe this repair.
The bundled CSV and
get_empirical_curvereturn the published values unchanged.
hyeto = TexasStorm.generate_hyetograph(
5.0, 18, "empirical", quartile=3, duration_class="12-24", percentile=40,
nonmonotone="running_max",
)
hms_commander.TexasStorm
¶
TexasStorm - Texas Dimensionless Hyetographs (Empirical, Triangular, L-gamma)
Generates cumulative-rainfall hyetographs from the dimensionless Texas hyetograph models published by USGS and TxDOT and adopted in the TxDOT Hydraulic Design Manual (HDM, Chapter 4, Section 13).
Functions:
| Name | Description |
|---|---|
- ``empirical`` |
tabulated percentile curves by storm quartile and storm duration class (Williams-Sether and others, 2004, USGS SIR 2004-5075, Supplements 4 and 5; Table 4 of that report is the 50th percentile of Supplement 5, 0-72 hr). |
- ``triangular`` |
two-parameter triangular model (Asquith and others, 2005, TxDOT 0-4194-4, Eq. 1-2; HDM Eq. 4-26 and 4-27). |
- ``lgamma`` |
L-gamma model p(F) = F**b * exp(c * (1 - F)) (0-4194-4, Eq. 11; HDM Eq. 4-28 and Table 4-15). |
Explicit choices (no silent defaults):
- Two different triangular parameter sets are published (see
TRIANGULAR_PARAMETER_SETS); param_set must be given.
- A duration on an overlapping duration-class boundary requires an explicit
duration_class. The non-overlapping nws_hourly class endpoints
of exactly 12 and 24 hr are selected automatically.
- The empirical quartile must be given.
- A few published empirical columns decrease slightly with time. By
default (nonmonotone="raise") generation raises ValueError;
nonmonotone="running_max" applies a running maximum and records the
adjustment in the provenance.
Applicability limits (from the sources):
- Empirical curves were developed for small watersheds, less than about
160 square miles (SIR 2004-5075; HDM 2019 p. 4-77). A UserWarning is
issued for the empirical method when drainage_area_sqmi exceeds
MAX_DRAINAGE_AREA_SQMI. The sources state this limit for the
empirical curves only.
- All three models are for storms of at least 1 inch of rainfall; a
warning is issued for smaller depths.
- Storm durations up to 72 hr. The nws_hourly triangular set covers
5-12, 13-24 and 25-72 hr (HDM Table 4-13, p. 4-74); durations between
the classes (12-13 and 24-25 hr) and below 5 hr are not supported and
are rejected.
Output follows the sibling storm classes: a DataFrame with hour,
incremental_depth and cumulative_depth columns and a t=0 zero row.
Example
from hms_commander import TexasStorm hyeto = TexasStorm.generate_hyetograph( ... total_depth_inches=8.0, ... duration_hours=12, ... method='triangular', ... param_set='nws_hourly', ... time_interval_min=60, ... ) round(float(hyeto['cumulative_depth'].iloc[-1]), 6) 8.0
References
Williams-Sether, T., Asquith, W.H., Thompson, D.B., Cleveland, T.G., and Fang, X., 2004, Empirical, dimensionless, cumulative-rainfall hyetographs developed from 1959-86 storm data for selected small watersheds in Texas: USGS Scientific Investigations Report 2004-5075.
Asquith, W.H., Roussel, M.C., Thompson, D.B., Cleveland, T.G., and Fang, X., 2005, Summary of dimensionless Texas hyetographs and distribution of storm depth developed for Texas Department of Transportation Research Project 0-4194: TxDOT Report 0-4194-4.
Texas Department of Transportation, 2019, Hydraulic Design Manual, Chapter 4, Section 13 (Equations 4-26 to 4-28, Tables 4-13 to 4-16).
TexasStorm
¶
Static class for generating Texas dimensionless hyetographs.
All methods are static - no instantiation required.
Attributes:
| Name | Type | Description |
|---|---|---|
METHODS |
Valid |
|
EMPIRICAL_QUARTILES |
Valid quartile identifiers ('all' is the first- through fourth-quartile combined data group). |
|
EMPIRICAL_DURATION_CLASSES |
Storm duration classes in hours. |
|
EMPIRICAL_PERCENTILES |
Percentiles tabulated in the supplements. |
|
MAX_DRAINAGE_AREA_SQMI |
Approximate applicability limit (160 mi2). |
|
MIN_STORM_DEPTH_INCHES |
Minimum storm depth in the source data (1 in). |
|
TRIANGULAR_PARAMETER_SETS |
Dict[str, dict]
|
The two published triangular parameter sets. |
LGAMMA_PARAMETERS |
Dict[str, Tuple[float, float, float, float]]
|
L-gamma parameters (b, c) by duration class. |
Source code in hms_commander/TexasStorm.py
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 | |
triangular_cumulative(F, a, b)
staticmethod
¶
Cumulative depth fraction of the triangular model (Eq. 1-2 / HDM 4-26, 4-27).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
F
|
Union[float, ndarray]
|
Elapsed fraction of storm duration, 0 to 1. |
required |
a
|
float
|
Relative duration before peak intensity. |
required |
b
|
float
|
Relative duration after peak intensity (a + b = 1). |
required |
Returns:
| Type | Description |
|---|---|
|
Cumulative fraction of total storm depth, same shape as |
Source code in hms_commander/TexasStorm.py
lgamma_cumulative(F, b, c)
staticmethod
¶
Cumulative depth fraction of the L-gamma model, p(F) = F*b * exp(c(1-F)).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
F
|
Union[float, ndarray]
|
Elapsed fraction of storm duration, 0 to 1. |
required |
b
|
float
|
Shape parameter (HDM Table 4-15). |
required |
c
|
float
|
Shape parameter (HDM Table 4-15). |
required |
Source code in hms_commander/TexasStorm.py
get_empirical_curve(quartile, duration_class, percentile=50, trimmed=True)
staticmethod
¶
Return a published empirical curve exactly as tabulated.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
quartile
|
Union[int, str]
|
1, 2, 3, 4, or 'all' (first- through fourth-quartile storms combined). |
required |
duration_class
|
str
|
One of |
required |
percentile
|
int
|
One of |
50
|
trimmed
|
bool
|
True for Supplement 5 (trimmed and smoothed, the source
of SIR Table 4); False for Supplement 4 (untrimmed and
smoothed). Must be a real boolean ( |
True
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame with columns |
DataFrame
|
interval, 2.5 to 97.5) and |
DataFrame
|
storm depth). The curve is not anchored at 0 or 100 percent. |
Raises:
| Type | Description |
|---|---|
ValueError
|
For unknown selectors or when the source reports no data ('--') for the requested curve. |
Source code in hms_commander/TexasStorm.py
generate_hyetograph(total_depth_inches, duration_hours, method, time_interval_min=60, quartile=None, percentile=50, trimmed=True, param_set=None, duration_class=None, drainage_area_sqmi=None, nonmonotone='raise')
staticmethod
¶
Generate a Texas dimensionless hyetograph scaled to a depth and duration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
total_depth_inches
|
float
|
Total storm depth (inches). |
required |
duration_hours
|
float
|
Storm duration (hours), at most 72. |
required |
method
|
str
|
'empirical', 'triangular', or 'lgamma'. |
required |
time_interval_min
|
int
|
Output time step in minutes (default 60). The duration must be a whole multiple of the interval. |
60
|
quartile
|
Optional[Union[int, str]]
|
Required for 'empirical': 1, 2, 3, 4, or 'all'. |
None
|
percentile
|
int
|
Empirical percentile (default 50). Integral floats and
NumPy numeric scalars are accepted and normalized to |
50
|
trimmed
|
bool
|
Empirical only. True (default) uses SIR 2004-5075
Supplement 5 (trimmed, smoothed; SIR Table 4 is its median);
False uses Supplement 4 (untrimmed, smoothed). Must be a real
boolean ( |
True
|
param_set
|
Optional[str]
|
Required for 'triangular': 'usgs_runoff' or
'nws_hourly'. See |
None
|
duration_class
|
Optional[str]
|
Optional explicit class. Required when
|
None
|
drainage_area_sqmi
|
Optional[float]
|
Optional watershed area; must be finite and
positive if given. For 'empirical' only, a |
None
|
nonmonotone
|
str
|
Empirical only. 'raise' (default) raises
|
'raise'
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
pd.DataFrame with columns: - 'hour': time from storm start (float) - 'incremental_depth': depth in the interval ending at 'hour' (in) - 'cumulative_depth': cumulative depth (in) |
DataFrame
|
Length = duration / interval + 1 (row 0 is the t=0 zero row). |
DataFrame
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
Non-finite or non-positive depth, duration or area;
invalid or ambiguous selections; durations over 72 hr or in an
unsupported gap; an interval that does not divide the
duration; an empirical curve for which the source gives no
data; or a non-monotone published column with
|
Note
For 'empirical', the tabulated curve (values at the centers of
2.5-percent intervals) is linearly interpolated with (0, 0) and
(100, 100) added as end points (as in HDM Table 4-16). If a
published column decreases with time (8 of the tabulated columns),
the nonmonotone policy applies.
Example
hyeto = TexasStorm.generate_hyetograph( ... 10.0, 24, 'empirical', quartile=2, duration_class='12-24', ... time_interval_min=30) len(hyeto) 49
Source code in hms_commander/TexasStorm.py
411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 | |