colinsheppard / insalmo

The Individual-Based Salmon Stream Model
GNU General Public License v2.0
2 stars 0 forks source link

Fix hydraulic file reader: tabs at end of line and error checking #31

Closed SFRailsback closed 13 years ago

SFRailsback commented 13 years ago

This may have already been fixed: HydraulicFileReader crashes if there is white space (tabs, at least) at the end of a line.

Also: the documentation says that the code makes these checks, not all of which are implemented yet: The software makes several checks when reading in the cell hydraulics file: • The cell numbers must correspond with those in the cell geometry file: each cell defined in the geometry file receives hydraulic input and there are no cells in the hydraulic file but not in the geometry file. • The flows on line 3 must be in order of increasing magnitude. • The number of values on each row of hydraulic input (file lines 5 and higher) must equal one (the cell number) plus two times the number of flows defined line 3. • There must be no negative velocities. • Any negative depth values are set to zero (some hydraulic models as- sign negative depths to locations above the water level).

(submitted for inSTREAM too.)

colinsheppard commented 13 years ago

Steve, can you clarify what the first bullet means, in particular the phrase "there are no cells in the hydraulic file but not in the geometry file."