Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grid var name hadn't been renamed everywhere... #1247

Merged
merged 2 commits into from
May 2, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Packages/vcs/Lib/Canvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -2727,11 +2727,11 @@ def __plot (self, arglist, keyargs):
xs=arglist[0].getAxis(-1)
ys=arglist[0].getAxis(-2)
if xs.isLongitude() and ys.isLatitude() and isinstance(inGrid,cdms2.grid.TransientRectGrid):
arglist[1]=MV2.array(g.getMesh())
arglist[1]=MV2.array(inGrid.getMesh())
if not 'wrap' in keyargs.keys():
keyargs['wrap']=[0.,360.]
elif ys.isLongitude() and xs.isLatitude() and isinstance(inGrid,cdms2.grid.TransientRectGrid):
arglist[1]=MV2.array(g.getMesh())
arglist[1]=MV2.array(inGrid.getMesh())
if not 'wrap' in keyargs.keys():
keyargs['wrap']=[360.,0.]
else:
Expand Down
5 changes: 5 additions & 0 deletions testing/vcs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,11 @@ cdat_add_test(vcs_test_taylor_2_quads

# These test actually plot things need sample data
if (CDAT_DOWNLOAD_SAMPLE_DATA)
cdat_add_test(test_vcs_meshfill_regular_grid
"${PYTHON_EXECUTABLE}"
${cdat_SOURCE_DIR}/testing/vcs/test_meshfill_regular_grid.py
"${BASELINE_DIR}/test_meshfill_regular_grid.png"
)
cdat_add_test(test_vcs_plot_unstructured_via_boxfill
"${PYTHON_EXECUTABLE}"
${cdat_SOURCE_DIR}/testing/vcs/test_plot_unstructured_via_boxfill.py
Expand Down
20 changes: 20 additions & 0 deletions testing/vcs/test_meshfill_regular_grid.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import vcs, cdms2, os, sys
src=sys.argv[1]
pth = os.path.join(os.path.dirname(__file__),"..")
sys.path.append(pth)
import checkimage
x=vcs.init()
x.drawlogooff()

x.setbgoutputdimensions(1200,1091,units="pixels")
x = vcs.init()
f = cdms2.open(os.path.join(vcs.prefix, "sample_data", "clt.nc"))
s = f("clt")
x.meshfill(s,bg=1)
fnm = "test_meshfill_regular_grid.png"
x.png(fnm)

print "fnm:",fnm
print "src:",src
ret = checkimage.check_result_image(fnm,src,checkimage.defaultThreshold)
sys.exit(ret)