Index: /issm/trunk-jpl/test/NightlyRun/test1101.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test1101.py	(revision 14211)
+++ /issm/trunk-jpl/test/NightlyRun/test1101.py	(revision 14212)
@@ -9,4 +9,5 @@
 from solve import *
 from MatlabFuncs import *
+from PythonFuncs import *
 
 """
@@ -46,6 +47,6 @@
 	posx2=numpy.nonzero(md.mesh.x==numpy.max(md.mesh.x))[0]
 
-	posy=numpy.nonzero(numpy.logical_and(numpy.logical_and(md.mesh.y==0.,md.mesh.x!=0.),md.mesh.x!=numpy.max(md.mesh.x)))[0]    #Don't take the same nodes two times
-	posy2=numpy.nonzero(numpy.logical_and(numpy.logical_and(md.mesh.y==numpy.max(md.mesh.y),md.mesh.x!=0.),md.mesh.x!=numpy.max(md.mesh.x)))[0]
+	posy=numpy.nonzero(logical_and_n(md.mesh.y==0.,md.mesh.x!=0.,md.mesh.x!=numpy.max(md.mesh.x)))[0]    #Don't take the same nodes two times
+	posy2=numpy.nonzero(logical_and_n(md.mesh.y==numpy.max(md.mesh.y),md.mesh.x!=0.,md.mesh.x!=numpy.max(md.mesh.x)))[0]
 
 	md.diagnostic.vertex_pairing=numpy.vstack((numpy.hstack((posx.reshape(-1,1)+1,posx2.reshape(-1,1)+1)),numpy.hstack((posy.reshape(-1,1)+1,posy2.reshape(-1,1)+1))))
Index: /issm/trunk-jpl/test/NightlyRun/test1102.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test1102.py	(revision 14211)
+++ /issm/trunk-jpl/test/NightlyRun/test1102.py	(revision 14212)
@@ -9,4 +9,5 @@
 from solve import *
 from MatlabFuncs import *
+from PythonFuncs import *
 
 """
@@ -49,9 +50,9 @@
 #	posx=numpy.nonzero(md.mesh.x==0.)[0]
 #	posx2=numpy.nonzero(md.mesh.x==numpy.max(md.mesh.x))[0]
-#	posx=numpy.nonzero(numpy.logical_and(numpy.logical_and(md.mesh.x==0.,md.mesh.y!=0.),numpy.logical_and(md.mesh.y!=numpy.max(md.mesh.y),numpy.logical_not(md.mesh.vertexonbed))))[0]
-#	posx2=numpy.nonzero(numpy.logical_and(numpy.logical_and(md.mesh.x==numpy.max(md.mesh.x),md.mesh.y!=0.),numpy.logical_and(md.mesh.y!=numpy.max(md.mesh.y),numpy.logical_not(md.mesh.vertexonbed))))[0]
+#	posx=numpy.nonzero(logical_and_n(md.mesh.x==0.,md.mesh.y!=0.,md.mesh.y!=numpy.max(md.mesh.y),numpy.logical_not(md.mesh.vertexonbed)))[0]
+#	posx2=numpy.nonzero(logical_and_n(md.mesh.x==numpy.max(md.mesh.x),md.mesh.y!=0.,md.mesh.y!=numpy.max(md.mesh.y),numpy.logical_not(md.mesh.vertexonbed)))[0]
 
-#	posy=numpy.nonzero(numpy.logical_and(numpy.logical_and(md.mesh.y==0.,md.mesh.x!=0.),numpy.logical_and(md.mesh.x!=numpy.max(md.mesh.x),numpy.logical_not(md.mesh.vertexonbed))))[0]    #Don't take the same nodes two times
-#	posy2=numpy.nonzero(numpy.logical_and(numpy.logical_and(md.mesh.y==numpy.max(md.mesh.y),md.mesh.x!=0.),numpy.logical_and(md.mesh.x!=numpy.max(md.mesh.x),numpy.logical_not(md.mesh.vertexonbed))))[0]
+#	posy=numpy.nonzero(logical_and_n(md.mesh.y==0.,md.mesh.x!=0.,md.mesh.x!=numpy.max(md.mesh.x),numpy.logical_not(md.mesh.vertexonbed)))[0]    #Don't take the same nodes two times
+#	posy2=numpy.nonzero(logical_and_n(md.mesh.y==numpy.max(md.mesh.y),md.mesh.x!=0.,md.mesh.x!=numpy.max(md.mesh.x),numpy.logical_not(md.mesh.vertexonbed)))[0]
 
 #	md.diagnostic.vertex_pairing=numpy.vstack((numpy.hstack((posx.reshape(-1,1)+1,posx2.reshape(-1,1)+1)),numpy.hstack((posy.reshape(-1,1)+1,posy2.reshape(-1,1)+1))))
