Skip to content

Commit

Permalink
Added test for testing wrap method for vectors
Browse files Browse the repository at this point in the history
  • Loading branch information
aashish24 committed Oct 14, 2015
1 parent cb57da0 commit d214689
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
5 changes: 5 additions & 0 deletions testing/vcs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,11 @@ cdat_add_test(vcs_test_taylor_2_quads
${cdat_SOURCE_DIR}/testing/vcs/test_vcs_vectors_robinson.py
"${BASELINE_DIR}/test_vcs_vectors_robinson.png"
)
cdat_add_test(vcs_test_vectors_robinson_wrap
"${PYTHON_EXECUTABLE}"
${cdat_SOURCE_DIR}/testing/vcs/test_vcs_vectors_robinson_wrap.py
"${BASELINE_DIR}/test_vcs_vectors_robinson_wrap.png"
)
endif()
endif()

Expand Down
22 changes: 22 additions & 0 deletions testing/vcs/test_vcs_vectors_robinson_wrap.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import cdms2
import vcs
import os
import sys

f=cdms2.open(os.path.join(vcs.sample_data,"clt.nc"))

# -180 failks as well
lon1 = -180
u=f("u")
v=f("v")

u=u(longitude=(lon1,lon1+360.))
v=v(longitude=(lon1,lon1+360.))

x=vcs.init()
Vec = x.createvector()
p = x.createprojection()
p.type = "robinson"
Vec.projection = p
x.plot(u,v,Vec)
raw_input("press enter")

0 comments on commit d214689

Please sign in to comment.