diff options
-rw-r--r-- | boundaryDefinition.txt | 6 | ||||
-rwxr-xr-x | makeBoundary.py | 9 |
2 files changed, 6 insertions, 9 deletions
diff --git a/boundaryDefinition.txt b/boundaryDefinition.txt index 31d2ea5..fb6be58 100644 --- a/boundaryDefinition.txt +++ b/boundaryDefinition.txt @@ -23,10 +23,8 @@ channel: 0 # Overtopping tolerance (/m): ztol: 0.01 -# Manning's n coefficients: -n_co_chan: 0.035 -n_co_west: 0.040 -n_co_east: 0.040 +# Manning's n coefficients (comma-separated list, ordered by panel index): +n_co: [0.035, 0.040] # number of height intervals: numH: 50 diff --git a/makeBoundary.py b/makeBoundary.py index 5cc4e2d..f20ed2e 100755 --- a/makeBoundary.py +++ b/makeBoundary.py @@ -23,10 +23,9 @@ definition_dict = read_definition('boundaryDefinition.txt') slope = abs(definition_dict["slope"]) # slope at top boundary target_flow = definition_dict["target_flow"] # imposed discharge location = definition_dict["location"] # boundary location -n_co_chan = definition_dict["n_co_chan"] # coefficient for inland water -n_co_west = definition_dict["n_co_west"] # coefficient for general surface -n_co_east = definition_dict["n_co_east"] # coefficient for general surface -# TODO: use weighted mean 'n' value. See http://help.floodmodeller.com/isis/ISIS/River_Section.htm (Eq. 4) +n_co = definition_dict["n_co"] # Manning's 'n' coefficients +# TODO: use weighted mean 'n' values. See +# http://help.floodmodeller.com/isis/ISIS/River_Section.htm (Eq. 4) # Note: weighted mean calculation requires roughness map. height_data = definition_dict["height_data"] # topography markers = definition_dict["markers"] # distances from corner point @@ -200,7 +199,7 @@ Q_i = [[] for _ in range(num_panels)] for p in range(num_panels): p_i[p], A_i[p], r_h[p], h_i[p], K_i[p], Q_i[p] = conveyance( numH, - n_co_chan, + n_co[p], xregion[p], zregion[p], zmin[p], |