-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into bugfix/terrain-gen-failure
- Loading branch information
Showing
25 changed files
with
2,818 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import os | ||
import time | ||
|
||
import psutil | ||
|
||
from ripple1d.ops.ras_run import run_known_wse | ||
|
||
TIMEOUT = 60 | ||
WAIT_TIME = 0.1 | ||
|
||
|
||
def wait_for_process(pid: int): | ||
run_time = 0 | ||
while psutil.pid_exists(pid): | ||
if run_time < TIMEOUT: | ||
time.sleep(WAIT_TIME) | ||
run_time += WAIT_TIME | ||
else: | ||
psutil.Process(pid).terminate() | ||
raise RuntimeError("RAS run timed out.") | ||
|
||
|
||
def test_kwse_run(): | ||
"""Check that problematic model runs with no errors.""" | ||
model_dir = os.path.join(os.path.dirname(__file__), "test-data", "14320639") | ||
payload = { | ||
"submodel_directory": model_dir, | ||
"plan_suffix": "kwse", | ||
"show_ras": True, | ||
"write_depth_grids": False, | ||
"min_elevation": 182.2, | ||
"max_elevation": 194.1, | ||
"depth_increment": 1, | ||
} | ||
result = run_known_wse(**payload) | ||
wait_for_process(int(result["pid"])) | ||
[os.remove(os.path.join(model_dir, f)) for f in os.listdir(model_dir) if f.endswith("03") or f.endswith("03.hdf")] | ||
|
||
|
||
if __name__ == "__main__": | ||
test_kwse_run() |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,209 @@ | ||
Flow Title=14320639_ind | ||
Number of Profiles= 50 | ||
Profile Names=53874,69241,84608,99975,115342,130710,146077,161444,176811,192179,207546,222913,238280,253647,269015,284382,299749,315116,330484,345851,361218,376585,391952,407320,422687,438054,453421,468789,484156,499523,514890,530257,545625,560992,576359,591726,607094,622461,637828,653195,668562,683930,699297,714664,730031,745399,760766,776133,791500,806868 | ||
River Rch & RM=14320639,14320639 ,5.0 | ||
53874 69241 84608 99975 115342 130710 146077 161444 176811 192179 | ||
207546 222913 238280 253647 269015 284382 299749 315116 330484 345851 | ||
361218 376585 391952 407320 422687 438054 453421 468789 484156 499523 | ||
514890 530257 545625 560992 576359 591726 607094 622461 637828 653195 | ||
668562 683930 699297 714664 730031 745399 760766 776133 791500 806868 | ||
Boundary for River Rch & Prof#=14320639,14320639 , 1 | ||
Up Type= 0 | ||
Dn Type= 3 | ||
Dn Slope=0.001 | ||
Boundary for River Rch & Prof#=14320639,14320639 , 2 | ||
Up Type= 0 | ||
Dn Type= 3 | ||
Dn Slope=0.001 | ||
Boundary for River Rch & Prof#=14320639,14320639 , 3 | ||
Up Type= 0 | ||
Dn Type= 3 | ||
Dn Slope=0.001 | ||
Boundary for River Rch & Prof#=14320639,14320639 , 4 | ||
Up Type= 0 | ||
Dn Type= 3 | ||
Dn Slope=0.001 | ||
Boundary for River Rch & Prof#=14320639,14320639 , 5 | ||
Up Type= 0 | ||
Dn Type= 3 | ||
Dn Slope=0.001 | ||
Boundary for River Rch & Prof#=14320639,14320639 , 6 | ||
Up Type= 0 | ||
Dn Type= 3 | ||
Dn Slope=0.001 | ||
Boundary for River Rch & Prof#=14320639,14320639 , 7 | ||
Up Type= 0 | ||
Dn Type= 3 | ||
Dn Slope=0.001 | ||
Boundary for River Rch & Prof#=14320639,14320639 , 8 | ||
Up Type= 0 | ||
Dn Type= 3 | ||
Dn Slope=0.001 | ||
Boundary for River Rch & Prof#=14320639,14320639 , 9 | ||
Up Type= 0 | ||
Dn Type= 3 | ||
Dn Slope=0.001 | ||
Boundary for River Rch & Prof#=14320639,14320639 , 10 | ||
Up Type= 0 | ||
Dn Type= 3 | ||
Dn Slope=0.001 | ||
Boundary for River Rch & Prof#=14320639,14320639 , 11 | ||
Up Type= 0 | ||
Dn Type= 3 | ||
Dn Slope=0.001 | ||
Boundary for River Rch & Prof#=14320639,14320639 , 12 | ||
Up Type= 0 | ||
Dn Type= 3 | ||
Dn Slope=0.001 | ||
Boundary for River Rch & Prof#=14320639,14320639 , 13 | ||
Up Type= 0 | ||
Dn Type= 3 | ||
Dn Slope=0.001 | ||
Boundary for River Rch & Prof#=14320639,14320639 , 14 | ||
Up Type= 0 | ||
Dn Type= 3 | ||
Dn Slope=0.001 | ||
Boundary for River Rch & Prof#=14320639,14320639 , 15 | ||
Up Type= 0 | ||
Dn Type= 3 | ||
Dn Slope=0.001 | ||
Boundary for River Rch & Prof#=14320639,14320639 , 16 | ||
Up Type= 0 | ||
Dn Type= 3 | ||
Dn Slope=0.001 | ||
Boundary for River Rch & Prof#=14320639,14320639 , 17 | ||
Up Type= 0 | ||
Dn Type= 3 | ||
Dn Slope=0.001 | ||
Boundary for River Rch & Prof#=14320639,14320639 , 18 | ||
Up Type= 0 | ||
Dn Type= 3 | ||
Dn Slope=0.001 | ||
Boundary for River Rch & Prof#=14320639,14320639 , 19 | ||
Up Type= 0 | ||
Dn Type= 3 | ||
Dn Slope=0.001 | ||
Boundary for River Rch & Prof#=14320639,14320639 , 20 | ||
Up Type= 0 | ||
Dn Type= 3 | ||
Dn Slope=0.001 | ||
Boundary for River Rch & Prof#=14320639,14320639 , 21 | ||
Up Type= 0 | ||
Dn Type= 3 | ||
Dn Slope=0.001 | ||
Boundary for River Rch & Prof#=14320639,14320639 , 22 | ||
Up Type= 0 | ||
Dn Type= 3 | ||
Dn Slope=0.001 | ||
Boundary for River Rch & Prof#=14320639,14320639 , 23 | ||
Up Type= 0 | ||
Dn Type= 3 | ||
Dn Slope=0.001 | ||
Boundary for River Rch & Prof#=14320639,14320639 , 24 | ||
Up Type= 0 | ||
Dn Type= 3 | ||
Dn Slope=0.001 | ||
Boundary for River Rch & Prof#=14320639,14320639 , 25 | ||
Up Type= 0 | ||
Dn Type= 3 | ||
Dn Slope=0.001 | ||
Boundary for River Rch & Prof#=14320639,14320639 , 26 | ||
Up Type= 0 | ||
Dn Type= 3 | ||
Dn Slope=0.001 | ||
Boundary for River Rch & Prof#=14320639,14320639 , 27 | ||
Up Type= 0 | ||
Dn Type= 3 | ||
Dn Slope=0.001 | ||
Boundary for River Rch & Prof#=14320639,14320639 , 28 | ||
Up Type= 0 | ||
Dn Type= 3 | ||
Dn Slope=0.001 | ||
Boundary for River Rch & Prof#=14320639,14320639 , 29 | ||
Up Type= 0 | ||
Dn Type= 3 | ||
Dn Slope=0.001 | ||
Boundary for River Rch & Prof#=14320639,14320639 , 30 | ||
Up Type= 0 | ||
Dn Type= 3 | ||
Dn Slope=0.001 | ||
Boundary for River Rch & Prof#=14320639,14320639 , 31 | ||
Up Type= 0 | ||
Dn Type= 3 | ||
Dn Slope=0.001 | ||
Boundary for River Rch & Prof#=14320639,14320639 , 32 | ||
Up Type= 0 | ||
Dn Type= 3 | ||
Dn Slope=0.001 | ||
Boundary for River Rch & Prof#=14320639,14320639 , 33 | ||
Up Type= 0 | ||
Dn Type= 3 | ||
Dn Slope=0.001 | ||
Boundary for River Rch & Prof#=14320639,14320639 , 34 | ||
Up Type= 0 | ||
Dn Type= 3 | ||
Dn Slope=0.001 | ||
Boundary for River Rch & Prof#=14320639,14320639 , 35 | ||
Up Type= 0 | ||
Dn Type= 3 | ||
Dn Slope=0.001 | ||
Boundary for River Rch & Prof#=14320639,14320639 , 36 | ||
Up Type= 0 | ||
Dn Type= 3 | ||
Dn Slope=0.001 | ||
Boundary for River Rch & Prof#=14320639,14320639 , 37 | ||
Up Type= 0 | ||
Dn Type= 3 | ||
Dn Slope=0.001 | ||
Boundary for River Rch & Prof#=14320639,14320639 , 38 | ||
Up Type= 0 | ||
Dn Type= 3 | ||
Dn Slope=0.001 | ||
Boundary for River Rch & Prof#=14320639,14320639 , 39 | ||
Up Type= 0 | ||
Dn Type= 3 | ||
Dn Slope=0.001 | ||
Boundary for River Rch & Prof#=14320639,14320639 , 40 | ||
Up Type= 0 | ||
Dn Type= 3 | ||
Dn Slope=0.001 | ||
Boundary for River Rch & Prof#=14320639,14320639 , 41 | ||
Up Type= 0 | ||
Dn Type= 3 | ||
Dn Slope=0.001 | ||
Boundary for River Rch & Prof#=14320639,14320639 , 42 | ||
Up Type= 0 | ||
Dn Type= 3 | ||
Dn Slope=0.001 | ||
Boundary for River Rch & Prof#=14320639,14320639 , 43 | ||
Up Type= 0 | ||
Dn Type= 3 | ||
Dn Slope=0.001 | ||
Boundary for River Rch & Prof#=14320639,14320639 , 44 | ||
Up Type= 0 | ||
Dn Type= 3 | ||
Dn Slope=0.001 | ||
Boundary for River Rch & Prof#=14320639,14320639 , 45 | ||
Up Type= 0 | ||
Dn Type= 3 | ||
Dn Slope=0.001 | ||
Boundary for River Rch & Prof#=14320639,14320639 , 46 | ||
Up Type= 0 | ||
Dn Type= 3 | ||
Dn Slope=0.001 | ||
Boundary for River Rch & Prof#=14320639,14320639 , 47 | ||
Up Type= 0 | ||
Dn Type= 3 | ||
Dn Slope=0.001 | ||
Boundary for River Rch & Prof#=14320639,14320639 , 48 | ||
Up Type= 0 | ||
Dn Type= 3 | ||
Dn Slope=0.001 | ||
Boundary for River Rch & Prof#=14320639,14320639 , 49 | ||
Up Type= 0 | ||
Dn Type= 3 | ||
Dn Slope=0.001 | ||
Boundary for River Rch & Prof#=14320639,14320639 , 50 | ||
Up Type= 0 | ||
Dn Type= 3 | ||
Dn Slope=0.001 |
Oops, something went wrong.