Skip to content

Commit

Permalink
Add test for BUG #26: If masking reduces the bounds of a dataset, plo…
Browse files Browse the repository at this point in the history
…ts look incomplete. (#2134)
  • Loading branch information
danlipsa authored and doutriaux1 committed Nov 2, 2016
1 parent 0a28b7c commit 25a3e66
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
6 changes: 6 additions & 0 deletions testing/vcs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -981,6 +981,12 @@ cdat_add_test(test_vcs_settings_color_name_rgba
"${UVCDAT_GIT_TESTDATA_DIR}/data/masked-file.nc"
3
)
cdat_add_test(test_vcs_isofill_masked_bounds
"${PYTHON_EXECUTABLE}"
${cdat_SOURCE_DIR}/testing/vcs/test_vcs_isofill_masked_bounds.py
"${BASELINE_DIR}/test_vcs_isofill_masked_bounds.png"
"${UVCDAT_GIT_TESTDATA_DIR}/data/coads_climatology.nc"
)
cdat_add_test(test_vcs_issue_960_labels
"${PYTHON_EXECUTABLE}"
${cdat_SOURCE_DIR}/testing/vcs/test_vcs_issue_960_labels.py
Expand Down
14 changes: 14 additions & 0 deletions testing/vcs/test_vcs_isofill_masked_bounds.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import cdms2
import os
import sys
import vcs.testing.regression as regression
import vcs
import numpy

data = sys.argv[2]
x=regression.init(bg=1)
f=cdms2.open(data)
s=f["SST"]
iso=x.getisofill('a_robinson_isofill')
x.plot(s,iso)
regression.run(x, "test_vcs_isofill_masked_bounds.png")

0 comments on commit 25a3e66

Please sign in to comment.