Skip to content
This repository was archived by the owner on Apr 18, 2018. It is now read-only.

Commit 2c2cfe0

Browse files
committed
ignore means of u and v
These are constrained to be ~0 by the domain geometry and can cause the tests to fail when they shouldn't. Also, change `threshold` for baroclinic gyre to 13.
1 parent d8a9e0d commit 2c2cfe0

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ script:
1919
- docker exec -i fc11-testreport bash -c "cd /MITgcm/verification; python verification_parser.py -filename 'tutorial_advection_in_gyre/testreport_out.txt' -threshold 15"
2020
# tutorial baroclinic gyre
2121
- docker exec -i fc11-testreport bash -c "cd /MITgcm/verification; ./testreport -t tutorial_baroclinic_gyre | tee tutorial_baroclinic_gyre/testreport_out.txt"
22-
- docker exec -i fc11-testreport bash -c "cd /MITgcm/verification; python verification_parser.py -filename 'tutorial_baroclinic_gyre/testreport_out.txt' -threshold 15"
22+
- docker exec -i fc11-testreport bash -c "cd /MITgcm/verification; python verification_parser.py -filename 'tutorial_baroclinic_gyre/testreport_out.txt' -threshold 13"
2323
# tutorial barotropic gyre
2424
- docker exec -i fc11-testreport bash -c "cd /MITgcm/verification; ./testreport -t tutorial_barotropic_gyre | tee tutorial_barotropic_gyre/testreport_out.txt"
2525
- docker exec -i fc11-testreport bash -c "cd /MITgcm/verification; python verification_parser.py -filename 'tutorial_barotropic_gyre/testreport_out.txt' -threshold 15"

verification/verification_parser.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,15 @@ def verification_parser(filename, threshold):
4949
except ValueError:
5050
pass
5151

52+
53+
if len(dp_similarity) >= 17:
54+
# this means that the test wasn't an offline advection test.
55+
# Remove the means of u and v since they are constrained
56+
# to ~0 by domain geometry and can cause the test to fail
57+
# when it shouldn't.
58+
del dp_similarity[15]
59+
del dp_similarity[11]
60+
5261
assert all(elements > threshold[j] for elements in dp_similarity)
5362

5463
if __name__ == '__main__':

0 commit comments

Comments
 (0)