Skip to content

Commit

Permalink
complete PRMS tests overhaul; add notebook 03_compare_pws_prms
Browse files Browse the repository at this point in the history
  • Loading branch information
jmccreight committed Oct 23, 2023
1 parent a065eaf commit 8471e2e
Show file tree
Hide file tree
Showing 9 changed files with 95 additions and 322 deletions.
2 changes: 1 addition & 1 deletion autotest/test_prms_atmosphere.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from utils_compare import compare_in_memory, compare_netcdfs

# compare in memory (faster) or full output files? or both!
do_compare_output_files = True
do_compare_output_files = False
do_compare_in_memory = True
rtol = 1.0e-5
atol = 1.0e-5 # why is this relatively low accuracy?
Expand Down
2 changes: 1 addition & 1 deletion autotest/test_prms_canopy.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from utils_compare import compare_in_memory, compare_netcdfs

# compare in memory (faster) or full output files? or both!
do_compare_output_files = True
do_compare_output_files = False
do_compare_in_memory = True
rtol = atol = 1.0e-5

Expand Down
145 changes: 0 additions & 145 deletions autotest/test_prms_canopy_runoff.py

This file was deleted.

3 changes: 1 addition & 2 deletions autotest/test_prms_channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,8 @@ def test_compare_prms(
)

tmp_path = pl.Path(tmp_path)

# load csv files into dataframes
output_dir = domain["prms_output_dir"]

input_variables = {}
for key in PRMSChannel.get_inputs():
nc_path = output_dir / f"{key}.nc"
Expand Down
3 changes: 2 additions & 1 deletion autotest/test_prms_runoff.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from utils_compare import compare_in_memory, compare_netcdfs

# compare in memory (faster) or full output files? or both!
do_compare_output_files = False
do_compare_output_files = True
do_compare_in_memory = True
rtol = atol = 1.0e-10

Expand Down Expand Up @@ -88,6 +88,7 @@ def test_compare_prms(
control.advance()
runoff.advance()
runoff.calculate(1.0)
runoff.output()
if do_compare_in_memory:
compare_in_memory(
runoff, answers, atol=atol, rtol=rtol, skip_missing_ans=True
Expand Down
Loading

0 comments on commit 8471e2e

Please sign in to comment.