Index: /issm/trunk-jpl/test/NightlyRun/test1103.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test1103.py	(revision 14211)
+++ /issm/trunk-jpl/test/NightlyRun/test1103.py	(revision 14212)
@@ -9,4 +9,5 @@
 from solve import *
 from MatlabFuncs import *
+from PythonFuncs import *
 
 """
@@ -45,6 +46,6 @@
 	posx2=numpy.nonzero(md.mesh.x==numpy.max(md.mesh.x))[0]
 
-	posy=numpy.nonzero(numpy.logical_and(numpy.logical_and(md.mesh.y==0.,md.mesh.x!=0.),md.mesh.x!=numpy.max(md.mesh.x)))[0]    #Don't take the same nodes two times
-	posy2=numpy.nonzero(numpy.logical_and(numpy.logical_and(md.mesh.y==numpy.max(md.mesh.y),md.mesh.x!=0.),md.mesh.x!=numpy.max(md.mesh.x)))[0]
+	posy=numpy.nonzero(logical_and_n(md.mesh.y==0.,md.mesh.x!=0.,md.mesh.x!=numpy.max(md.mesh.x)))[0]    #Don't take the same nodes two times
+	posy2=numpy.nonzero(logical_and_n(md.mesh.y==numpy.max(md.mesh.y),md.mesh.x!=0.,md.mesh.x!=numpy.max(md.mesh.x)))[0]
 
 	md.diagnostic.vertex_pairing=numpy.vstack((numpy.hstack((posx.reshape(-1,1)+1,posx2.reshape(-1,1)+1)),numpy.hstack((posy.reshape(-1,1)+1,posy2.reshape(-1,1)+1))))
Index: /issm/trunk-jpl/test/NightlyRun/test1104.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test1104.py	(revision 14211)
+++ /issm/trunk-jpl/test/NightlyRun/test1104.py	(revision 14212)
@@ -8,4 +8,5 @@
 from solve import *
 from MatlabFuncs import *
+from PythonFuncs import *
 
 """
@@ -40,6 +41,6 @@
 	posx2=numpy.nonzero(md.mesh.x==numpy.max(md.mesh.x))[0]
 
-	posy=numpy.nonzero(numpy.logical_and(numpy.logical_and(md.mesh.y==0.,md.mesh.x!=0.),md.mesh.x!=numpy.max(md.mesh.x)))[0]    #Don't take the same nodes two times
-	posy2=numpy.nonzero(numpy.logical_and(numpy.logical_and(md.mesh.y==numpy.max(md.mesh.y),md.mesh.x!=0.),md.mesh.x!=numpy.max(md.mesh.x)))[0]
+	posy=numpy.nonzero(logical_and_n(md.mesh.y==0.,md.mesh.x!=0.,md.mesh.x!=numpy.max(md.mesh.x)))[0]    #Don't take the same nodes two times
+	posy2=numpy.nonzero(logical_and_n(md.mesh.y==numpy.max(md.mesh.y),md.mesh.x!=0.,md.mesh.x!=numpy.max(md.mesh.x)))[0]
 
 	md.diagnostic.vertex_pairing=numpy.vstack((numpy.hstack((posx.reshape(-1,1)+1,posx2.reshape(-1,1)+1)),numpy.hstack((posy.reshape(-1,1)+1,posy2.reshape(-1,1)+1))))
