Dewberry / ripple1d

Utilities for reuse of HEC-RAS models for NWM
https://ripple1d.readthedocs.io/en/latest/
MIT License
3 stars 0 forks source link

Truncate XS river station to 8 characters #266

Open sclaw opened 3 days ago

sclaw commented 3 days ago

lines 385-388 in data_model.py return the river station for a cross-section, but they are not truncated to 8 characters. This can throw an error on line 327 of ras_run.py where the river station is used to lookup values in the rating curve database. The river station in that database is truncated to 8 characters.

To recreate this error, run KWSE run for collection: ble_11100303_DeepFork source model: DEEP_FORK_CANADIAN_RIVER sub model: 533279

Recommend updating line 388 of data_model.py to something like return float(self.split_xs_header(1).replace("*", ""))[:8]

sclaw commented 3 days ago

Another example

collection_id = "ble_12100201_UpperGuadalupe" stac_item = "Guadalupe_River"