Index: /issm/trunk-jpl/test/NightlyRun/test1101.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test1101.py	(revision 24383)
+++ /issm/trunk-jpl/test/NightlyRun/test1101.py	(revision 24384)
@@ -41,5 +41,5 @@
     md.stressbalance.spcvy[pos] = 0.
 
-#Create MPCs to have periodic boundary conditions
+#Create MPCs to have periodic boundary conditions this is done on matlab indexing
     posx = np.where(md.mesh.x == 0.)[0]
     posx2 = np.where(md.mesh.x == np.max(md.mesh.x))[0]
Index: /issm/trunk-jpl/test/NightlyRun/test1104.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test1104.py	(revision 24383)
+++ /issm/trunk-jpl/test/NightlyRun/test1104.py	(revision 24384)
@@ -44,5 +44,5 @@
 
     md.stressbalance.vertex_pairing = np.vstack((np.vstack((posx + 1, posx2 + 1)).T, np.vstack((posy + 1, posy2 + 1)).T))
-    print(np.shape(md.stressbalance.vertex_pairing))
+
 #Compute the stressbalance
     md.stressbalance.abstol = np.nan
@@ -62,5 +62,5 @@
     results.append(md.results.StressbalanceSolution)
 
-#       plotmodel(md, 'data', vx, 'data', vy, 'data', vz, 'layer  #all', md.mesh.numberoflayers)
+#       plotmodel(md, 'data', vx, 'data', vy, 'data', vz, 'layer#all', md.mesh.numberoflayers)
 
 #Fields and tolerances to track changes
Index: /issm/trunk-jpl/test/NightlyRun/test1110.m
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test1110.m	(revision 24383)
+++ /issm/trunk-jpl/test/NightlyRun/test1110.m	(revision 24384)
@@ -1,9 +1,9 @@
 %Test Name: ISMIPF
 %This test is a test from the ISMP-HOM Intercomparison project.
-%TestF 
+%TestF
 printingflag=false;
 results={};
 
-for i=1:4,
+for i=3,  %1:4,
 	L=100000.; %in m
 	nx=30; %numberof nodes in x direction
@@ -55,5 +55,5 @@
 	md.masstransport.stabilization=1;
 	md.stressbalance.maxiter=1;
-	
+
 	%Compute the stressbalance
 	md.cluster=generic('name',oshostname(),'np',8);
@@ -63,6 +63,6 @@
 	%save the results
 	results{i}=md.results.TransientSolution(end);
-	
-	%Now plot vx and delta surface 
+
+	%Now plot vx and delta surface
 	if (i==1 | i==3),
 		plotmodel(md,'data',(md.results.TransientSolution(end).Vx),'layer',md.mesh.numberoflayers,'sectionvalue','../Exp/ISMIP100000.exp','title','','xlabel','','ylabel','Velocity (m/yr)','linewidth',3,'grid','on','unit','km','ylim',[91 100])
Index: /issm/trunk-jpl/test/NightlyRun/test1110.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test1110.py	(revision 24383)
+++ /issm/trunk-jpl/test/NightlyRun/test1110.py	(revision 24384)
@@ -4,9 +4,9 @@
 from socket import gethostname
 from bamg import *
-from setmask import *
-from parameterize import *
-from setflowequation import *
-from solve import *
-from squaremesh import *
+from setmask import setmask
+from parameterize import parameterize
+from setflowequation import setflowequation
+from solve import solve
+from squaremesh import squaremesh
 
 #This test is a test from the ISMP - HOM Intercomparison project.
@@ -15,5 +15,5 @@
 results = []
 
-for i in range(4):
+for i in [1]:  #range(4):
     L = 100000.  #in m
     nx = 30  #numberof nodes in x direction
@@ -25,5 +25,4 @@
     md = parameterize(md, '../Par/ISMIPF.py')
     md = md.extrude(4, 1.)
-
     if (i == 0 or i == 1):
         md = setflowequation(md, 'HO', 'all')
@@ -42,6 +41,6 @@
     else:
         posA = np.where(md.mesh.vertexonbase)