@@ -49,5 +50,5 @@
 	md.cluster=generic('name',oshostname(),'np',8)
 	md=solve(md,DiagnosticSolutionEnum())
-	pos=numpy.nonzero(numpy.logical_or(numpy.logical_or(md.mesh.x==0.,md.mesh.y==0.),numpy.logical_or(md.mesh.x==numpy.max(md.mesh.x),md.mesh.y==numpy.max(md.mesh.y))))
+	pos=numpy.nonzero(logical_or_n(md.mesh.x==0.,md.mesh.y==0.,md.mesh.x==numpy.max(md.mesh.x),md.mesh.y==numpy.max(md.mesh.y)))
 	md.diagnostic.spcvx[pos]=md.results.DiagnosticSolution.Vx[pos]
 	md.diagnostic.spcvy[pos]=md.results.DiagnosticSolution.Vy[pos]
Index: /issm/trunk-jpl/test/NightlyRun/test1105.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test1105.py	(revision 14211)
+++ /issm/trunk-jpl/test/NightlyRun/test1105.py	(revision 14212)
@@ -9,4 +9,5 @@
 from solve import *
 from MatlabFuncs import *
+from PythonFuncs import *
 
 """
@@ -38,14 +39,14 @@
 	md.diagnostic.spcvz=float('NaN')*numpy.ones((md.mesh.numberofvertices,1))
 
-	posx=numpy.nonzero(numpy.logical_and(numpy.logical_and(md.mesh.x==0.,md.mesh.y!=0.),md.mesh.y!=L))[0]
-	posx2=numpy.nonzero(numpy.logical_and(numpy.logical_and(md.mesh.x==L,md.mesh.y!=0.),md.mesh.y!=L))[0]
+	posx=numpy.nonzero(logical_and_n(md.mesh.x==0.,md.mesh.y!=0.,md.mesh.y!=L))[0]
+	posx2=numpy.nonzero(logical_and_n(md.mesh.x==L,md.mesh.y!=0.,md.mesh.y!=L))[0]
 
-	posy=numpy.nonzero(numpy.logical_and(numpy.logical_and(md.mesh.y==0.,md.mesh.x!=0.),md.mesh.x!=L))[0]    #Don't take the same nodes two times
-	posy2=numpy.nonzero(numpy.logical_and(numpy.logical_and(md.mesh.y==L,md.mesh.x!=0.),md.mesh.x!=L))[0]
+	posy=numpy.nonzero(logical_and_n(md.mesh.y==0.,md.mesh.x!=0.,md.mesh.x!=L))[0]    #Don't take the same nodes two times
+	posy2=numpy.nonzero(logical_and_n(md.mesh.y==L,md.mesh.x!=0.,md.mesh.x!=L))[0]
 
 	md.diagnostic.vertex_pairing=numpy.vstack((numpy.hstack((posx.reshape(-1,1)+1,posx2.reshape(-1,1)+1)),numpy.hstack((posy.reshape(-1,1)+1,posy2.reshape(-1,1)+1))))
 
 	#Add spc on the corners
-	pos=numpy.nonzero(numpy.logical_and(numpy.logical_and(numpy.logical_or(md.mesh.x==0.,md.mesh.x==L),numpy.logical_or(md.mesh.y==0.,md.mesh.y==L)),md.mesh.vertexonbed))
+	pos=numpy.nonzero(logical_and_n(numpy.logical_or(md.mesh.x==0.,md.mesh.x==L),numpy.logical_or(md.mesh.y==0.,md.mesh.y==L),md.mesh.vertexonbed))
 	md.diagnostic.spcvx[pos]=0.
 	md.diagnostic.spcvy[pos]=0.
Index: /issm/trunk-jpl/test/NightlyRun/test1106.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test1106.py	(revision 14211)
+++ /issm/trunk-jpl/test/NightlyRun/test1106.py	(revision 14212)
@@ -8,4 +8,5 @@
 from solve import *
 from MatlabFuncs import *
+from PythonFuncs import *
 
 """
@@ -25,5 +26,5 @@
 
 	#Add spc on the borders
