Skip to content

Commit c4c39c0

Browse files
committed
Merge pull request #1247 from UV-CDAT/issue_1245_meshfill_grid_error
grid var name hadn't been renamed everywhere...
2 parents 8f382e8 + aaa238d commit c4c39c0

3 files changed

Lines changed: 27 additions & 2 deletions

File tree

Packages/vcs/Lib/Canvas.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2727,11 +2727,11 @@ def __plot (self, arglist, keyargs):
27272727
xs=arglist[0].getAxis(-1)
27282728
ys=arglist[0].getAxis(-2)
27292729
if xs.isLongitude() and ys.isLatitude() and isinstance(inGrid,cdms2.grid.TransientRectGrid):
2730-
arglist[1]=MV2.array(g.getMesh())
2730+
arglist[1]=MV2.array(inGrid.getMesh())
27312731
if not 'wrap' in keyargs.keys():
27322732
keyargs['wrap']=[0.,360.]
27332733
elif ys.isLongitude() and xs.isLatitude() and isinstance(inGrid,cdms2.grid.TransientRectGrid):
2734-
arglist[1]=MV2.array(g.getMesh())
2734+
arglist[1]=MV2.array(inGrid.getMesh())
27352735
if not 'wrap' in keyargs.keys():
27362736
keyargs['wrap']=[360.,0.]
27372737
else:

testing/vcs/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,11 @@ cdat_add_test(vcs_test_taylor_2_quads
266266

267267
# These test actually plot things need sample data
268268
if (CDAT_DOWNLOAD_SAMPLE_DATA)
269+
cdat_add_test(test_vcs_meshfill_regular_grid
270+
"${PYTHON_EXECUTABLE}"
271+
${cdat_SOURCE_DIR}/testing/vcs/test_meshfill_regular_grid.py
272+
"${BASELINE_DIR}/test_meshfill_regular_grid.png"
273+
)
269274
cdat_add_test(test_vcs_plot_unstructured_via_boxfill
270275
"${PYTHON_EXECUTABLE}"
271276
${cdat_SOURCE_DIR}/testing/vcs/test_plot_unstructured_via_boxfill.py
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import vcs, cdms2, os, sys
2+
src=sys.argv[1]
3+
pth = os.path.join(os.path.dirname(__file__),"..")
4+
sys.path.append(pth)
5+
import checkimage
6+
x=vcs.init()
7+
x.drawlogooff()
8+
9+
x.setbgoutputdimensions(1200,1091,units="pixels")
10+
x = vcs.init()
11+
f = cdms2.open(os.path.join(vcs.prefix, "sample_data", "clt.nc"))
12+
s = f("clt")
13+
x.meshfill(s,bg=1)
14+
fnm = "test_meshfill_regular_grid.png"
15+
x.png(fnm)
16+
17+
print "fnm:",fnm
18+
print "src:",src
19+
ret = checkimage.check_result_image(fnm,src,checkimage.defaultThreshold)
20+
sys.exit(ret)

0 commit comments

Comments
 (0)