-        posB = np.unique(np.concatenate(np.where(md.mesh.x == 0.), np.where(md.mesh.x == max(md.mesh.x))))
-        posC = np.unique(np.concatenate(np.where(md.mesh.y == 0.), np.where(md.mesh.y == max(md.mesh.y))))
+        posB = np.unique(np.hstack((np.where(md.mesh.x == 0.), np.where(md.mesh.x == np.nanmax(md.mesh.x)))))
+        posC = np.unique(np.hstack((np.where(md.mesh.y == 0.), np.where(md.mesh.y == np.nanmax(md.mesh.y)))))
         pos = np.intersect1d(np.intersect1d(posA, posB), posC)
         md.stressbalance.spcvx[pos] = 100.  #because we need a dirichlet somewhere
@@ -53,16 +52,17 @@
 
     #Create MPCs to have periodic boundary conditions
-    posx = np.where(md.mesh.x == 0.)
-    posx2 = np.where(md.mesh.x == max(md.mesh.x))
+    posx = np.where(md.mesh.x == 0.)[0]
+    posx2 = np.where(md.mesh.x == max(md.mesh.x))[0]
+    # posy = np.where(np.logical_and.reduce((md.mesh.y == 0., md.mesh.x != 0., md.mesh.x != np.max(md.mesh.x))))[0]  #Don't take the same nodes two times
+    # posy2 = np.where(np.logical_and.reduce((md.mesh.y == np.max(md.mesh.y), md.mesh.x != 0., md.mesh.x != np.max(md.mesh.x))))[0]
+    posy = np.where(md.mesh.y == 0)[0]
+    posy2 = np.where(md.mesh.y == np.max(md.mesh.y))[0]
 
-    posy = np.where(md.mesh.y == 0.)
-    posy2 = np.where(md.mesh.y == max(md.mesh.y))
-
-    md.stressbalance.vertex_pairing = np.column_stack((posx, posx2, posy, posy2))
-    md.masstransport.vertex_pairing = np.column_stack((posx, posx2, posy, posy2))
+    md.stressbalance.vertex_pairing = np.vstack((np.vstack((posx + 1, posx2 + 1)).T, np.vstack((posy + 1, posy2 + 1)).T))
+    md.masstransport.vertex_pairing = np.vstack((np.vstack((posx + 1, posx2 + 1)).T, np.vstack((posy + 1, posy2 + 1)).T))
 
     md.timestepping.time_step = 3.
-    md.timestepping.final_time = 300.
-    md.settings.output_frequency = 50
+    md.timestepping.final_time = 30.  #300.
+    md.settings.output_frequency = 5  #50
     md.masstransport.stabilization = 1
     md.stressbalance.maxiter = 1
@@ -74,9 +74,9 @@
 
     #save the results
-    results[i] = md.results.TransientSolution()
+    results = np.append(results, md.results.TransientSolution[-1])
 
     #Now plot vx and delta surface
     if (i == 0 or i == 2):