-	pos=numpy.nonzero(numpy.logical_or(numpy.logical_or(md.mesh.x==0.,md.mesh.x==numpy.max(md.mesh.x)),numpy.logical_or(md.mesh.y==0.,md.mesh.y==numpy.max(md.mesh.y))))
+	pos=numpy.nonzero(logical_or_n(md.mesh.x==0.,md.mesh.x==numpy.max(md.mesh.x),md.mesh.y==0.,md.mesh.y==numpy.max(md.mesh.y)))
 	md.diagnostic.spcvx[pos]=0.
 	md.diagnostic.spcvy[pos]=0.
Index: /issm/trunk-jpl/test/NightlyRun/test1107.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test1107.py	(revision 14211)
+++ /issm/trunk-jpl/test/NightlyRun/test1107.py	(revision 14212)
@@ -9,4 +9,5 @@
 from solve import *
 from MatlabFuncs import *
+from PythonFuncs import *
 
 """
@@ -40,15 +41,15 @@
 	#Create MPCs to have periodic boundary conditions
 #	posx=find(md.mesh.x==0. & ~(md.mesh.y==0. & md.mesh.vertexonbed) & ~(md.mesh.y==L & md.mesh.vertexonbed));
-	posx=numpy.nonzero(numpy.logical_and(md.mesh.x==0.,numpy.logical_and(numpy.logical_not(numpy.logical_and(md.mesh.y==0.,md.mesh.vertexonbed)),numpy.logical_not(numpy.logical_and(md.mesh.y==L,md.mesh.vertexonbed)))))[0]
+	posx=numpy.nonzero(logical_and_n(md.mesh.x==0.,numpy.logical_not(numpy.logical_and(md.mesh.y==0.,md.mesh.vertexonbed)),numpy.logical_not(numpy.logical_and(md.mesh.y==L,md.mesh.vertexonbed))))[0]
 #	posx2=find(md.mesh.x==max(md.mesh.x) & ~(md.mesh.y==0. & md.mesh.vertexonbed) & ~(md.mesh.y==L & md.mesh.vertexonbed));
-	posx2=numpy.nonzero(numpy.logical_and(md.mesh.x==numpy.max(md.mesh.x),numpy.logical_and(numpy.logical_not(numpy.logical_and(md.mesh.y==0.,md.mesh.vertexonbed)),numpy.logical_not(numpy.logical_and(md.mesh.y==L,md.mesh.vertexonbed)))))[0]
+	posx2=numpy.nonzero(logical_and_n(md.mesh.x==numpy.max(md.mesh.x),numpy.logical_not(numpy.logical_and(md.mesh.y==0.,md.mesh.vertexonbed)),numpy.logical_not(numpy.logical_and(md.mesh.y==L,md.mesh.vertexonbed))))[0]
 
-	posy=numpy.nonzero(numpy.logical_and(numpy.logical_and(md.mesh.y==0.,md.mesh.x!=0.),md.mesh.x!=numpy.max(md.mesh.x)))[0]    #Don't take the same nodes two times
-	posy2=numpy.nonzero(numpy.logical_and(numpy.logical_and(md.mesh.y==numpy.max(md.mesh.y),md.mesh.x!=0.),md.mesh.x!=numpy.max(md.mesh.x)))[0]
+	posy=numpy.nonzero(logical_and_n(md.mesh.y==0.,md.mesh.x!=0.,md.mesh.x!=numpy.max(md.mesh.x)))[0]    #Don't take the same nodes two times
+	posy2=numpy.nonzero(logical_and_n(md.mesh.y==numpy.max(md.mesh.y),md.mesh.x!=0.,md.mesh.x!=numpy.max(md.mesh.x)))[0]
 
 	md.diagnostic.vertex_pairing=numpy.vstack((numpy.hstack((posx.reshape(-1,1)+1,posx2.reshape(-1,1)+1)),numpy.hstack((posy.reshape(-1,1)+1,posy2.reshape(-1,1)+1))))
 
 	#Add spc on the corners
-	pos=numpy.nonzero(numpy.logical_and(numpy.logical_and(numpy.logical_or(md.mesh.x==0.,md.mesh.x==L),numpy.logical_or(md.mesh.y==0.,md.mesh.y==L)),md.mesh.vertexonbed))
+	pos=numpy.nonzero(logical_and_n(numpy.logical_or(md.mesh.x==0.,md.mesh.x==L),numpy.logical_or(md.mesh.y==0.,md.mesh.y==L),md.mesh.vertexonbed))
 	md.diagnostic.spcvy[:]=0.
 	md.diagnostic.spcvx[pos]=0.
Index: /issm/trunk-jpl/test/NightlyRun/test1108.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test1108.py	(revision 14211)
+++ /issm/trunk-jpl/test/NightlyRun/test1108.py	(revision 14212)
@@ -8,4 +8,5 @@
 from solve import *
 from MatlabFuncs import *
+from PythonFuncs import *
 
 """