-        plotmodel(md, 'data', (md.results.TransientSolution().Vx),
+        plotmodel(md, 'data', np.squeeze(md.results.TransientSolution[-1].Vx),
                   'layer', md.mesh.numberoflayers,
                   'sectionvalue', '../Exp/ISMIP100000.exp',
@@ -89,5 +89,5 @@
                   'ylim', [91, 100])
     elif (i == 1 or i == 3):
-        plotmodel(md, 'data', (md.results.TransientSolution().Vx),
+        plotmodel(md, 'data', np.squeeze(md.results.TransientSolution[-1].Vx),
                   'layer', md.mesh.numberoflayers,
                   'sectionvalue', '../Exp/ISMIP100000.exp',
@@ -115,5 +115,5 @@
             #system(['mv ismipfFSvxsliding.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestF'])
 
-    plotmodel(md, 'data', (md.results.TransientSolution().Surface) - md.geometry.surface,
+    plotmodel(md, 'data', np.squeeze(md.results.TransientSolution[-1].Surface) - md.geometry.surface,
               'layer', md.mesh.numberoflayers,
               'sectionvalue', '../Exp/ISMIP100000.exp',
Index: /issm/trunk-jpl/test/NightlyRun/test228.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test228.py	(revision 24383)
+++ /issm/trunk-jpl/test/NightlyRun/test228.py	(revision 24384)
@@ -22,5 +22,5 @@
 #Set up transient
 smb = np.ones((md.mesh.numberofvertices)) * 3.6
-smb = np.vstack((smb, smb * - 1.)).T
+smb = np.vstack((smb, smb * -1.)).T
 
 md.smb.mass_balance = np.vstack((smb, [1.5, 3.]))
Index: /issm/trunk-jpl/test/NightlyRun/test230.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test230.py	(revision 24383)
+++ /issm/trunk-jpl/test/NightlyRun/test230.py	(revision 24384)
@@ -23,5 +23,5 @@
 #Set up transient
 smb = np.ones((md.mesh.numberofvertices)) * 3.6
-smb = np.vstack((smb, smb * - 1.)).T
+smb = np.vstack((smb, smb * -1.)).T
 
 md.smb.mass_balance = np.vstack((smb, [1.5, 3.]))
Index: /issm/trunk-jpl/test/NightlyRun/test234.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test234.py	(revision 24383)
+++ /issm/trunk-jpl/test/NightlyRun/test234.py	(revision 24384)
@@ -25,5 +25,5 @@
 
 smb = np.ones((md.mesh.numberofvertices, )) * 3.6
-smb = np.array([smb, smb * - 1]).T
+smb = np.array([smb, smb * -1]).T
 
 md.smb.mass_balance = smb
Index: /issm/trunk-jpl/test/NightlyRun/test235.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test235.py	(revision 24383)
+++ /issm/trunk-jpl/test/NightlyRun/test235.py	(revision 24384)
@@ -25,5 +25,5 @@
 
 smb = np.ones((md.mesh.numberofvertices, )) * 3.6
-smb = np.array([smb, smb * - 1]).T
+smb = np.array([smb, smb * -1]).T
 
 md.smb.mass_balance = smb
Index: /issm/trunk-jpl/test/NightlyRun/test241.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test241.py	(revision 24383)
+++ /issm/trunk-jpl/test/NightlyRun/test241.py	(revision 24384)
@@ -23,5 +23,5 @@
 #Set up transient
 smb = np.ones((md.mesh.numberofvertices)) * 3.6
-smb = np.vstack((smb, smb * - 1.)).T
+smb = np.vstack((smb, smb * -1.)).T
 
 md.smb.mass_balance = np.vstack((smb, [1.5, 3.]))
Index: /issm/trunk-jpl/test/NightlyRun/test242.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test242.py	(revision 24383)
+++ /issm/trunk-jpl/test/NightlyRun/test242.py	(revision 24384)
@@ -24,5 +24,5 @@
 #Set up transient
 smb = np.ones((md.mesh.numberofvertices)) * 3.6
-smb = np.vstack((smb, smb * - 1.)).T
+smb = np.vstack((smb, smb * -1.)).T
 
 md.smb.mass_balance = np.vstack((smb, [1.5, 3.]))
Index: /issm/trunk-jpl/test/NightlyRun/test2424.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test2424.py	(revision 24383)
+++ /issm/trunk-jpl/test/NightlyRun/test2424.py	(revision 24384)
@@ -45,5 +45,5 @@
 #time is off by the year constant
 for i in range(nsteps):
-    field_names.append('Time-' + str(md.results.TransientSolution[i].time) + ' - yr - ice_levelset - S - sl - (1 - di) * H')
+    field_names.append('Time-' + str(md.results.TransientSolution[i].time) + '-yr-ice_levelset-S-sl-(1-di) * H')
     field_tolerances.append(1e-12)
     field_values.append(md.results.TransientSolution[i].MaskGroundediceLevelset.reshape(-1, ) - (md.geometry.surface - md.results.TransientSolution[i].Sealevel.reshape(-1, ) - (1 - md.materials.rho_ice / md.materials.rho_water) * md.geometry.thickness))
Index: /issm/trunk-jpl/test/NightlyRun/test250.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test250.py	(revision 24383)
+++ /issm/trunk-jpl/test/NightlyRun/test250.py	(revision 24384)
@@ -24,5 +24,5 @@
 
 smb = np.ones((md.mesh.numberofvertices, )) * 3.6
-smb = np.array([smb, smb * - 1]).T
+smb = np.array([smb, smb * -1]).T
 
 md.smb.mass_balance = smb
Index: /issm/trunk-jpl/test/NightlyRun/test251.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test251.py	(revision 24383)
+++ /issm/trunk-jpl/test/NightlyRun/test251.py	(revision 24384)
@@ -24,5 +24,5 @@
 
 smb = np.ones((md.mesh.numberofvertices, )) * 3.6
-smb = np.array([smb, smb * - 1]).T
+smb = np.array([smb, smb * -1]).T
 
 md.smb.mass_balance = smb
Index: /issm/trunk-jpl/test/NightlyRun/test333.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test333.py	(revision 24383)
+++ /issm/trunk-jpl/test/NightlyRun/test333.py	(revision 24384)
@@ -49,5 +49,5 @@
 md.timestepping.final_time = 2.0
 
-#md.debug.valgrind = True
+md.debug.valgrind = True
 md = solve(md, 'Transient')
 
Index: /issm/trunk-jpl/test/NightlyRun/test336.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test336.py	(revision 24383)
+++ /issm/trunk-jpl/test/NightlyRun/test336.py	(revision 24384)
@@ -22,5 +22,5 @@
 #Set up transient
 smb = np.ones((md.mesh.numberofvertices)) * 3.6
-smb = np.vstack((smb, smb * - 1.)).T
+smb = np.vstack((smb, smb * -1.)).T
 
 md.smb = SMBcomponents()
Index: /issm/trunk-jpl/test/NightlyRun/test337.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test337.py	(revision 24383)
+++ /issm/trunk-jpl/test/NightlyRun/test337.py	(revision 24384)
@@ -23,5 +23,5 @@
 #Set up transient
 smb = np.ones((md.mesh.numberofvertices)) * 3.6
-smb = np.vstack((smb, smb * - 1.)).T
+smb = np.vstack((smb, smb * -1.)).T
 
 md.smb = SMBcomponents()
Index: /issm/trunk-jpl/test/NightlyRun/test338.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test338.py	(revision 24383)
+++ /issm/trunk-jpl/test/NightlyRun/test338.py	(revision 24384)
@@ -22,5 +22,5 @@
 #Set up transient
 smb = np.ones((md.mesh.numberofvertices)) * 3.6
-smb = np.vstack((smb, smb * - 1.)).T
+smb = np.vstack((smb, smb * -1.)).T
 
 md.smb = SMBmeltcomponents()
Index: /issm/trunk-jpl/test/NightlyRun/test339.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test339.py	(revision 24383)
+++ /issm/trunk-jpl/test/NightlyRun/test339.py	(revision 24384)
@@ -23,5 +23,5 @@
 #Set up transient
 smb = np.ones((md.mesh.numberofvertices)) * 3.6
-smb = np.vstack((smb, smb * - 1.)).T
+smb = np.vstack((smb, smb * -1.)).T
 
 md.smb = SMBmeltcomponents()
Index: /issm/trunk-jpl/test/NightlyRun/test352.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test352.py	(revision 24383)
+++ /issm/trunk-jpl/test/NightlyRun/test352.py	(revision 24384)
@@ -22,5 +22,5 @@
 #Set up transient
 smb = np.ones((md.mesh.numberofvertices)) * 3.6
-smb = np.vstack((smb, smb * - 1.)).T
+smb = np.vstack((smb, smb * -1.)).T
 md.smb.mass_balance = np.vstack((smb, [1.5, 3.]))
 md.transient.isthermal = False
Index: /issm/trunk-jpl/test/NightlyRun/test353.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test353.py	(revision 24383)
+++ /issm/trunk-jpl/test/NightlyRun/test353.py	(revision 24384)
@@ -22,5 +22,5 @@
 #Set up transient
 smb = np.ones((md.mesh.numberofvertices)) * 3.6
-smb = np.vstack((smb, smb * - 1.)).T
+smb = np.vstack((smb, smb * -1.)).T
 
 md.smb = SMBcomponents()
Index: /issm/trunk-jpl/test/NightlyRun/test354.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test354.py	(revision 24383)
+++ /issm/trunk-jpl/test/NightlyRun/test354.py	(revision 24384)
@@ -22,5 +22,5 @@
 #Set up transient
 smb = np.ones((md.mesh.numberofvertices)) * 3.6
-smb = np.vstack((smb, smb * - 1.)).T
+smb = np.vstack((smb, smb * -1.)).T
 
 md.smb = SMBmeltcomponents()