@@ -33,5 +34,5 @@
 	md.diagnostic.spcvz=float('NaN')*numpy.ones((md.mesh.numberofvertices,1))
 	
-	pos=numpy.nonzero(numpy.logical_and(md.mesh.vertexonbed,numpy.logical_and(numpy.logical_or(md.mesh.x==0.,md.mesh.x==numpy.max(md.mesh.x)),numpy.logical_or(md.mesh.y==0.,md.mesh.y==numpy.max(md.mesh.y)))))
+	pos=numpy.nonzero(logical_and_n(md.mesh.vertexonbed,numpy.logical_or(md.mesh.x==0.,md.mesh.x==numpy.max(md.mesh.x)),numpy.logical_or(md.mesh.y==0.,md.mesh.y==numpy.max(md.mesh.y))))
 	md.diagnostic.spcvx[pos]=0.
 	md.diagnostic.spcvy[pos]=0.
@@ -42,6 +43,6 @@
 	posx2=numpy.nonzero(md.mesh.x==numpy.max(md.mesh.x))[0]
 
-	posy=numpy.nonzero(numpy.logical_and(numpy.logical_and(md.mesh.y==0.,md.mesh.x!=0.),md.mesh.x!=numpy.max(md.mesh.x)))[0]    #Don't take the same nodes two times
-	posy2=numpy.nonzero(numpy.logical_and(numpy.logical_and(md.mesh.y==numpy.max(md.mesh.y),md.mesh.x!=0.),md.mesh.x!=numpy.max(md.mesh.x)))[0]
+	posy=numpy.nonzero(logical_and_n(md.mesh.y==0.,md.mesh.x!=0.,md.mesh.x!=numpy.max(md.mesh.x)))[0]    #Don't take the same nodes two times
+	posy2=numpy.nonzero(logical_and_n(md.mesh.y==numpy.max(md.mesh.y),md.mesh.x!=0.,md.mesh.x!=numpy.max(md.mesh.x)))[0]
 
 	md.diagnostic.vertex_pairing=numpy.vstack((numpy.hstack((posx.reshape(-1,1)+1,posx2.reshape(-1,1)+1)),numpy.hstack((posy.reshape(-1,1)+1,posy2.reshape(-1,1)+1))))
@@ -58,5 +59,5 @@
 	md.diagnostic.spcvy=float('NaN')*numpy.ones((md.mesh.numberofvertices,1))
 	md.diagnostic.spcvz=float('NaN')*numpy.ones((md.mesh.numberofvertices,1))
-	pos=numpy.nonzero(numpy.logical_or(numpy.logical_or(md.mesh.y==0.,md.mesh.x==0.),numpy.logical_or(md.mesh.x==numpy.max(md.mesh.x),md.mesh.y==numpy.max(md.mesh.y))))    #Don't take the same nodes two times
+	pos=numpy.nonzero(logical_or_n(md.mesh.y==0.,md.mesh.x==0.,md.mesh.x==numpy.max(md.mesh.x),md.mesh.y==numpy.max(md.mesh.y)))    #Don't take the same nodes two times
 	md.diagnostic.spcvx[pos]=md.results.DiagnosticSolution.Vx[pos]
 	md.diagnostic.spcvy[pos]=md.results.DiagnosticSolution.Vy[pos]
