Index: /issm/trunk-jpl/test/NightlyRun/IdToName.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/IdToName.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/IdToName.py	(revision 21408)
@@ -12,5 +12,5 @@
 	file_text  = infile.readlines()
 
-	string='#Test Name:';
+	string='#Test Name:'
 	name=file_text[0]
 	name=name[len(string)+1:-1]
Index: /issm/trunk-jpl/test/NightlyRun/runme.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/runme.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/runme.py	(revision 21408)
@@ -1,9 +1,9 @@
 #!/usr/bin/env python
 import os
-import glob
-import socket
-import numpy
-import sys
-import traceback
+import numpy as np
+from traceback import format_exc
+from sys import float_info
+from glob import glob
+from socket import gethostname
 
 def runme(id=None,exclude=None,benchmark='nightly',procedure='check',output='none',rank=1,numprocs=1):
@@ -34,5 +34,5 @@
  
 	    Usage:
-	       runme(varargin);
+	       runme(varargin)
  
 	    Examples:
@@ -44,6 +44,4 @@
 	from parallelrange import parallelrange
 	from IdToName import IdToName
-	from MatlabFuncs import strcmpi
-	from MatlabFuncs import ismember
 	from arch import archread
 	from arch import archwrite
@@ -55,15 +53,15 @@
 	#Process options
 	#GET benchmark {{{
-	if not ismember(benchmark,['all','nightly','ismip','eismint','thermal','mesh','validation','tranforcing','adolc','slr']):
+	if not benchmark in ['all','nightly','ismip','eismint','thermal','mesh','validation','tranforcing','adolc','slr']:
 		print "runme warning: benchmark '%s' not supported, defaulting to test 'nightly'." % benchmark
 		benchmark='nightly'
 	# }}}
 	#GET procedure {{{
-	if not ismember(procedure,['check','update']):
+	if not procedure in ['check','update']:
 		print "runme warning: procedure '%s' not supported, defaulting to test 'check'." % procedure
 		procedure='check'
 	# }}}
 	#GET output {{{
-	if not ismember(output,['nightly','none']):
+	if not output in ['nightly','none']:
 		print "runme warning: output '%s' not supported, defaulting to test 'none'." % output
 		output='none'
@@ -74,5 +72,5 @@
 	# }}}
 	#GET ids  {{{
-	flist=glob.glob('test*.py')    #File name must start with 'test' and must end by '.py' and must be different than 'test.py'
+	flist=glob('test*.py')    #File name must start with 'test' and must end by '.py' and must be different than 'test.py'
 	list_ids=[int(file[4:-3]) for file in flist if not file == 'test.py']    #Keep test id only (skip 'test' and '.py')
 	#print 'list_ids =',list_ids
@@ -81,5 +79,5 @@
 	list_ids=list_ids[i1:i2+1]
 	#print 'list_ids after parallelrange =',list_ids
-
+	
 	if id:
 		if isinstance(id,list):
@@ -90,5 +88,6 @@
 	else:
 		test_ids=set(list_ids)
-	#print 'test_ids after list =',test_ids
+		
+		#print 'test_ids after list =',test_ids
 	# }}}
 	#GET exclude {{{
@@ -102,23 +101,23 @@
 	# }}}
 	#Process Ids according to benchmarks {{{
-	if   strcmpi(benchmark,'nightly'):
+	if benchmark=='nightly':
 		test_ids=test_ids.intersection(set(range(1,1000)))
-	elif strcmpi(benchmark,'validation'):
+	elif benchmark=='validation':
 		test_ids=test_ids.intersection(set(range(1001,2000)))
-	elif strcmpi(benchmark,'ismip'):
+	elif benchmark=='ismip':
 		test_ids=test_ids.intersection(set(range(1101,1200)))
-	elif strcmpi(benchmark,'eismint'):
+	elif benchmark=='eismint':
 		test_ids=test_ids.intersection(set(range(1201,1300)))
-	elif strcmpi(benchmark,'thermal'):
+	elif benchmark=='thermal':
 		test_ids=test_ids.intersection(set(range(1301,1400)))
-	elif strcmpi(benchmark,'mesh'):
+	elif benchmark=='mesh':
 		test_ids=test_ids.intersection(set(range(1401,1500)))
-	elif strcmpi(benchmark,'tranforcing'):
+	elif benchmark=='tranforcing':
 		test_ids=test_ids.intersection(set(range(1501,1503)))
-	elif strcmpi(benchmark,'referential'):
+	elif benchmark=='referential':
 		test_ids=test_ids.intersection(set(range(1601,1603)))
-	elif strcmpi(benchmark,'slr'):
+	elif benchmark=='slr':
 		test_ids=test_ids.intersection(set(range(2001,2500)))
-	elif strcmpi(benchmark,'adolc'):
+	elif benchmark=='adolc':
 		test_ids=test_ids.intersection(set(range(3001,3200)))
 	#print 'test_ids after benchmark =',test_ids
@@ -141,13 +140,13 @@
 			#UPDATE ARCHIVE?
 			archive_name='Archive'+str(id)
-			if strcmpi(procedure,'update'):
+			if procedure=='update':
 				archive_file=os.path.join('..','Archives',archive_name+'.arch')
 				if os.path.isfile(archive_file):
 					os.remove(archive_file)
 				for k,fieldname in enumerate(field_names):
-					field=numpy.array(field_values[k],dtype=float)
+					field=np.array(field_values[k],dtype=float)
 					if len(field.shape) == 1:
-						if numpy.size(field):
-							field=field.reshape(numpy.size(field),1)
+						if np.size(field):
+							field=field.reshape(np.size(field),1)
 						else:
 							field=field.reshape(0,0)
@@ -171,8 +170,8 @@
 					try:
 						#Get field and tolerance
-						field=numpy.array(field_values[k])
+						field=np.array(field_values[k])
 						if len(field.shape) == 1:
-							if numpy.size(field):
-								field=field.reshape(numpy.size(field),1)
+							if np.size(field):
+								field=field.reshape(np.size(field),1)
 							else:
 								field=field.reshape(0,0)
@@ -181,12 +180,12 @@
 						#compare to archive
 						# Matlab uses base 1, so use base 1 in labels
-						archive=numpy.array(archread(archive_file,archive_name+'_field'+str(k+1)))
+						archive=np.array(archread(archive_file,archive_name+'_field'+str(k+1)))
 						if archive == None:
 							raise NameError("Field name '"+archive_name+'_field'+str(k+1)+"' does not exist in archive file.")
-						error_diff=numpy.amax(numpy.abs(archive-field),axis=0)/ \
-								   (numpy.amax(numpy.abs(archive),axis=0)+sys.float_info.epsilon)
+						error_diff=np.amax(np.abs(archive-field),axis=0)/ \
+								   (np.amax(np.abs(archive),axis=0)+float_info.epsilon)
 
 						#disp test result
-						if (numpy.any(error_diff>tolerance) or numpy.isnan(error_diff)):
+						if (np.any(error_diff>tolerance) or np.isnan(error_diff)):
 							print 'ERROR   difference: %-7.2g > %7.2g test id: %i test name: %s field: %s' % \
 								(error_diff,tolerance,id,id_string,fieldname)
@@ -198,7 +197,7 @@
 
 						#something went wrong, print failure message:
-						print traceback.format_exc()
+						print format_exc()
 						directory=os.getcwd().split('/')    #  not used?
-						if   strcmpi(output,'nightly'):
+						if output=='nightly':
 							fid=open(os.path.join(ISSM_DIR,'nightlylog','pythonerror.log'), 'a')
 							fid.write('%s' % message)
@@ -214,7 +213,7 @@
 
 			#something went wrong, print failure message:
-			print traceback.format_exc()
+			print format_exc()
 			directory=os.getcwd().split('/')    #  not used?
-			if   strcmpi(output,'nightly'):
+			if output=='nightly':
 				fid=open(os.path.join(ISSM_DIR,'nightlylog','pythonerror.log'), 'a')
 				fid.write('%s' % message)
@@ -254,6 +253,5 @@
 	md = runme(args.id, args.exclude, args.benchmark, args.procedure, args.output, args.rank, args.numprocs)
 
-	from MatlabFuncs import strcmpi
-	if strcmpi(args.output,'nightly'):
+	if args.output=='nightly':
 		print "PYTHONEXITEDCORRECTLY"
 
Index: /issm/trunk-jpl/test/NightlyRun/test101.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test101.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test101.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfConstrainedStressSSA2d
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,4 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
 from massfluxatgate import massfluxatgate
 from generic import generic
@@ -14,37 +14,36 @@
 md=parameterize(md,'../Par/SquareShelfConstrained.py')
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 
 #outputs
 md.stressbalance.requested_outputs=['default','DeviatoricStressxx','DeviatoricStressyy','DeviatoricStressxy','MassFlux1','MassFlux2','MassFlux3','MassFlux4','MassFlux5','MassFlux6']
-md.outputdefinition.definitions=[
-		massfluxatgate('name','MassFlux1','profilename','../Exp/MassFlux1.exp','definitionstring','Outputdefinition1'),
-		massfluxatgate('name','MassFlux2','profilename','../Exp/MassFlux2.exp','definitionstring','Outputdefinition2'),
-		massfluxatgate('name','MassFlux3','profilename','../Exp/MassFlux3.exp','definitionstring','Outputdefinition3'),
-		massfluxatgate('name','MassFlux4','profilename','../Exp/MassFlux4.exp','definitionstring','Outputdefinition4'),
-		massfluxatgate('name','MassFlux5','profilename','../Exp/MassFlux5.exp','definitionstring','Outputdefinition5'),
-		massfluxatgate('name','MassFlux6','profilename','../Exp/MassFlux6.exp','definitionstring','Outputdefinition6')
-		]
+md.outputdefinition.definitions=[massfluxatgate('name','MassFlux1','profilename','../Exp/MassFlux1.exp','definitionstring','Outputdefinition1'),
+																 massfluxatgate('name','MassFlux2','profilename','../Exp/MassFlux2.exp','definitionstring','Outputdefinition2'),
+																 massfluxatgate('name','MassFlux3','profilename','../Exp/MassFlux3.exp','definitionstring','Outputdefinition3'),
+																 massfluxatgate('name','MassFlux4','profilename','../Exp/MassFlux4.exp','definitionstring','Outputdefinition4'),
+																 massfluxatgate('name','MassFlux5','profilename','../Exp/MassFlux5.exp','definitionstring','Outputdefinition5'),
+																 massfluxatgate('name','MassFlux6','profilename','../Exp/MassFlux6.exp','definitionstring','Outputdefinition6')]
 
 md=solve(md,'Stressbalance')
 
 #Fields and tolerances to track changes
-field_names     =['Vx','Vy','Vel','Pressure',\
-	'DeviatoricStressxx','DeviatoricStressyy','DeviatoricStressxy','MassFlux1','MassFlux2','MassFlux3','MassFlux4','MassFlux5','MassFlux6']
-field_tolerances=[1e-13,1e-13,1e-13,1e-13,\
-	1e-13,1e-13,1e-13,\
-	1e-13, 1e-13, 1e-13, 1e-13, 1e-13, 1e-13 ]
-field_values=[\
-	md.results.StressbalanceSolution.Vx,\
-	md.results.StressbalanceSolution.Vy,\
-	md.results.StressbalanceSolution.Vel,\
-	md.results.StressbalanceSolution.Pressure,\
-	md.results.StressbalanceSolution.DeviatoricStressxx,\
-	md.results.StressbalanceSolution.DeviatoricStressyy,\
-	md.results.StressbalanceSolution.DeviatoricStressxy,\
-	md.results.StressbalanceSolution.MassFlux1,\
-	md.results.StressbalanceSolution.MassFlux2,\
-	md.results.StressbalanceSolution.MassFlux3,\
-	md.results.StressbalanceSolution.MassFlux4,\
-	md.results.StressbalanceSolution.MassFlux5,\
-	md.results.StressbalanceSolution.MassFlux6 ]
+field_names     =['Vx','Vy','Vel','Pressure',
+									'DeviatoricStressxx','DeviatoricStressyy','DeviatoricStressxy',
+									'MassFlux1','MassFlux2','MassFlux3','MassFlux4','MassFlux5','MassFlux6']
+field_tolerances=[1e-13, 1e-13, 1e-13, 1e-13,
+									1e-13, 1e-13, 1e-13,
+									1e-13, 1e-13, 1e-13, 
+									1e-13, 1e-13, 1e-13 ]
+field_values=[md.results.StressbalanceSolution.Vx,
+							md.results.StressbalanceSolution.Vy,
+							md.results.StressbalanceSolution.Vel,
+							md.results.StressbalanceSolution.Pressure,
+							md.results.StressbalanceSolution.DeviatoricStressxx,
+							md.results.StressbalanceSolution.DeviatoricStressyy,
+							md.results.StressbalanceSolution.DeviatoricStressxy,
+							md.results.StressbalanceSolution.MassFlux1,
+							md.results.StressbalanceSolution.MassFlux2,
+							md.results.StressbalanceSolution.MassFlux3,
+							md.results.StressbalanceSolution.MassFlux4,
+							md.results.StressbalanceSolution.MassFlux5,
+							md.results.StressbalanceSolution.MassFlux6 ]
Index: /issm/trunk-jpl/test/NightlyRun/test102.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test102.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test102.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfConstrainedStressSSA3d
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',180000)
@@ -13,5 +14,5 @@
 md.extrude(3,2.)
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Stressbalance')
 
Index: /issm/trunk-jpl/test/NightlyRun/test103.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test103.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test103.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfConstrainedStressHO
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',180000)
@@ -13,24 +14,26 @@
 md.extrude(3,2.)
 md=setflowequation(md,'HO','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md.stressbalance.requested_outputs=['default','StressTensorxx','StressTensoryy','StressTensorzz','StressTensorxy','StressTensorxz','StressTensoryz']
 md=solve(md,'Stressbalance')
 
 #Fields and tolerances to track changes
-field_names     =['Vx','Vy','Vz','Vel','Pressure',\
-	'StressTensorxx','StressTensoryy','StressTensorzz','StressTensorxy','StressTensorxz','StressTensoryz']
-field_tolerances=[1e-09,1e-09,1e-09,1e-09,1e-09,\
-	1e-09,1e-09,1e-09,1e-09,1e-09,1e-08]
-field_values=[\
-	md.results.StressbalanceSolution.Vx,\
-	md.results.StressbalanceSolution.Vy,\
-	md.results.StressbalanceSolution.Vz,\
-	md.results.StressbalanceSolution.Vel,\
-	md.results.StressbalanceSolution.Pressure,\
-	md.results.StressbalanceSolution.StressTensorxx,\
-	md.results.StressbalanceSolution.StressTensoryy,\
-	md.results.StressbalanceSolution.StressTensorzz,\
-	md.results.StressbalanceSolution.StressTensorxy,\
-	md.results.StressbalanceSolution.StressTensorxz,\
-	md.results.StressbalanceSolution.StressTensoryz,\
-	]
+field_names     =['Vx','Vy','Vz',
+									'Vel','Pressure',
+									'StressTensorxx','StressTensoryy','StressTensorzz',
+									'StressTensorxy','StressTensorxz','StressTensoryz']
+field_tolerances=[1e-09,1e-09,1e-09,
+									1e-09,1e-09,
+									1e-09,1e-09,1e-09,
+									1e-09,1e-09,1e-08]
+field_values=[md.results.StressbalanceSolution.Vx,
+							md.results.StressbalanceSolution.Vy,
+							md.results.StressbalanceSolution.Vz,
+							md.results.StressbalanceSolution.Vel,
+							md.results.StressbalanceSolution.Pressure,
+							md.results.StressbalanceSolution.StressTensorxx,
+							md.results.StressbalanceSolution.StressTensoryy,
+							md.results.StressbalanceSolution.StressTensorzz,
+							md.results.StressbalanceSolution.StressTensorxy,
+							md.results.StressbalanceSolution.StressTensorxz,
+							md.results.StressbalanceSolution.StressTensoryz,]
Index: /issm/trunk-jpl/test/NightlyRun/test104.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test104.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test104.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfConstrainedStressFS
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',180000)
@@ -13,5 +14,5 @@
 md.extrude(3,2.)
 md=setflowequation(md,'FS','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Stressbalance')
 
@@ -19,9 +20,7 @@
 field_names     =['Vx','Vy','Vz','Vel','Pressure']
 field_tolerances=[1e-08,1e-08,1e-06,1e-08,1e-08]
-field_values=[\
-	md.results.StressbalanceSolution.Vx,\
-	md.results.StressbalanceSolution.Vy,\
-	md.results.StressbalanceSolution.Vz,\
-	md.results.StressbalanceSolution.Vel,\
-	md.results.StressbalanceSolution.Pressure,\
-	]
+field_values=[md.results.StressbalanceSolution.Vx,
+							md.results.StressbalanceSolution.Vy,
+							md.results.StressbalanceSolution.Vz,
+							md.results.StressbalanceSolution.Vel,
+							md.results.StressbalanceSolution.Pressure]
Index: /issm/trunk-jpl/test/NightlyRun/test105.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test105.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test105.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfConstrainedMasstransp2d
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',150000)
@@ -12,5 +13,5 @@
 md=parameterize(md,'../Par/SquareShelfConstrained.py')
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Masstransport')
 
Index: /issm/trunk-jpl/test/NightlyRun/test106.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test106.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test106.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfConstrainedMasstransp2dDG
 from model import *
+from socket import gethostname
 from triangle import *
 from meshconvert import *
@@ -7,5 +8,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',150000)
@@ -14,5 +15,5 @@
 md=parameterize(md,'../Par/SquareShelfConstrained.py')
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md.masstransport.stabilization=3
 md.masstransport.spcthickness=md.geometry.thickness
Index: /issm/trunk-jpl/test/NightlyRun/test107.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test107.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test107.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfConstrainedMasstransp3d
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',150000)
@@ -13,5 +14,5 @@
 md=setflowequation(md,'SSA','all')
 md.extrude(5,3.)
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Masstransport')
 
Index: /issm/trunk-jpl/test/NightlyRun/test108.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test108.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test108.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfConstrainedTherStea
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',180000)
@@ -14,5 +15,5 @@
 md=setflowequation(md,'SSA','all')
 md.timestepping.time_step=0
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Thermal')
 
Index: /issm/trunk-jpl/test/NightlyRun/test109.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test109.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test109.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfConstrainedTherTran
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',180000)
@@ -13,5 +14,5 @@
 md.extrude(3,1.)
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md.transient.isstressbalance=False
 md.transient.ismasstransport=False
@@ -24,6 +25,4 @@
 field_names     =['Temperature','BasalforcingsGroundediceMeltingRate']
 field_tolerances=[1e-13,1e-13]
-field_values=[\
-	md.results.TransientSolution[0].Temperature,\
-	md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate,\
-	]
+field_values=[md.results.TransientSolution[0].Temperature,
+							md.results.TransientSolution[0].BasalforcingsGroundediceMeltingRate]
Index: /issm/trunk-jpl/test/NightlyRun/test110.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test110.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test110.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfConstrainedTranSSA2d
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',150000)
@@ -12,5 +13,5 @@
 md=parameterize(md,'../Par/SquareShelfConstrained.py')
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md.transient.requested_outputs=['IceVolume']
 
Index: /issm/trunk-jpl/test/NightlyRun/test1101.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test1101.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test1101.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: ISMIPAHO
-import numpy
+import numpy as np
 import shutil
 from model import *
+from socket import gethostname
 from squaremesh import *
 from setmask import *
@@ -8,6 +9,4 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
-from PythonFuncs import *
 
 """
@@ -18,5 +17,6 @@
 printingflag=False
 
-L_list=[5000.,10000.,20000.,40000.,80000.,160000.]
+#L_list=[80000.]
+L_list=[80000.]
 results=[]
 minvx=[]
@@ -35,23 +35,23 @@
 
 	#Create dirichlet on the bed only
-	md.stressbalance.spcvx=float('NaN')*numpy.ones((md.mesh.numberofvertices,1))
-	md.stressbalance.spcvy=float('NaN')*numpy.ones((md.mesh.numberofvertices,1))
-	md.stressbalance.spcvz=float('NaN')*numpy.ones((md.mesh.numberofvertices,1))
+	md.stressbalance.spcvx=float('NaN')*np.ones((md.mesh.numberofvertices))
+	md.stressbalance.spcvy=float('NaN')*np.ones((md.mesh.numberofvertices))
+	md.stressbalance.spcvz=float('NaN')*np.ones((md.mesh.numberofvertices))
 
-	pos=numpy.nonzero(md.mesh.vertexonbase)
+	pos=np.where(md.mesh.vertexonbase)
 	md.stressbalance.spcvx[pos]=0.
 	md.stressbalance.spcvy[pos]=0.
 
 	#Create MPCs to have periodic boundary conditions
-	posx=numpy.nonzero(md.mesh.x==0.)[0]
-	posx2=numpy.nonzero(md.mesh.x==numpy.max(md.mesh.x))[0]
+	posx=np.where(md.mesh.x==0.)[0]
+	posx2=np.where(md.mesh.x==np.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]
+	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]
 
-	md.stressbalance.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))))
+	md.stressbalance.vertex_pairing=np.vstack((np.vstack((posx+1,posx2+1)).T,np.vstack((posy+1,posy2+1)).T))
 
 	#Compute the stressbalance
-	md.cluster=generic('name',oshostname(),'np',8)
+	md.cluster=generic('name',gethostname(),'np',8)
 	md=solve(md,'Stressbalance')
 
@@ -61,6 +61,6 @@
 	vz=md.results.StressbalanceSolution.Vz
 	results.append(md.results.StressbalanceSolution)
-	minvx.append(numpy.min(vx[-md.mesh.numberofvertices2d:]))
-	maxvx.append(numpy.max(vx[-md.mesh.numberofvertices2d:]))
+	minvx.append(np.min(vx[-md.mesh.numberofvertices2d:]))
+	maxvx.append(np.max(vx[-md.mesh.numberofvertices2d:]))
 
 	#Now plot vx, vy, vz and vx on a cross section
@@ -69,5 +69,5 @@
 		pass
 #		set(gcf,'Color','w')
-#		printmodel(['ismipaHOvx' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off');
+#		printmodel(['ismipaHOvx' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
 #		shutil.move("ismipaHOvx%d.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestA')
 #	plotmodel(md,'data',vy,'layer#all',md.mesh.numberoflayers,'xlim',[0 L/10^3],'ylim',[0 L/10^3],'unit','km')
@@ -75,5 +75,5 @@
 		pass
 #		set(gcf,'Color','w')
-#		printmodel(['ismipaHOvy' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off');
+#		printmodel(['ismipaHOvy' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
 #		shutil.move("ismipaHOvy%d.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestA')
 #	plotmodel(md,'data',vz,'layer#all',md.mesh.numberoflayers,'xlim',[0 L/10^3],'ylim',[0 L/10^3],'unit','km')
@@ -81,5 +81,5 @@
 		pass
 #		set(gcf,'Color','w')
-#		printmodel(['ismipaHOvz' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off');
+#		printmodel(['ismipaHOvz' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
 #		shutil.move("ismipaHOvz%d.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestA')
 
@@ -111,43 +111,25 @@
 		pass
 #		set(gcf,'Color','w')
-#		printmodel(['ismipaHOvxsec' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off');
+#		printmodel(['ismipaHOvxsec' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
 #		shutil.move("ismipaHOvxsec%d.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestA')
 
 #Now plot the min and max values of vx for each size of the square
-#plot([5 10 20 40 80 160],minvx);ylim([0 18]);xlim([0 160])
+#plot([5 10 20 40 80 160],minvx)ylim([0 18])xlim([0 160])
 if printingflag:
 	pass
 #	set(gcf,'Color','w')
-#	printmodel('ismipaHOminvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off');
+#	printmodel('ismipaHOminvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
 #	shutil.move('ismipaHOminvx.png',ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestA')
-#plot([5 10 20 40 80 160],maxvx);ylim([0 120]);xlim([0 160])
+#plot([5 10 20 40 80 160],maxvx)ylim([0 120])xlim([0 160])
 if printingflag:
 	pass
 #	set(gcf,'Color','w')
-#	printmodel('ismipaHOmaxvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off');
+#	printmodel('ismipaHOmaxvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
 #	shutil.move('ismipaHOmaxvx.png',ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestA')
 
 #Fields and tolerances to track changes
-field_names     =[\
-	'Vx5km','Vy5km','Vz5km',\
-	'Vx10km','Vy10km','Vz10km',\
-	'Vx20km','Vy20km','Vz20km',\
-	'Vx40km','Vy40km','Vz40km',\
-	'Vx80km','Vy80km','Vz80km',\
-	'Vx160km','Vy160km','Vz160km'
-]
-field_tolerances=[\
-	1e-09,1e-09,1e-09,\
-	1e-10,1e-10,1e-09,\
-	1e-09,1e-09,1e-09,\
-	1e-09,1e-08,1e-09,\
-	1e-08,1e-08,1e-08,\
-	1e-08,1e-07,1e-08,\
-]
+field_names     =['Vx80km','Vy80km','Vz80km']
+field_tolerances=[1e-08,1e-08,1e-08]
 field_values=[]
 for result in results:
-	field_values=field_values+[\
-		result.Vx,\
-		result.Vy,\
-		result.Vz,\
-		]
+	field_values=field_values+[result.Vx,result.Vy,result.Vz]
Index: /issm/trunk-jpl/test/NightlyRun/test1102.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test1102.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test1102.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: ISMIPAFS
-import numpy
+import numpy as np
 import shutil
 from model import *
+from socket import gethostname
 from squaremesh import *
 from setmask import *
@@ -8,6 +9,4 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
-from PythonFuncs import *
 
 """
@@ -18,5 +17,5 @@
 printingflag=False
 
-L_list=[5000.,10000.,20000.,40000.,80000.,160000.]
+L_list=[80000.]
 results=[]
 minvx=[]
@@ -31,7 +30,7 @@
 
 #	#Find elements at the corner and extract model
-#	posnodes=numpy.nonzero(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))))
-#	a=numpy.nonzero(ismember(md.mesh.elements,posnodes))[0]
-#	elements=numpy.ones((md.mesh.numberofelements),int)
+#	posnodes=np.nonzero(np.logical_and.reduce(np.logical_or.reduce(md.mesh.x==0.,md.mesh.x==np.max(md.mesh.x)),np.logical_or.reduce(md.mesh.y==0.,md.mesh.y==np.max(md.mesh.y))))
+#	a=np.nonzero(ismember(md.mesh.elements,posnodes))[0]
+#	elements=np.ones((md.mesh.numberofelements),int)
 #	elements[a]=0
 #	md.modelextract(elements)
@@ -42,19 +41,8 @@
 
 	#Create dirichlet on the bed only
-	pos=numpy.nonzero(md.mesh.vertexonbase)
+	pos=np.nonzero(md.mesh.vertexonbase)
 	md.stressbalance.spcvx[pos]=0.
 	md.stressbalance.spcvy[pos]=0.
 	md.stressbalance.spcvz[pos]=0.
-
-#	#Create MPCs to have periodic boundary conditions
-#	posx=numpy.nonzero(md.mesh.x==0.)[0]
-#	posx2=numpy.nonzero(md.mesh.x==numpy.max(md.mesh.x))[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.vertexonbase)))[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.vertexonbase)))[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.vertexonbase)))[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.vertexonbase)))[0]
-
-#	md.stressbalance.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))))
 
 	#Compute the stressbalance
@@ -62,5 +50,5 @@
 	md.stressbalance.reltol=float('NaN')
 	md.stressbalance.restol=1.
-	md.cluster=generic('name',oshostname(),'np',8)
+	md.cluster=generic('name',gethostname(),'np',8)
 	md=solve(md,'Stressbalance')
 
@@ -71,6 +59,6 @@
 	pressure=md.results.StressbalanceSolution.Pressure
 	results.append(md.results.StressbalanceSolution)
-	minvx.append(numpy.min(vx[-md.mesh.numberofvertices2d:]))
-	maxvx.append(numpy.max(vx[-md.mesh.numberofvertices2d:]))
+	minvx.append(np.min(vx[-md.mesh.numberofvertices2d:]))
+	maxvx.append(np.max(vx[-md.mesh.numberofvertices2d:]))
 
 	#Now plot vx, vy, vz and vx on a cross section
@@ -79,5 +67,5 @@
 		pass
 #		set(gcf,'Color','w')
-#		printmodel(['ismipaFSvx' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off');
+#		printmodel(['ismipaFSvx' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
 #		shutil.move("ismipaFSvx%d.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestA')
 #	plotmodel(md,'data',vy,'layer#all',md.mesh.numberoflayers,'xlim',[0 L/10^3],'ylim',[0 L/10^3],'unit','km','figure',3)
@@ -85,5 +73,5 @@
 		pass
 #		set(gcf,'Color','w')
-#		printmodel(['ismipaFSvy' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off');
+#		printmodel(['ismipaFSvy' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
 #		shutil.move("ismipaFSvy%d.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestA')
 #	plotmodel(md,'data',vz,'layer#all',md.mesh.numberoflayers,'xlim',[0 L/10^3],'ylim',[0 L/10^3],'unit','km','figure',4)
@@ -91,5 +79,5 @@
 		pass
 #		set(gcf,'Color','w')
-#		printmodel(['ismipaFSvz' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off');
+#		printmodel(['ismipaFSvz' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
 #		shutil.move("ismipaFSvz%d.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestA')
 
@@ -121,38 +109,24 @@
 		pass
 #		set(gcf,'Color','w')
-#		printmodel(['ismipaFSvxsec' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off');
+#		printmodel(['ismipaFSvxsec' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
 #		shutil.move("ismipaFSvxsec.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestA')
 
 #Now plot the min and max values of vx for each size of the square
-#plot([5 10 20 40 80 160],minvx);ylim([0 18])
+#plot([5 10 20 40 80 160],minvx)ylim([0 18])
 if printingflag:
 	pass
 #	set(gcf,'Color','w')
-#	printmodel('ismipaFSminvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off');
+#	printmodel('ismipaFSminvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
 #	shutil.move('ismipaFSminvx.png',ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestA')
-#plot([5 10 20 40 80 160],maxvx);ylim([0 120])
+#plot([5 10 20 40 80 160],maxvx)ylim([0 120])
 if printingflag:
 	pass
 #	set(gcf,'Color','w')
-#	printmodel('ismipaFSmaxvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off');
+#	printmodel('ismipaFSmaxvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
 #	shutil.move('ismipaFSmaxvx.png',ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestA')
 
 #Fields and tolerances to track changes
-field_names     =[\
-	'Vx5km','Vy5km','Vz5km',\
-	'Vx10km','Vy10km','Vz10km',\
-	'Vx20km','Vy20km','Vz20km',\
-	'Vx40km','Vy40km','Vz40km',\
-	'Vx80km','Vy80km','Vz80km',\
-	'Vx160km','Vy160km','Vz160km'
-]
-field_tolerances=[\
-	1e-12,1e-12,1e-12,\
-	1e-12,1e-12,1e-12,\
-	1e-12,1e-11,1e-12,\
-	1e-12,1e-11,1e-12,\
-	1e-12,1e-11,1e-12,\
-	1e-12,1e-11,1e-12,\
-]
+field_names     =['Vx80km','Vy80km','Vz80km']
+field_tolerances=[1e-12,1e-11,1e-12,]
 field_values=[]
 for result in results:
Index: /issm/trunk-jpl/test/NightlyRun/test1103.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test1103.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test1103.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: ISMIPBHO
-import numpy
+import numpy as np
 import shutil
 from model import *
+from socket import gethostname
 from squaremesh import *
 from setmask import *
@@ -8,6 +9,4 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
-from PythonFuncs import *
 
 """
@@ -18,5 +17,5 @@
 printingflag=False
 
-L_list=[5000.,10000.,20000.,40000.,80000.,160000.]
+L_list=[80000.]
 results=[]
 minvx=[]
@@ -35,22 +34,22 @@
 
 	#Create dirichlet on the bed only
-	md.stressbalance.spcvx=float('NaN')*numpy.ones((md.mesh.numberofvertices,1))
-	md.stressbalance.spcvy=float('NaN')*numpy.ones((md.mesh.numberofvertices,1))
-	md.stressbalance.spcvz=float('NaN')*numpy.ones((md.mesh.numberofvertices,1))
-	pos=numpy.nonzero(md.mesh.vertexonbase)
+	md.stressbalance.spcvx=float('NaN')*np.ones((md.mesh.numberofvertices))
+	md.stressbalance.spcvy=float('NaN')*np.ones((md.mesh.numberofvertices))
+	md.stressbalance.spcvz=float('NaN')*np.ones((md.mesh.numberofvertices))
+	pos=np.nonzero(md.mesh.vertexonbase)
 	md.stressbalance.spcvx[pos]=0.
 	md.stressbalance.spcvy[pos]=0.
 
 	#Create MPCs to have periodic boundary conditions
-	posx=numpy.nonzero(md.mesh.x==0.)[0]
-	posx2=numpy.nonzero(md.mesh.x==numpy.max(md.mesh.x))[0]
+	posx=np.where(md.mesh.x==0.)[0]
+	posx2=np.where(md.mesh.x==np.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]
+	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]
 
-	md.stressbalance.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))))
+	md.stressbalance.vertex_pairing=np.vstack((np.vstack((posx+1,posx2+1)).T,np.vstack((posy+1,posy2+1)).T))
 
 	#Compute the stressbalance
-	md.cluster=generic('name',oshostname(),'np',8)
+	md.cluster=generic('name',gethostname(),'np',8)
 	md=solve(md,'Stressbalance')
 
@@ -60,6 +59,6 @@
 	vz=md.results.StressbalanceSolution.Vz
 	results.append(md.results.StressbalanceSolution)
-	minvx.append(numpy.min(vx[md.mesh.numberofvertices2d:]))
-	maxvx.append(numpy.max(vx[md.mesh.numberofvertices2d:]))
+	minvx.append(np.min(vx[md.mesh.numberofvertices2d:]))
+	maxvx.append(np.max(vx[md.mesh.numberofvertices2d:]))
 
 	#Now plot vx, vy, vz and vx on a cross section
@@ -68,5 +67,5 @@
 		pass
 #		set(gcf,'Color','w')
-#		printmodel(['ismipbHOvx' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off');
+#		printmodel(['ismipbHOvx' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
 #		shutil.move("ismipbHOvx%d.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestB')
 #	plotmodel(md,'data',vz,'layer#all',md.mesh.numberoflayers,'xlim',[0 L/10^3],'ylim',[0 L/10^3],'unit','km')
@@ -74,5 +73,5 @@
 		pass
 #		set(gcf,'Color','w')
-#		printmodel(['ismipbHOvz' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off');
+#		printmodel(['ismipbHOvz' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
 #		shutil.move("ismipbHOvz%d.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestB')
 
@@ -104,43 +103,25 @@
 		pass
 #		set(gcf,'Color','w')
-#		printmodel(['ismipbHOvxsec' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off');
+#		printmodel(['ismipbHOvxsec' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
 #		shutil.move("ismipbHOvxsec%d.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestB')
 
 #Now plot the min and max values of vx for each size of the square
-#plot([5 10 20 40 80 160],minvx);ylim([0 14]);xlim([0 160])
+#plot([5 10 20 40 80 160],minvx)ylim([0 14])xlim([0 160])
 if printingflag:
 	pass
 #	set(gcf,'Color','w')
-#	printmodel('ismipbHOminvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off');
+#	printmodel('ismipbHOminvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
 #	shutil.move('ismipbHOminvx.png',ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestB')
-#plot([5 10 20 40 80 160],maxvx);ylim([0 120]);xlim([0 160])
+#plot([5 10 20 40 80 160],maxvx)ylim([0 120])xlim([0 160])
 if printingflag:
 	pass
 #	set(gcf,'Color','w')
-#	printmodel('ismipbHOmaxvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off');
+#	printmodel('ismipbHOmaxvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
 #	shutil.move('ismipbHOmaxvx.png',ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestB')
 
 #Fields and tolerances to track changes
-field_names     =[\
-	'Vx5km','Vy5km','Vz5km',\
-	'Vx10km','Vy10km','Vz10km',\
-	'Vx20km','Vy20km','Vz20km',\
-	'Vx40km','Vy40km','Vz40km',\
-	'Vx80km','Vy80km','Vz80km',\
-	'Vx160km','Vy160km','Vz160km'
-]
-field_tolerances=[\
-	1e-09,1e-09,1e-09,\
-	1e-09,1e-09,1e-09,\
-	1e-09,1e-09,1e-09,\
-	1e-08,1e-08,1e-08,\
-	1e-08,1e-07,1e-07,\
-	1e-07,1e-06,1e-07,\
-]
+field_names     =['Vx80km','Vy80km','Vz80km']
+field_tolerances=[1e-08,1e-07,1e-07]
 field_values=[]
 for result in results:
-	field_values=field_values+[\
-		result.Vx,\
-		result.Vy,\
-		result.Vz,\
-		]
+	field_values=field_values+[result.Vx,result.Vy,result.Vz]
Index: /issm/trunk-jpl/test/NightlyRun/test1104.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test1104.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test1104.py	(revision 21408)
@@ -1,5 +1,6 @@
 #Test Name: ISMIPBFS
-import numpy
+import numpy as np
 from model import *
+from socket import gethostname
 from squaremesh import *
 from setmask import *
@@ -7,6 +8,4 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
-from PythonFuncs import *
 
 """
@@ -15,5 +14,5 @@
 """
 
-L_list=[5000.,10000.,20000.,40000.,80000.,160000.]
+L_list=[80000.]
 results=[]
 
@@ -29,29 +28,29 @@
 
 	#Create dirichlet on the bed only
-	md.stressbalance.spcvx=float('NaN')*numpy.ones((md.mesh.numberofvertices,1))
-	md.stressbalance.spcvy=float('NaN')*numpy.ones((md.mesh.numberofvertices,1))
-	md.stressbalance.spcvz=float('NaN')*numpy.ones((md.mesh.numberofvertices,1))
+	md.stressbalance.spcvx=float('NaN')*np.ones((md.mesh.numberofvertices))
+	md.stressbalance.spcvy=float('NaN')*np.ones((md.mesh.numberofvertices))
+	md.stressbalance.spcvz=float('NaN')*np.ones((md.mesh.numberofvertices))
 
-	pos=numpy.nonzero(md.mesh.vertexonbase)
+	pos=np.where(md.mesh.vertexonbase)
 	md.stressbalance.spcvx[pos]=0.
 	md.stressbalance.spcvy[pos]=0.
 
 	#Create MPCs to have periodic boundary conditions
-	posx=numpy.nonzero(md.mesh.x==0.)[0]
-	posx2=numpy.nonzero(md.mesh.x==numpy.max(md.mesh.x))[0]
+	posx=np.where(md.mesh.x==0.)[0]
+	posx2=np.where(md.mesh.x==np.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]
+	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]
 
-	md.stressbalance.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))))
-
+	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=float('NaN')
-	md.cluster=generic('name',oshostname(),'np',8)
+	md.cluster=generic('name',gethostname(),'np',8)
 	md=solve(md,'Stressbalance')
-	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)))
+	pos=np.where(np.logical_or.reduce((md.mesh.x==0.,md.mesh.y==0.,md.mesh.x==np.max(md.mesh.x),md.mesh.y==np.max(md.mesh.y))))
 	md.stressbalance.spcvx[pos]=md.results.StressbalanceSolution.Vx[pos]
 	md.stressbalance.spcvy[pos]=md.results.StressbalanceSolution.Vy[pos]
-	md.stressbalance.vertex_pairing=numpy.empty((0,2),int)
+	md.stressbalance.vertex_pairing=np.empty((0,2),int)
 	md=setflowequation(md,'FS','all')
 	md=solve(md,'Stressbalance')
@@ -66,25 +65,7 @@
 
 #Fields and tolerances to track changes
-field_names     =[\
-	'Vx5km','Vy5km','Vz5km',\
-	'Vx10km','Vy10km','Vz10km',\
-	'Vx20km','Vy20km','Vz20km',\
-	'Vx40km','Vy40km','Vz40km',\
-	'Vx80km','Vy80km','Vz80km',\
-	'Vx160km','Vy160km','Vz160km'
-]
-field_tolerances=[\
-	1e-08,1e-08,1e-08,\
-	1e-08,1e-08,1e-08,\
-	1e-08,1e-08,1e-08,\
-	1e-08,1e-08,1e-08,\
-	1e-08,1e-07,1e-08,\
-	1e-07,1e-07,1e-07,\
-]
+field_names     =['Vx80km','Vy80km','Vz80km']
+field_tolerances=[1e-08,1e-07,1e-08]
 field_values=[]
 for result in results:
-	field_values=field_values+[\
-		result.Vx,\
-		result.Vy,\
-		result.Vz,\
-		]
+	field_values=field_values+[result.Vx,result.Vy,result.Vz]
Index: /issm/trunk-jpl/test/NightlyRun/test1105.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test1105.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test1105.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: ISMIPCHO
-import numpy
+import numpy as np
 import shutil
 from model import *
+from socket import gethostname
 from squaremesh import *
 from setmask import *
@@ -8,6 +9,4 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
-from PythonFuncs import *
 
 """
@@ -18,5 +17,5 @@
 printingflag=False
 
-L_list=[5000.,10000.,20000.,40000.,80000.,160000.]
+L_list=[80000.]
 results=[]
 minvx=[]
@@ -35,18 +34,18 @@
 
 	#Create MPCs to have periodic boundary conditions
-	md.stressbalance.spcvx=float('NaN')*numpy.ones((md.mesh.numberofvertices,1))
-	md.stressbalance.spcvy=float('NaN')*numpy.ones((md.mesh.numberofvertices,1))
-	md.stressbalance.spcvz=float('NaN')*numpy.ones((md.mesh.numberofvertices,1))
+	md.stressbalance.spcvx=float('NaN')*np.ones((md.mesh.numberofvertices))
+	md.stressbalance.spcvy=float('NaN')*np.ones((md.mesh.numberofvertices))
+	md.stressbalance.spcvz=float('NaN')*np.ones((md.mesh.numberofvertices))
 
-	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]
+	posx=np.where(np.logical_and.reduce((md.mesh.x==0.,md.mesh.y!=0.,md.mesh.y!=L)))[0]
+	posx2=np.where(np.logical_and.reduce((md.mesh.x==L,md.mesh.y!=0.,md.mesh.y!=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]
+	posy=np.where(np.logical_and.reduce((md.mesh.y==0.,md.mesh.x!=0.,md.mesh.x!=L)))[0]    #Don't take the same nodes two times
+	posy2=np.where(np.logical_and.reduce((md.mesh.y==L,md.mesh.x!=0.,md.mesh.x!=L)))[0]
 
-	md.stressbalance.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))))
+	md.stressbalance.vertex_pairing=np.vstack((np.vstack((posx+1,posx2+1)).T,np.vstack((posy+1,posy2+1)).T))
 
 	#Add spc on the corners
-	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.vertexonbase))
+	pos=np.where(np.logical_and.reduce((np.logical_or(md.mesh.x==0.,md.mesh.x==L),np.logical_or(md.mesh.y==0.,md.mesh.y==L),md.mesh.vertexonbase)))
 	md.stressbalance.spcvx[pos]=0.
 	md.stressbalance.spcvy[pos]=0.
@@ -71,9 +70,9 @@
 	
 	#Spc the bed at zero for vz
-	pos=numpy.nonzero(md.mesh.vertexonbase)
+	pos=np.where(md.mesh.vertexonbase)
 	md.stressbalance.spcvz[pos]=0.
 
 	#Compute the stressbalance
-	md.cluster=generic('name',oshostname(),'np',8)
+	md.cluster=generic('name',gethostname(),'np',8)
 	md=solve(md,'Stressbalance')
 
@@ -83,6 +82,6 @@
 	vz=md.results.StressbalanceSolution.Vz
 	results.append(md.results.StressbalanceSolution)
-	minvx.append(numpy.min(vx[-md.mesh.numberofvertices2d:]))
-	maxvx.append(numpy.max(vx[-md.mesh.numberofvertices2d:]))
+	minvx.append(np.min(vx[-md.mesh.numberofvertices2d:]))
+	maxvx.append(np.max(vx[-md.mesh.numberofvertices2d:]))
 
 	#Now plot vx, vy, vz and vx on a cross section
@@ -91,5 +90,5 @@
 		pass
 #		set(gcf,'Color','w')
-#		printmodel(['ismipcHOvx' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off');
+#		printmodel(['ismipcHOvx' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
 #		shutil.move("ismipcHOvx%d.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestC')
 #	plotmodel(md,'data',vy,'layer#all',md.mesh.numberoflayers,'xlim',[0 L/10^3],'ylim',[0 L/10^3],'unit','km','figure',3)
@@ -97,5 +96,5 @@
 		pass
 #		set(gcf,'Color','w')
-#		printmodel(['ismipcHOvy' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off');
+#		printmodel(['ismipcHOvy' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
 #		shutil.move("ismipcHOvy%d.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestC')
 #	plotmodel(md,'data',vz,'layer#all',md.mesh.numberoflayers,'xlim',[0 L/10^3],'ylim',[0 L/10^3],'unit','km','figure',4)
@@ -103,5 +102,5 @@
 		pass
 #		set(gcf,'Color','w')
-#		printmodel(['ismipcHOvz' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off');
+#		printmodel(['ismipcHOvz' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
 #		shutil.move("ismipcHOvz%d.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestC')
 
@@ -133,43 +132,25 @@
 		pass
 #		set(gcf,'Color','w')
-#		printmodel(['ismipcHOvxsec' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off');
+#		printmodel(['ismipcHOvxsec' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
 #		shutil.move("ismipcHOvxsec%d.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestC')
 
 #Now plot the min and max values of vx for each size of the square
-#plot([5 10 20 40 80 160],minvx);ylim([4 18]);xlim([0 160])
+#plot([5 10 20 40 80 160],minvx)ylim([4 18])xlim([0 160])
 if printingflag:
 	pass
 #	set(gcf,'Color','w')
-#	printmodel('ismipcHOminvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off');
+#	printmodel('ismipcHOminvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
 #	shutil.move('ismipcHOminvx.png',ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestC')
-#plot([5 10 20 40 80 160],maxvx);ylim([0 200]); xlim([0 160])
+#plot([5 10 20 40 80 160],maxvx)ylim([0 200]) xlim([0 160])
 if printingflag:
 	pass
 #	set(gcf,'Color','w')
-#	printmodel('ismipcHOmaxvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off');
+#	printmodel('ismipcHOmaxvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
 #	shutil.move('ismipcHOmaxvx.png',ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestC')
 
 #Fields and tolerances to track changes
-field_names     =[\
-	'Vx5km','Vy5km','Vz5km',\
-	'Vx10km','Vy10km','Vz10km',\
-	'Vx20km','Vy20km','Vz20km',\
-	'Vx40km','Vy40km','Vz40km',\
-	'Vx80km','Vy80km','Vz80km',\
-	'Vx160km','Vy160km','Vz160km'
-]
-field_tolerances=[\
-	1e-08,1e-07,1e-07,\
-	1e-09,1e-07,1e-07,\
-	1e-09,1e-09,1e-07,\
-	1e-09,1e-09,1e-08,\
-	1e-09,1e-08,1e-08,\
-	1e-09,1e-08,1e-08,\
-]
+field_names     =['Vx80km','Vy80km','Vz80km']
+field_tolerances=[1e-09,1e-08,1e-08]
 field_values=[]
 for result in results:
-	field_values=field_values+[\
-		result.Vx,\
-		result.Vy,\
-		result.Vz,\
-		]
+	field_values=field_values+[result.Vx,result.Vy,result.Vz]
Index: /issm/trunk-jpl/test/NightlyRun/test1106.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test1106.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test1106.py	(revision 21408)
@@ -1,5 +1,6 @@
 #Test Name: ISMIPCFS
-import numpy
+import numpy as np
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -7,6 +8,4 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
-from PythonFuncs import *
 
 """
@@ -15,5 +14,5 @@
 """
 
-L_list=[5000.,10000.,20000.,40000.,80000.,160000.]
+L_list=[80000.]
 results=[]
 
@@ -22,9 +21,9 @@
 	md=setmask(md,'','')    #ice sheet test
 	md=parameterize(md,'../Par/ISMIPC.py')
-	md.friction.coefficient=numpy.sqrt(md.constants.yts*(1000.+1000.*numpy.sin(md.mesh.x.reshape(-1,1)*2.*numpy.pi/L)*numpy.sin(md.mesh.y.reshape(-1,1)*2.*numpy.pi/L)))
+	md.friction.coefficient=np.sqrt(md.constants.yts*(1000.+1000.*np.sin(md.mesh.x*2.*np.pi/L)*np.sin(md.mesh.y*2.*np.pi/L)))
 	md.extrude(10,1.)
 
 	#Add spc on the borders
-	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)))
+	pos=np.where(np.logical_or.reduce((md.mesh.x==0.,md.mesh.x==np.max(md.mesh.x),md.mesh.y==0.,md.mesh.y==np.max(md.mesh.y))))
 	md.stressbalance.spcvx[pos]=0.
 	md.stressbalance.spcvy[pos]=0.
@@ -51,5 +50,5 @@
 
 	#Compute the stressbalance
-	md.cluster=generic('name',oshostname(),'np',8)
+	md.cluster=generic('name',gethostname(),'np',8)
 	md=solve(md,'Stressbalance')
 
@@ -63,25 +62,7 @@
 
 #Fields and tolerances to track changes
-field_names     =[\
-	'Vx5km','Vy5km','Vz5km',\
-	'Vx10km','Vy10km','Vz10km',\
-	'Vx20km','Vy20km','Vz20km',\
-	'Vx40km','Vy40km','Vz40km',\
-	'Vx80km','Vy80km','Vz80km',\
-	'Vx160km','Vy160km','Vz160km'
-]
-field_tolerances=[\
-	1e-12,1e-12,1e-11,\
-	1e-12,1e-12,1e-12,\
-	1e-12,1e-12,1e-12,\
-	1e-12,1e-12,1e-12,\
-	1e-12,1e-12,1e-12,\
-	1e-12,1e-11,1e-12,\
-]
+field_names     =['Vx80km','Vy80km','Vz80km']
+field_tolerances=[1e-12,1e-12,1e-12]
 field_values=[]
 for result in results:
-	field_values=field_values+[\
-		result.Vx,\
-		result.Vy,\
-		result.Vz,\
-		]
+	field_values=field_values+[result.Vx,result.Vy,result.Vz]
Index: /issm/trunk-jpl/test/NightlyRun/test1107.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test1107.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test1107.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: ISMIPDHO
-import numpy
+import numpy as np
 import shutil
 from model import *
+from socket import gethostname
 from squaremesh import *
 from setmask import *
@@ -8,6 +9,4 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
-from PythonFuncs import *
 
 """
@@ -18,5 +17,5 @@
 printingflag=False
 
-L_list=[5000.,10000.,20000.,40000.,80000.,160000.]
+L_list=[80000.]
 results=[]
 minvx=[]
@@ -35,21 +34,21 @@
 
 	#We need one grd on dirichlet: the 4 corners are set to zero
-	md.stressbalance.spcvx=float('NaN')*numpy.ones((md.mesh.numberofvertices,1))
-	md.stressbalance.spcvy=float('NaN')*numpy.ones((md.mesh.numberofvertices,1))
-	md.stressbalance.spcvz=float('NaN')*numpy.ones((md.mesh.numberofvertices,1))
+	md.stressbalance.spcvx=float('NaN')*np.ones((md.mesh.numberofvertices))
+	md.stressbalance.spcvy=float('NaN')*np.ones((md.mesh.numberofvertices))
+	md.stressbalance.spcvz=float('NaN')*np.ones((md.mesh.numberofvertices))
 
 	#Create MPCs to have periodic boundary conditions
-#	posx=find(md.mesh.x==0. & ~(md.mesh.y==0. & md.mesh.vertexonbase) & ~(md.mesh.y==L & md.mesh.vertexonbase));
-	posx=numpy.nonzero(logical_and_n(md.mesh.x==0.,numpy.logical_not(numpy.logical_and(md.mesh.y==0.,md.mesh.vertexonbase)),numpy.logical_not(numpy.logical_and(md.mesh.y==L,md.mesh.vertexonbase))))[0]
-#	posx2=find(md.mesh.x==max(md.mesh.x) & ~(md.mesh.y==0. & md.mesh.vertexonbase) & ~(md.mesh.y==L & md.mesh.vertexonbase));
-	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.vertexonbase)),numpy.logical_not(numpy.logical_and(md.mesh.y==L,md.mesh.vertexonbase))))[0]
+#	posx=find(md.mesh.x==0. & ~(md.mesh.y==0. & md.mesh.vertexonbase) & ~(md.mesh.y==L & md.mesh.vertexonbase))
+	posx=np.where(np.logical_and.reduce((md.mesh.x==0.,np.logical_not(np.logical_and(md.mesh.y==0.,md.mesh.vertexonbase)),np.logical_not(np.logical_and(md.mesh.y==L,md.mesh.vertexonbase)))))[0]
+#	posx2=find(md.mesh.x==max(md.mesh.x) & ~(md.mesh.y==0. & md.mesh.vertexonbase) & ~(md.mesh.y==L & md.mesh.vertexonbase))
+	posx2=np.where(np.logical_and.reduce((md.mesh.x==np.max(md.mesh.x),np.logical_not(np.logical_and(md.mesh.y==0.,md.mesh.vertexonbase)),np.logical_not(np.logical_and(md.mesh.y==L,md.mesh.vertexonbase)))))[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]
+	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]
 
-	md.stressbalance.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))))
+	md.stressbalance.vertex_pairing=np.vstack((np.vstack((posx+1,posx2+1)).T,np.vstack((posy+1,posy2+1)).T))
 
 	#Add spc on the corners
-	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.vertexonbase))
+	pos=np.where(np.logical_and.reduce((np.logical_or(md.mesh.x==0.,md.mesh.x==L),np.logical_or(md.mesh.y==0.,md.mesh.y==L),md.mesh.vertexonbase)))
 	md.stressbalance.spcvy[:]=0.
 	md.stressbalance.spcvx[pos]=0.
@@ -68,9 +67,9 @@
 	
 	#Spc the bed at zero for vz
-	pos=numpy.nonzero(md.mesh.vertexonbase)
+	pos=np.where(md.mesh.vertexonbase)
 	md.stressbalance.spcvz[pos]=0.
 
 	#Compute the stressbalance
-	md.cluster=generic('name',oshostname(),'np',8)
+	md.cluster=generic('name',gethostname(),'np',8)
 	md=solve(md,'Stressbalance')
 
@@ -80,6 +79,6 @@
 	vz=md.results.StressbalanceSolution.Vz
 	results.append(md.results.StressbalanceSolution)
-	minvx.append(numpy.min(vx[-md.mesh.numberofvertices2d:]))
-	maxvx.append(numpy.max(vx[-md.mesh.numberofvertices2d:]))
+	minvx.append(np.min(vx[-md.mesh.numberofvertices2d:]))
+	maxvx.append(np.max(vx[-md.mesh.numberofvertices2d:]))
 
 	#Now plot vx, vy, vz and vx on a cross section
@@ -88,5 +87,5 @@
 		pass
 #		set(gcf,'Color','w')
-#		printmodel(['ismipdHOvx' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off');
+#		printmodel(['ismipdHOvx' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
 #		shutil.move("ismipdHOvx%d.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestD')
 #	plotmodel(md,'data',vz,'layer#all',md.mesh.numberoflayers,'xlim',[0 L/10^3],'ylim',[0 L/10^3],'unit','km','figure',3)
@@ -94,5 +93,5 @@
 		pass
 #		set(gcf,'Color','w')
-#		printmodel(['ismipdHOvz' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off');
+#		printmodel(['ismipdHOvz' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
 #		shutil.move("ismipdHOvz%d.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestD')
 
@@ -124,43 +123,25 @@
 		pass
 #		set(gcf,'Color','w')
-#		printmodel(['ismipdHOvxsec' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off');
+#		printmodel(['ismipdHOvxsec' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
 #		shutil.move("ismipdHOvxsec%d.png" % L,ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestD')
 
 #Now plot the min and max values of vx for each size of the square
-#plot([5 10 20 40 80 160],minvx);ylim([2 18]);xlim([0 160])
+#plot([5 10 20 40 80 160],minvx)ylim([2 18])xlim([0 160])
 if printingflag:
 	pass
 #	set(gcf,'Color','w')
-#	printmodel('ismipdHOminvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off');
+#	printmodel('ismipdHOminvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
 #	shutil.move('ismipdHOminvx.png',ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestD')
-#plot([5 10 20 40 80 160],maxvx);ylim([0 300]);xlim([0 160])
+#plot([5 10 20 40 80 160],maxvx)ylim([0 300])xlim([0 160])
 if printingflag:
 	pass
 #	set(gcf,'Color','w')
-#	printmodel('ismipdHOmaxvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off');
+#	printmodel('ismipdHOmaxvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off')
 #	shutil.move('ismipdHOmaxvx.png',ISSM_DIR+'/website/doc_pdf/validation/Images/ISMIP/TestD')
 
 #Fields and tolerances to track changes
-field_names     =[\
-	'Vx5km','Vy5km','Vz5km',\
-	'Vx10km','Vy10km','Vz10km',\
-	'Vx20km','Vy20km','Vz20km',\
-	'Vx40km','Vy40km','Vz40km',\
-	'Vx80km','Vy80km','Vz80km',\
-	'Vx160km','Vy160km','Vz160km'
-]
-field_tolerances=[\
-	1e-07,1e-08,1e-06,\
-	1e-08,1e-08,1e-06,\
-	1e-08,1e-08,1e-07,\
-	1e-08,1e-08,1e-07,\
-	1e-08,1e-08,1e-07,\
-	1e-07,1e-08,1e-06,\
-]
+field_names     =['Vx80km','Vy80km','Vz80km']
+field_tolerances=[1e-08,1e-08,1e-07]
 field_values=[]
 for result in results:
-	field_values=field_values+[\
-		result.Vx,\
-		result.Vy,\
-		result.Vz,\
-		]
+	field_values=field_values+[result.Vx,result.Vy,result.Vz]
Index: /issm/trunk-jpl/test/NightlyRun/test1108.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test1108.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test1108.py	(revision 21408)
@@ -1,5 +1,6 @@
 #Test Name: ISMIPDFS
-import numpy
+import numpy as np
 from model import *
+from socket import gethostname
 from bamg import *
 from setmask import *
@@ -7,5 +8,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 from PythonFuncs import *
 
@@ -15,5 +16,5 @@
 """
 
-L_list=[5000.,10000.,20000.,40000.,80000.,160000.]
+L_list=[80000.]
 results=[]
 
@@ -30,9 +31,9 @@
 
 	#We need one grd on dirichlet: the 4 corners are set to zero
-	md.stressbalance.spcvx=float('NaN')*numpy.ones((md.mesh.numberofvertices,1))
-	md.stressbalance.spcvy=float('NaN')*numpy.ones((md.mesh.numberofvertices,1))
-	md.stressbalance.spcvz=float('NaN')*numpy.ones((md.mesh.numberofvertices,1))
+	md.stressbalance.spcvx=float('NaN')*np.ones((md.mesh.numberofvertices))
+	md.stressbalance.spcvy=float('NaN')*np.ones((md.mesh.numberofvertices))
+	md.stressbalance.spcvz=float('NaN')*np.ones((md.mesh.numberofvertices))
 	
-	pos=numpy.nonzero(logical_and_n(md.mesh.vertexonbase,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=np.nonzero(logical_and.reduce_n(md.mesh.vertexonbase,np.logical_or.reduce(md.mesh.x==0.,md.mesh.x==np.max(md.mesh.x)),np.logical_or.reduce(md.mesh.y==0.,md.mesh.y==np.max(md.mesh.y))))
 	md.stressbalance.spcvx[pos]=0.
 	md.stressbalance.spcvy[pos]=0.
@@ -40,24 +41,24 @@
 
 	#Create MPCs to have periodic boundary conditions
-	posx=numpy.nonzero(md.mesh.x==0.)[0]
-	posx2=numpy.nonzero(md.mesh.x==numpy.max(md.mesh.x))[0]
+	posx=np.nonzero(md.mesh.x==0.)[0]
+	posx2=np.nonzero(md.mesh.x==np.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]
+	posy=np.nonzero(logical_and.reduce_n(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.nonzero(logical_and.reduce_n(md.mesh.y==np.max(md.mesh.y),md.mesh.x!=0.,md.mesh.x!=np.max(md.mesh.x)))[0]
 
-	md.stressbalance.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))))
+	md.stressbalance.vertex_pairing=np.vstack((np.hstack((posx.reshape(-1,1)+1,posx2.reshape(-1,1)+1)),np.hstack((posy.reshape(-1,1)+1,posy2.reshape(-1,1)+1))))
 
 	#Compute the stressbalance
-	md.cluster=generic('name',oshostname(),'np',8)
+	md.cluster=generic('name',gethostname(),'np',8)
 	md.verbose=verbose('convergence',True)
 	md=solve(md,'Stressbalance')
 	md.stressbalance.reltol=float('NaN')
 	md.stressbalance.abstol=float('NaN')
-	md.stressbalance.vertex_pairing=numpy.empty((0,2))
+	md.stressbalance.vertex_pairing=np.empty((0,2))
 	#We need one grid on dirichlet: the 4 corners are set to zero
-	md.stressbalance.spcvx=float('NaN')*numpy.ones((md.mesh.numberofvertices,1))
-	md.stressbalance.spcvy=float('NaN')*numpy.ones((md.mesh.numberofvertices,1))
-	md.stressbalance.spcvz=float('NaN')*numpy.ones((md.mesh.numberofvertices,1))
-	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.stressbalance.spcvx=float('NaN')*np.ones((md.mesh.numberofvertices))
+	md.stressbalance.spcvy=float('NaN')*np.ones((md.mesh.numberofvertices))
+	md.stressbalance.spcvz=float('NaN')*np.ones((md.mesh.numberofvertices))
+	pos=np.nonzero(logical_or.reduce_n(md.mesh.y==0.,md.mesh.x==0.,md.mesh.x==np.max(md.mesh.x),md.mesh.y==np.max(md.mesh.y)))    #Don't take the same nodes two times
 	md.stressbalance.spcvx[pos]=md.results.StressbalanceSolution.Vx[pos]
 	md.stressbalance.spcvy[pos]=md.results.StressbalanceSolution.Vy[pos]
@@ -74,20 +75,6 @@
 
 #Fields and tolerances to track changes
-field_names     =[\
-	'Vx5km','Vy5km','Vz5km',\
-	'Vx10km','Vy10km','Vz10km',\
-	'Vx20km','Vy20km','Vz20km',\
-	'Vx40km','Vy40km','Vz40km',\
-	'Vx80km','Vy80km','Vz80km',\
-	'Vx160km','Vy160km','Vz160km'
-]
-field_tolerances=[\
-	1e-07,1e-07,1e-07,\
-	1e-08,1e-08,1e-08,\
-	1e-08,1e-07,1e-07,\
-	1e-08,1e-08,1e-08,\
-	1e-08,1e-07,1e-07,\
-	1e-07,1e-06,1e-07,\
-]
+field_names     =['Vx80km','Vy80km','Vz80km']
+field_tolerances=[1e-08,1e-07,1e-07]
 field_values=[]
 for result in results:
Index: /issm/trunk-jpl/test/NightlyRun/test111.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test111.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test111.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfConstrainedTranHO
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',200000)
@@ -13,5 +14,5 @@
 md.extrude(3,1.)
 md=setflowequation(md,'HO','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md.transient.requested_outputs=['IceVolume']
 md=solve(md,'Transient')
Index: /issm/trunk-jpl/test/NightlyRun/test112.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test112.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test112.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfConstrainedSurfSlop2d
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',150000)
@@ -12,5 +13,5 @@
 md=parameterize(md,'../Par/SquareShelfConstrained.py')
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'SurfaceSlope')
 
Index: /issm/trunk-jpl/test/NightlyRun/test113.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test113.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test113.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfConstrainedSurfSlope3d
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',150000)
@@ -13,5 +14,5 @@
 md.extrude(5,1.)
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'SurfaceSlope')
 
Index: /issm/trunk-jpl/test/NightlyRun/test114.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test114.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test114.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfConstrainedBedSlop2d
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',150000)
@@ -12,5 +13,5 @@
 md=parameterize(md,'../Par/SquareShelfConstrained.py')
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'BedSlope')
 
Index: /issm/trunk-jpl/test/NightlyRun/test115.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test115.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test115.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfConstrainedBedSlop3d
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',150000)
@@ -13,5 +14,5 @@
 md.extrude(5,1.)
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'BedSlope')
 
Index: /issm/trunk-jpl/test/NightlyRun/test116.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test116.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test116.py	(revision 21408)
@@ -1,5 +1,6 @@
 #Test Name: SquareShelfConstrainedBalThic2d
-import numpy
+import numpy as np
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -7,5 +8,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',150000)
@@ -13,8 +14,8 @@
 md=parameterize(md,'../Par/SquareShelfConstrained.py')
 #Add boundary conditions on thickness on the border
-pos=numpy.nonzero(md.mesh.vertexonboundary)
+pos=np.nonzero(md.mesh.vertexonboundary)
 md.balancethickness.spcthickness[pos]=md.geometry.thickness[pos]
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Balancethickness')
 
Index: /issm/trunk-jpl/test/NightlyRun/test119.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test119.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test119.py	(revision 21408)
@@ -1,8 +1,9 @@
 #Test Name: SquareBamgMesh
-import numpy
+import numpy as np
 import time
 from model import *
+from socket import gethostname
 from bamg import *
-from MatlabFuncs import *
+
 
 #Simple mesh
@@ -12,5 +13,5 @@
 
 #hVertices
-md=bamg(model(),'domain','../Exp/Square.exp','hmax',300000.,'hVertices',numpy.array([10000.,100000.,400000.,100000.]).reshape(-1,1),'rand',False)
+md=bamg(model(),'domain','../Exp/Square.exp','hmax',300000.,'hVertices',np.array([10000.,100000.,400000.,100000.]).reshape(-1,1),'rand',False)
 x2=md.mesh.x
 y2=md.mesh.y
Index: /issm/trunk-jpl/test/NightlyRun/test120.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test120.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test120.py	(revision 21408)
@@ -1,5 +1,6 @@
 #Test Name: SquareShelfConstrainedEnthalpyStea
-import numpy
+import numpy as np
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -7,5 +8,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',180000)
@@ -15,10 +16,10 @@
 md=setflowequation(md,'SSA','all')
 md.timestepping.time_step=0
-md.initialization.waterfraction=numpy.zeros(md.mesh.numberofvertices)
-md.initialization.watercolumn=numpy.zeros(md.mesh.numberofvertices)
-md.thermal.isenthalpy = 1;
-md.thermal.isdynamicbasalspc = 1;
+md.initialization.waterfraction=np.zeros(md.mesh.numberofvertices)
+md.initialization.watercolumn=np.zeros(md.mesh.numberofvertices)
+md.thermal.isenthalpy = 1
+md.thermal.isdynamicbasalspc = 1
 
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Thermal')
 
@@ -26,7 +27,5 @@
 field_names     =['Enthalpy','Waterfraction','Temperature']
 field_tolerances=[1e-13,2e-10,1e-13]
-field_values=[\
-	md.results.ThermalSolution.Enthalpy,\
-	md.results.ThermalSolution.Waterfraction,\
-	md.results.ThermalSolution.Temperature,\
-	]
+field_values=[md.results.ThermalSolution.Enthalpy,
+							md.results.ThermalSolution.Waterfraction,
+							md.results.ThermalSolution.Temperature]
Index: /issm/trunk-jpl/test/NightlyRun/test1201.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test1201.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test1201.py	(revision 21408)
@@ -1,5 +1,6 @@
 #Test Name: EISMINTMassConservation
-import numpy
+import numpy as np
 from model import *
+from socket import gethostname
 from bamg import *
 from setmask import *
@@ -7,5 +8,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 """
@@ -14,5 +15,4 @@
 
 printingflag=False
-
 results=[]
 
@@ -24,9 +24,9 @@
 	md.smb.mass_balance[:]=0.
 	md=setflowequation(md,'SSA','all')
-	md.cluster=generic('name',oshostname(),'np',8)
+	md.cluster=generic('name',gethostname(),'np',8)
 
 	print "      initial velocity"
-	md.initialization.vx=numpy.zeros((md.mesh.numberofvertices,1))
-	md.initialization.vy=-400.*numpy.ones((md.mesh.numberofvertices,1))
+	md.initialization.vx=np.zeros((md.mesh.numberofvertices))
+	md.initialization.vy=-400.*np.ones((md.mesh.numberofvertices))
 
 	#Stabilization
@@ -37,11 +37,11 @@
 
 	#spc thickness
-	pos=numpy.nonzero(md.mesh.y>199999.9)[0]
-	times=numpy.arange(0,501)
-	md.masstransport.spcthickness=float('NaN')*numpy.ones((md.mesh.numberofvertices+1,numpy.size(times)))
+	pos=np.where(md.mesh.y>199999.9)[0]
+	times=np.arange(0,501)
+	md.masstransport.spcthickness=float('NaN')*np.ones((md.mesh.numberofvertices+1,np.size(times)))
 	md.masstransport.spcthickness[-1,:]=times
-	md.masstransport.spcthickness[pos,:]=numpy.tile(500.+100.*numpy.sin(2.*numpy.pi*times/200.),(numpy.size(pos),1))
+	md.masstransport.spcthickness[pos,:]=500.+100.*np.sin(2.*np.pi*times/200.)
 	if stabilization==3:
-		pos=numpy.nonzero(numpy.isnan(md.masstransport.spcthickness))
+		pos=np.nonzero(np.isnan(md.masstransport.spcthickness))
 		md.masstransport.spcthickness[pos]=500.    #No NaN for DG
 
@@ -54,8 +54,8 @@
 
 #plot results
-#[elements,x,y,z,s,h1]=SectionValues(md,results[0],'../Exp/CrossLineEISMINT.exp',100.);
-#[elements,x,y,z,s,h2]=SectionValues(md,results[1],'../Exp/CrossLineEISMINT.exp',100.);
-#[elements,x,y,z,s,h3]=SectionValues(md,results[2],'../Exp/CrossLineEISMINT.exp',100.);
-#[elements,x,y,z,s,hth]=SectionValues(md, 500+100*sin(2*pi/200*(500-md.mesh.y/400)),'../Exp/CrossLineEISMINT.exp',100.);
+#[elements,x,y,z,s,h1]=SectionValues(md,results[0],'../Exp/CrossLineEISMINT.exp',100.)
+#[elements,x,y,z,s,h2]=SectionValues(md,results[1],'../Exp/CrossLineEISMINT.exp',100.)
+#[elements,x,y,z,s,h3]=SectionValues(md,results[2],'../Exp/CrossLineEISMINT.exp',100.)
+#[elements,x,y,z,s,hth]=SectionValues(md, 500+100*sin(2*pi/200*(500-md.mesh.y/400)),'../Exp/CrossLineEISMINT.exp',100.)
 #plot(s,h1,'r',s,h2,'b',s,h3,'g',s,hth,'k')
 #legend('Art. diff.','No Art. diff.','D.G.','Theoretical')
@@ -63,16 +63,8 @@
 	pass
 #	set(gcf,'Color','w')
-#	export_fig([issmdir() '/website/doc_pdf/validation/Images/EISMINT/IceShelf/eismintmasscthickness.pdf']);
+#	export_fig([issmdir() '/website/doc_pdf/validation/Images/EISMINT/IceShelf/eismintmasscthickness.pdf'])
 
 #Fields and tolerances to track changes
-field_names     =[ \
-	'ThicknessArtDiff','ThicknessNoArtDiff','ThicknessDG' \
-]
-field_tolerances=[\
-	1e-13, 1e-13, 1e-13\
-]
-field_values=[
-	results[0], \
-	results[1], \
-	results[2], \
-]
+field_names     =['ThicknessArtDiff','ThicknessNoArtDiff','ThicknessDG']
+field_tolerances=[1e-13, 1e-13, 1e-13]
+field_values=[results[0],results[1],results[2]]
Index: /issm/trunk-jpl/test/NightlyRun/test1202.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test1202.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test1202.py	(revision 21408)
@@ -1,5 +1,6 @@
 #Test Name: EISMINTStress1
-import numpy
+import numpy as np
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -7,5 +8,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 """
@@ -23,5 +24,5 @@
 
 #Compute solution for SSA's model 
-md.cluster=generic('name',oshostname(),'np',8)
+md.cluster=generic('name',gethostname(),'np',8)
 md=solve(md,'Stressbalance')
 
@@ -35,6 +36,6 @@
 	pass
 #	set(gcf,'Color','w')
-#	printmodel('eismintdiag1vx','png','margin','on','marginsize',25,'frame','off','resolution',2,'hardcopy','off');
-#	system(['mv eismintdiag1vx.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceShelf ']);
+#	printmodel('eismintdiag1vx','png','margin','on','marginsize',25,'frame','off','resolution',2,'hardcopy','off')
+#	system(['mv eismintdiag1vx.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceShelf '])
 
 #plotmodel(md,'data',vy,'contourlevels',{-100,-200,-300,-400,-500,-600,-700,-800,-900,-1000},...
@@ -43,12 +44,9 @@
 	pass
 #	set(gcf,'Color','w')
-#	printmodel('eismintdiag1vy','png','margin','on','marginsize',25,'frame','off','resolution',2,'hardcopy','off');
-#	system(['mv eismintdiag1vy.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceShelf ']);
+#	printmodel('eismintdiag1vy','png','margin','on','marginsize',25,'frame','off','resolution',2,'hardcopy','off')
+#	system(['mv eismintdiag1vy.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceShelf '])
 
 #Fields and tolerances to track changes
 field_names     =['Vx','Vy']
 field_tolerances=[1e-13,1e-13]
-field_values=[\
-	vx, \
-	vy, \
-	]
+field_values=[vx,vy]
Index: /issm/trunk-jpl/test/NightlyRun/test1203.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test1203.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test1203.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: EISMINTStress2
-import numpy
+import numpy as np
 import sys
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -8,5 +9,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 """
@@ -24,9 +25,11 @@
 
 #Impose a non zero velocity on the upper boundary condition (y=max(y))
-pos=numpy.nonzero(md.mesh.y==numpy.max(md.mesh.y))
-md.stressbalance.spcvy[pos]=400.*(((md.mesh.x[pos].reshape(-1,1)-100000.)/25000.)**2-numpy.ones((numpy.size(pos),1)))*heaviside((1.+sys.float_info.epsilon)*numpy.ones((numpy.size(pos),1))-((md.mesh.x[pos].reshape(-1,1)-100000.)/25000.)**2)
+pos=np.where(md.mesh.y==np.max(md.mesh.y))
+heavyside=np.where(np.logical_and(md.mesh.y==np.max(md.mesh.y),((1.+sys.float_info.epsilon)*np.ones((np.size(md.mesh.y)))-((md.mesh.x-100000.)/25000.)**2)>0))
+md.stressbalance.spcvy[pos]=np.zeros((np.size(pos)))
+md.stressbalance.spcvy[heavyside]=400.*(((md.mesh.x[heavyside]-100000.)/25000.)**2-np.ones((np.size(heavyside))))
 
 #Compute solution for SSA's model 
-md.cluster=generic('name',oshostname(),'np',8)
+md.cluster=generic('name',gethostname(),'np',8)
 md=solve(md,'Stressbalance')
 
@@ -40,6 +43,6 @@
 	pass
 #	set(gcf,'Color','w')
-#	printmodel('eismintdiag2vx','png','margin','on','marginsize',25,'frame','off','resolution',2,'hardcopy','off');
-#	system(['mv eismintdiag2vx.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceShelf ']);
+#	printmodel('eismintdiag2vx','png','margin','on','marginsize',25,'frame','off','resolution',2,'hardcopy','off')
+#	system(['mv eismintdiag2vx.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceShelf '])
 #plotmodel(md,'data',vy,'contourlevels',{-100,-200,-300,-400,-500,-600,-700,-800,-900,-1000},...
 #	'contourcolor','k')
@@ -47,12 +50,9 @@
 	pass
 #	set(gcf,'Color','w')
-#	printmodel('eismintdiag2vy','png','margin','on','marginsize',25,'frame','off','resolution',2,'hardcopy','off');
-#	system(['mv eismintdiag2vy.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceShelf ']);
+#	printmodel('eismintdiag2vy','png','margin','on','marginsize',25,'frame','off','resolution',2,'hardcopy','off')
+#	system(['mv eismintdiag2vy.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceShelf '])
 
 #Fields and tolerances to track changes
 field_names     =['Vx','Vy']
 field_tolerances=[1e-13,1e-13]
-field_values=[\
-	vx, \
-	vy, \
-	]
+field_values=[vx,vy]
Index: /issm/trunk-jpl/test/NightlyRun/test1204.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test1204.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test1204.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: EISMINTTran2
-import numpy
+import numpy as np
 import sys
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -8,5 +9,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 """
@@ -24,9 +25,11 @@
 
 #Impose a non zero velocity on the upper boundary condition (y=max(y))
-pos=numpy.nonzero(md.mesh.y==max(md.mesh.y))
-md.stressbalance.spcvy[pos]=400.*(((md.mesh.x[pos].reshape(-1,1)-100000.)/25000.)**2-numpy.ones((numpy.size(pos),1)))*heaviside((1.+sys.float_info.epsilon)*numpy.ones((numpy.size(pos),1))-((md.mesh.x[pos].reshape(-1,1)-100000.)/25000.)**2)
+pos=np.where(md.mesh.y==np.max(md.mesh.y))
+heavyside=np.where(np.logical_and(md.mesh.y==np.max(md.mesh.y),((1.+sys.float_info.epsilon)*np.ones((np.size(md.mesh.y)))-((md.mesh.x-100000.)/25000.)**2)>0))
+md.stressbalance.spcvy[pos]=np.zeros((np.size(pos)))
+md.stressbalance.spcvy[heavyside]=400.*(((md.mesh.x[heavyside]-100000.)/25000.)**2-np.ones((np.size(heavyside))))
 
 #Compute solution for SSA's model 
-md.cluster=generic('name',oshostname(),'np',8)
+md.cluster=generic('name',gethostname(),'np',8)
 md=solve(md,'Stressbalance')
 
@@ -44,6 +47,6 @@
 	pass
 #	set(gcf,'Color','w')
-#	printmodel('eisminttrans2vx','png','margin','on','marginsize',25,'frame','off','resolution',2,'hardcopy','off');
-#	system(['mv eisminttrans2vx.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceShelf ']);
+#	printmodel('eisminttrans2vx','png','margin','on','marginsize',25,'frame','off','resolution',2,'hardcopy','off')
+#	system(['mv eisminttrans2vx.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceShelf '])
 
 #plotmodel(md,'data',(md.results.TransientSolution(end).Vy))
@@ -51,6 +54,6 @@
 	pass
 #	set(gcf,'Color','w')
-#	printmodel('eisminttrans2vy','png','margin','on','marginsize',25,'frame','off','resolution',2,'hardcopy','off');
-#	system(['mv eisminttrans2vy.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceShelf ']);
+#	printmodel('eisminttrans2vy','png','margin','on','marginsize',25,'frame','off','resolution',2,'hardcopy','off')
+#	system(['mv eisminttrans2vy.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceShelf '])
 
 #plotmodel(md,'data',(md.results.TransientSolution(end).Thickness))
@@ -58,13 +61,11 @@
 	pass
 #	set(gcf,'Color','w')
-#	printmodel('eisminttrans2thickness','png','margin','on','marginsize',25,'frame','off','resolution',2,'hardcopy','off');
-#	system(['mv eisminttrans2thickness.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceShelf ']);
+#	printmodel('eisminttrans2thickness','png','margin','on','marginsize',25,'frame','off','resolution',2,'hardcopy','off')
+#	system(['mv eisminttrans2thickness.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceShelf '])
 
 #Fields and tolerances to track changes
 field_names     =['Vx','Vy','Thickness']
 field_tolerances=[1e-13,1e-13,1e-13]
-field_values=[\
-	md.results.TransientSolution[-1].Vx, \
-	md.results.TransientSolution[-1].Vy, \
-	md.results.TransientSolution[-1].Thickness, \
-	]
+field_values=[md.results.TransientSolution[-1].Vx,
+							md.results.TransientSolution[-1].Vy,
+							md.results.TransientSolution[-1].Thickness]
Index: /issm/trunk-jpl/test/NightlyRun/test1205.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test1205.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test1205.py	(revision 21408)
@@ -1,5 +1,6 @@
 #Test Name: EISMINTRoundIceSheetStaticSIA
-import numpy
+import numpy as np
 from model import *
+from socket import gethostname
 from roundmesh import *
 from setmask import *
@@ -7,5 +8,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 """
@@ -28,12 +29,12 @@
 vx_obs=constant/2.*md.mesh.x*(md.geometry.thickness)**-1
 vy_obs=constant/2.*md.mesh.y*(md.geometry.thickness)**-1
-vel_obs=numpy.sqrt((md.inversion.vx_obs)**2+(md.inversion.vy_obs)**2)
+vel_obs=np.sqrt((md.inversion.vx_obs)**2+(md.inversion.vy_obs)**2)
 
 #We extrude the model to have a 3d model
-md.extrude(numlayers,1.);
+md.extrude(numlayers,1.)
 md=setflowequation(md,'SIA','all')
 
 #Spc the nodes on the bed
-pos=numpy.nonzero(md.mesh.vertexonbase)
+pos=np.where(md.mesh.vertexonbase)
 md.stressbalance.spcvx[pos]=0.
 md.stressbalance.spcvy[pos]=0.
@@ -41,5 +42,5 @@
 
 #Now we can solve the problem 
-md.cluster=generic('name',oshostname(),'np',8)
+md.cluster=generic('name',gethostname(),'np',8)
 md=solve(md,'Stressbalance')
 
@@ -47,13 +48,11 @@
 vx=md.results.StressbalanceSolution.Vx
 vy=md.results.StressbalanceSolution.Vy
-vel=numpy.zeros((md.mesh.numberofvertices2d,1))
+vel=np.zeros((md.mesh.numberofvertices2d))
 
 for i in xrange(0,md.mesh.numberofvertices2d):
 	node_vel=0.
 	for j in xrange(0,md.mesh.numberoflayers-1):
-		node_vel=node_vel+1./(2.*(md.mesh.numberoflayers-1))*\
-			(numpy.sqrt(vx[i+(j+1)*md.mesh.numberofvertices2d,0]**2+vy[i+(j+1)*md.mesh.numberofvertices2d,0]**2)+\
-			numpy.sqrt(vx[i+j*md.mesh.numberofvertices2d,0]**2+vy[i+j*md.mesh.numberofvertices2d,0]**2))
-	vel[i,0]=node_vel
+		node_vel=node_vel+1./(2.*(md.mesh.numberoflayers-1))*(np.sqrt(vx[i+(j+1)*md.mesh.numberofvertices2d,0]**2+vy[i+(j+1)*md.mesh.numberofvertices2d,0]**2)+np.sqrt(vx[i+j*md.mesh.numberofvertices2d,0]**2+vy[i+j*md.mesh.numberofvertices2d,0]**2))
+	vel[i]=node_vel
 
 #Plot of the velocity from the exact and calculated solutions
@@ -62,48 +61,42 @@
 #subplot(2,2,1)
 #p=patch('Faces',md.mesh.elements2d,'Vertices',[md.mesh.x2d md.mesh.y2d],'FaceVertexCData',...
-#vel,'FaceColor','interp','EdgeColor','none');
+#vel,'FaceColor','interp','EdgeColor','none')
 #title('Modelled velocity','FontSize',14,'FontWeight','bold')
-#colorbar; 
-#caxis([0 200]);
+#colorbar 
+#caxis([0 200])
    
 #subplot(2,2,2)
 #p=patch('Faces',md.mesh.elements2d,'Vertices',[md.mesh.x2d md.mesh.y2d],'FaceVertexCData',...
-#vel_obs,'FaceColor','interp','EdgeColor','none');
+#vel_obs,'FaceColor','interp','EdgeColor','none')
 #title('Analytical velocity','FontSize',14,'FontWeight','bold')
-#colorbar; 
-#caxis([0 200]);
+#colorbar 
+#caxis([0 200])
 
 #subplot(2,2,3)
-#hold on;
-#plot(sqrt((md.mesh.x(1:md.mesh.numberofvertices2d)).^2+(md.mesh.y(1:md.mesh.numberofvertices2d)).^2),vel,'r.');
-#plot(sqrt((md.mesh.x2d).^2+(md.mesh.y2d).^2),vel_obs,'b.');
-#title('Analytical vs calculated velocity','FontSize',14,'FontWeight','bold');
-#xlabel('distance to the center of the icesheet [m]','FontSize',14,'FontWeight','bold');
-#ylabel('velocity [m/yr]','FontSize',14,'FontWeight','bold');
-#legend('calculated velocity','exact velocity');
-#axis([0 750000 0 200]);
-#hold off;
+#hold on
+#plot(sqrt((md.mesh.x(1:md.mesh.numberofvertices2d)).^2+(md.mesh.y(1:md.mesh.numberofvertices2d)).^2),vel,'r.')
+#plot(sqrt((md.mesh.x2d).^2+(md.mesh.y2d).^2),vel_obs,'b.')
+#title('Analytical vs calculated velocity','FontSize',14,'FontWeight','bold')
+#xlabel('distance to the center of the icesheet [m]','FontSize',14,'FontWeight','bold')
+#ylabel('velocity [m/yr]','FontSize',14,'FontWeight','bold')
+#legend('calculated velocity','exact velocity')
+#axis([0 750000 0 200])
+#hold off
 
 #subplot(2,2,4)
 #p=patch('Faces',md.mesh.elements2d,'Vertices',[md.mesh.x2d md.mesh.y2d],'FaceVertexCData',...
-#abs(vel-vel_obs)./vel_obs*100,'FaceColor','interp','EdgeColor','none');
+#abs(vel-vel_obs)./vel_obs*100,'FaceColor','interp','EdgeColor','none')
 #title('Relative misfit [%]','FontSize',14,'FontWeight','bold')
-#colorbar;
-#caxis([0 100]);
+#colorbar
+#caxis([0 100])
 
 if printingflag:
 	pass
 #	set(gcf,'Color','w')
-#	printmodel('SIAstatic','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off');
-#	system(['mv SIAstatic.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceSheet']);
+#	printmodel('SIAstatic','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off')
+#	system(['mv SIAstatic.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceSheet'])
 
 #Fields and tolerances to track changes
-field_names     =[ \
-	'Vx','Vy','Vel', \
-]
-field_tolerances=[ \
-	1e-13,1e-13,1e-13, \
-]
-field_values=[ \
-	vx,vy,vel, \
-]
+field_names     =['Vx','Vy','Vel']
+field_tolerances=[1e-13,1e-13,1e-13]
+field_values=[vx,vy,vel]
Index: /issm/trunk-jpl/test/NightlyRun/test1206.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test1206.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test1206.py	(revision 21408)
@@ -1,5 +1,6 @@
 #Test Name: EISMINTRoundIceSheetStaticHO
-import numpy
+import numpy as np
 from model import *
+from socket import gethostname
 from roundmesh import *
 from setmask import *
@@ -7,5 +8,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 """
@@ -26,7 +27,7 @@
 #Calculation of the analytical 2d velocity field
 constant=0.3
-vx_obs=constant/2.*md.mesh.x.reshape(-1,1)*(md.geometry.thickness)**-1
-vy_obs=constant/2.*md.mesh.y.reshape(-1,1)*(md.geometry.thickness)**-1
-vel_obs=numpy.sqrt((md.inversion.vx_obs)**2+(md.inversion.vy_obs)**2)
+vx_obs=constant/2.*md.mesh.x*(md.geometry.thickness)**-1
+vy_obs=constant/2.*md.mesh.y*(md.geometry.thickness)**-1
+vel_obs=np.sqrt((md.inversion.vx_obs)**2+(md.inversion.vy_obs)**2)
 
 #We extrude the model to have a 3d model
@@ -35,5 +36,5 @@
 
 #Spc the nodes on the bed
-pos=numpy.nonzero(md.mesh.vertexonbase)
+pos=np.where(md.mesh.vertexonbase)
 md.stressbalance.spcvx[pos]=0.
 md.stressbalance.spcvy[pos]=0.
@@ -41,5 +42,5 @@
 
 #Now we can solve the problem 
-md.cluster=generic('name',oshostname(),'np',8)
+md.cluster=generic('name',gethostname(),'np',8)
 md=solve(md,'Stressbalance')
 
@@ -47,5 +48,5 @@
 vx=md.results.StressbalanceSolution.Vx
 vy=md.results.StressbalanceSolution.Vy
-vel=numpy.zeros((md.mesh.numberofvertices2d,1))
+vel=np.zeros((md.mesh.numberofvertices2d))
 
 for i in xrange(0,md.mesh.numberofvertices2d):
@@ -53,7 +54,7 @@
 	for j in xrange(0,md.mesh.numberoflayers-1):
 		node_vel=node_vel+1./(2.*(md.mesh.numberoflayers-1))*\
-			(numpy.sqrt(vx[i+(j+1)*md.mesh.numberofvertices2d,0]**2+vy[i+(j+1)*md.mesh.numberofvertices2d,0]**2)+\
-			numpy.sqrt(vx[i+j*md.mesh.numberofvertices2d,0]**2+vy[i+j*md.mesh.numberofvertices2d,0]**2))
-	vel[i,0]=node_vel
+			(np.sqrt(vx[i+(j+1)*md.mesh.numberofvertices2d,0]**2+vy[i+(j+1)*md.mesh.numberofvertices2d,0]**2)+\
+			np.sqrt(vx[i+j*md.mesh.numberofvertices2d,0]**2+vy[i+j*md.mesh.numberofvertices2d,0]**2))
+	vel[i]=node_vel
 
 #Plot of the velocity from the exact and calculated solutions
@@ -61,48 +62,42 @@
 #subplot(2,2,1)
 #p=patch('Faces',md.mesh.elements2d,'Vertices',[md.mesh.x2d md.mesh.y2d],'FaceVertexCData',...
-#vel,'FaceColor','interp','EdgeColor','none');
+#vel,'FaceColor','interp','EdgeColor','none')
 #title('Modelled velocity','FontSize',14,'FontWeight','bold')
-#colorbar; 
-#caxis([0 200]);
+#colorbar 
+#caxis([0 200])
    
 #subplot(2,2,2)
 #p=patch('Faces',md.mesh.elements2d,'Vertices',[md.mesh.x2d md.mesh.y2d],'FaceVertexCData',...
-#vel_obs,'FaceColor','interp','EdgeColor','none');
+#vel_obs,'FaceColor','interp','EdgeColor','none')
 #title('Analytical velocity','FontSize',14,'FontWeight','bold')
-#colorbar; 
-#caxis([0 200]);
+#colorbar 
+#caxis([0 200])
 
 #subplot(2,2,3)
-#hold on;
-#plot(sqrt((md.mesh.x(1:md.mesh.numberofvertices2d)).^2+(md.mesh.y(1:md.mesh.numberofvertices2d)).^2),vel,'r.');
-#plot(sqrt((md.mesh.x2d).^2+(md.mesh.y2d).^2),vel_obs,'b.');
-#title('Analytical vs calculated velocity','FontSize',14,'FontWeight','bold');
-#xlabel('distance to the center of the icesheet [m]','FontSize',14,'FontWeight','bold');
-#ylabel('velocity [m/yr]','FontSize',14,'FontWeight','bold');
-#legend('calculated velocity','exact velocity');
-#axis([0 750000 0 200]);
-#hold off;
+#hold on
+#plot(sqrt((md.mesh.x(1:md.mesh.numberofvertices2d)).^2+(md.mesh.y(1:md.mesh.numberofvertices2d)).^2),vel,'r.')
+#plot(sqrt((md.mesh.x2d).^2+(md.mesh.y2d).^2),vel_obs,'b.')
+#title('Analytical vs calculated velocity','FontSize',14,'FontWeight','bold')
+#xlabel('distance to the center of the icesheet [m]','FontSize',14,'FontWeight','bold')
+#ylabel('velocity [m/yr]','FontSize',14,'FontWeight','bold')
+#legend('calculated velocity','exact velocity')
+#axis([0 750000 0 200])
+#hold off
 
 #subplot(2,2,4)
 #p=patch('Faces',md.mesh.elements2d,'Vertices',[md.mesh.x2d md.mesh.y2d],'FaceVertexCData',...
-#abs(vel-vel_obs)./vel_obs*100,'FaceColor','interp','EdgeColor','none');
+#abs(vel-vel_obs)./vel_obs*100,'FaceColor','interp','EdgeColor','none')
 #title('Relative misfit [%]','FontSize',14,'FontWeight','bold')
-#colorbar;
-#caxis([0 100]);
+#colorbar
+#caxis([0 100])
 
 if printingflag:
 	pass
 #	set(gcf,'Color','w')
-#	printmodel('HOstatic','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off');
-#	system(['mv HOstatic.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceSheet']);
+#	printmodel('HOstatic','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off')
+#	system(['mv HOstatic.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceSheet'])
 
 #Fields and tolerances to track changes
-field_names     =[ \
-	'Vx','Vy','Vel', \
-]
-field_tolerances=[ \
-	1e-12,1e-12,1e-12, \
-]
-field_values=[ \
-	vx,vy,vel, \
-]
+field_names     =['Vx','Vy','Vel']
+field_tolerances=[1e-12,1e-12,1e-12]
+field_values=[vx,vy,vel]
Index: /issm/trunk-jpl/test/NightlyRun/test1207.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test1207.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test1207.py	(revision 21408)
@@ -1,5 +1,6 @@
 #Test Name: EISMINTRoundIceSheetStaticFS
-import numpy
+import numpy as np
 from model import *
+from socket import gethostname
 from roundmesh import *
 from setmask import *
@@ -7,5 +8,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 """
@@ -26,7 +27,7 @@
 #Calculation of the analytical 2d velocity field
 constant=0.3
-vx_obs=constant/2.*md.mesh.x.reshape(-1,1)*(md.geometry.thickness)**-1
-vy_obs=constant/2.*md.mesh.y.reshape(-1,1)*(md.geometry.thickness)**-1
-vel_obs=numpy.sqrt((md.inversion.vx_obs)**2+(md.inversion.vy_obs)**2)
+vx_obs=constant/2.*md.mesh.x*(md.geometry.thickness)**-1
+vy_obs=constant/2.*md.mesh.y*(md.geometry.thickness)**-1
+vel_obs=np.sqrt((md.inversion.vx_obs)**2+(md.inversion.vy_obs)**2)
 
 #We extrude the model to have a 3d model
@@ -35,5 +36,5 @@
 
 #Spc the nodes on the bed
-pos=numpy.nonzero(md.mesh.vertexonbase)
+pos=np.where(md.mesh.vertexonbase)
 md.stressbalance.spcvx[pos]=0.
 md.stressbalance.spcvy[pos]=0.
@@ -41,5 +42,5 @@
 
 #Now we can solve the problem 
-md.cluster=generic('name',oshostname(),'np',8)
+md.cluster=generic('name',gethostname(),'np',8)
 md=solve(md,'Stressbalance')
 
@@ -47,5 +48,5 @@
 vx=md.results.StressbalanceSolution.Vx
 vy=md.results.StressbalanceSolution.Vy
-vel=numpy.zeros((md.mesh.numberofvertices2d,1))
+vel=np.zeros((md.mesh.numberofvertices2d))
 
 for i in xrange(0,md.mesh.numberofvertices2d):
@@ -53,7 +54,7 @@
 	for j in xrange(0,md.mesh.numberoflayers-1):
 		node_vel=node_vel+1./(2.*(md.mesh.numberoflayers-1))*\
-			(numpy.sqrt(vx[i+(j+1)*md.mesh.numberofvertices2d,0]**2+vy[i+(j+1)*md.mesh.numberofvertices2d,0]**2)+\
-			numpy.sqrt(vx[i+j*md.mesh.numberofvertices2d,0]**2+vy[i+j*md.mesh.numberofvertices2d,0]**2))
-	vel[i,0]=node_vel
+			(np.sqrt(vx[i+(j+1)*md.mesh.numberofvertices2d,0]**2+vy[i+(j+1)*md.mesh.numberofvertices2d,0]**2)+\
+			np.sqrt(vx[i+j*md.mesh.numberofvertices2d,0]**2+vy[i+j*md.mesh.numberofvertices2d,0]**2))
+	vel[i]=node_vel
 
 #Plot of the velocity from the exact and calculated solutions
@@ -61,48 +62,42 @@
 #subplot(2,2,1)
 #p=patch('Faces',md.mesh.elements2d,'Vertices',[md.mesh.x2d md.mesh.y2d],'FaceVertexCData',...
-#vel,'FaceColor','interp','EdgeColor','none');
+#vel,'FaceColor','interp','EdgeColor','none')
 #title('Modelled velocity','FontSize',14,'FontWeight','bold')
-#colorbar; 
-#caxis([0 200]);
+#colorbar 
+#caxis([0 200])
    
 #subplot(2,2,2)
 #p=patch('Faces',md.mesh.elements2d,'Vertices',[md.mesh.x2d md.mesh.y2d],'FaceVertexCData',...
-#vel_obs,'FaceColor','interp','EdgeColor','none');
+#vel_obs,'FaceColor','interp','EdgeColor','none')
 #title('Analytical velocity','FontSize',14,'FontWeight','bold')
-#colorbar; 
-#caxis([0 200]);
+#colorbar 
+#caxis([0 200])
 
 #subplot(2,2,3)
-#hold on;
-#plot(sqrt((md.mesh.x(1:md.mesh.numberofvertices2d)).^2+(md.mesh.y(1:md.mesh.numberofvertices2d)).^2),vel,'r.');
-#plot(sqrt((md.mesh.x2d).^2+(md.mesh.y2d).^2),vel_obs,'b.');
-#title('Analytical vs calculated velocity','FontSize',14,'FontWeight','bold');
-#xlabel('distance to the center of the icesheet [m]','FontSize',14,'FontWeight','bold');
-#ylabel('velocity [m/yr]','FontSize',14,'FontWeight','bold');
-#legend('calculated velocity','exact velocity');
-#axis([0 750000 0 200]);
-#hold off;
+#hold on
+#plot(sqrt((md.mesh.x(1:md.mesh.numberofvertices2d)).^2+(md.mesh.y(1:md.mesh.numberofvertices2d)).^2),vel,'r.')
+#plot(sqrt((md.mesh.x2d).^2+(md.mesh.y2d).^2),vel_obs,'b.')
+#title('Analytical vs calculated velocity','FontSize',14,'FontWeight','bold')
+#xlabel('distance to the center of the icesheet [m]','FontSize',14,'FontWeight','bold')
+#ylabel('velocity [m/yr]','FontSize',14,'FontWeight','bold')
+#legend('calculated velocity','exact velocity')
+#axis([0 750000 0 200])
+#hold off
 
 #subplot(2,2,4)
 #p=patch('Faces',md.mesh.elements2d,'Vertices',[md.mesh.x2d md.mesh.y2d],'FaceVertexCData',...
-#abs(vel-vel_obs)./vel_obs*100,'FaceColor','interp','EdgeColor','none');
+#abs(vel-vel_obs)./vel_obs*100,'FaceColor','interp','EdgeColor','none')
 #title('Relative misfit [%]','FontSize',14,'FontWeight','bold')
-#colorbar;
-#caxis([0 100]);
+#colorbar
+#caxis([0 100])
 
 if printingflag:
 	pass
 #	set(gcf,'Color','w')
-#	printmodel('FSstatic','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off');
-#	system(['mv FSstatic.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceSheet']);
+#	printmodel('FSstatic','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off')
+#	system(['mv FSstatic.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceSheet'])
 
 #Fields and tolerances to track changes
-field_names     =[ \
-	'Vx','Vy','Vel', \
-]
-field_tolerances=[ \
-	1e-12,1e-12,1e-12, \
-]
-field_values=[ \
-	vx,vy,vel, \
-]
+field_names     =['Vx','Vy','Vel']
+field_tolerances=[1e-12,1e-12,1e-12]
+field_values=[vx,vy,vel]
Index: /issm/trunk-jpl/test/NightlyRun/test1208.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test1208.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test1208.py	(revision 21408)
@@ -1,5 +1,6 @@
 #Test Name: EISMINTA
-import numpy
+import numpy as np
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -7,5 +8,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 """
@@ -26,5 +27,5 @@
 
 #Spc the nodes on the bed
-pos=numpy.nonzero(md.mesh.vertexonbase)
+pos=np.where(md.mesh.vertexonbase)
 md.stressbalance.spcvx[pos]=0.
 md.stressbalance.spcvy[pos]=0.
@@ -39,5 +40,5 @@
 
 #Now we can solve the problem 
-md.cluster=generic('name',oshostname(),'np',8)
+md.cluster=generic('name',gethostname(),'np',8)
 md=solve(md,'Transient')
 
@@ -45,14 +46,12 @@
 field_names     =['Vx','Vy','Vz','Vel','Pressure','Thickness','Base','Surface','Temperature','BasalforcingsGroundediceMeltingRate']
 field_tolerances=[1e-08,1e-08,1e-07,1e-08,1e-08,1e-08,1e-08,1e-08,1e-07,1e-07]
-field_values=[\
-	md.results.TransientSolution[-1].Vx,\
-	md.results.TransientSolution[-1].Vy,\
-	md.results.TransientSolution[-1].Vz,\
-	md.results.TransientSolution[-1].Vel,\
-	md.results.TransientSolution[-1].Pressure,\
-	md.results.TransientSolution[-1].Thickness,\
-	md.results.TransientSolution[-1].Base,\
-	md.results.TransientSolution[-1].Surface,\
-	md.results.TransientSolution[-1].Temperature,\
-	md.results.TransientSolution[-1].BasalforcingsGroundediceMeltingRate,\
-	]
+field_values=[md.results.TransientSolution[-1].Vx,
+							md.results.TransientSolution[-1].Vy,
+							md.results.TransientSolution[-1].Vz,
+							md.results.TransientSolution[-1].Vel,
+							md.results.TransientSolution[-1].Pressure,
+							md.results.TransientSolution[-1].Thickness,
+							md.results.TransientSolution[-1].Base,
+							md.results.TransientSolution[-1].Surface,
+							md.results.TransientSolution[-1].Temperature,
+							md.results.TransientSolution[-1].BasalforcingsGroundediceMeltingRate]
Index: /issm/trunk-jpl/test/NightlyRun/test121.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test121.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test121.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfConstrainedEnthalpyTran
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',180000)
@@ -13,7 +14,7 @@
 md.extrude(3,1.)
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3);
-md.initialization.waterfraction=numpy.zeros((md.mesh.numberofvertices,1))
-md.initialization.watercolumn=numpy.zeros((md.mesh.numberofvertices,1))
+md.cluster=generic('name',gethostname(),'np',3)
+md.initialization.waterfraction=np.zeros((md.mesh.numberofvertices))
+md.initialization.watercolumn=np.zeros((md.mesh.numberofvertices))
 md.transient.isstressbalance=False
 md.transient.ismasstransport=False
Index: /issm/trunk-jpl/test/NightlyRun/test122.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test122.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test122.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfConstrainedTransHOEnth
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',200000)
@@ -13,10 +14,10 @@
 md.extrude(3,1.)
 md=setflowequation(md,'HO','all')
-md.initialization.waterfraction=numpy.zeros((md.mesh.numberofvertices,1))
-md.initialization.watercolumn=numpy.zeros((md.mesh.numberofvertices,1))
+md.initialization.waterfraction=np.zeros((md.mesh.numberofvertices))
+md.initialization.watercolumn=np.zeros((md.mesh.numberofvertices))
 md.thermal.isenthalpy=1
 md.thermal.isdynamicbasalspc=1
 md.thermal.stabilization=2
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Transient')
 
Index: /issm/trunk-jpl/test/NightlyRun/test125.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test125.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test125.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfConstrainedRestartTranSSA2d
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 from massfluxatgate import massfluxatgate
 from generic import generic
@@ -15,8 +16,8 @@
 md=parameterize(md,'../Par/SquareShelfConstrained.py')
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',1)
+md.cluster=generic('name',gethostname(),'np',1)
 md.transient.requested_outputs=['IceVolume','TotalSmb']
 
-md.verbose=verbose('solution',1);
+md.verbose=verbose('solution',1)
 md.settings.recording_frequency=5
 
@@ -29,5 +30,5 @@
 
 #Fields and tolerances to track changes
-field_names     =['Vx1','Vy1','Vel1','TotalSmb1','Bed1','Surface1','Thickness1','Volume1','Vx2','Vy2','Vel2','TotalSmb2','Bed2','Surface2','Thickness2','Volume2','Vx3','Vy3','Vel3','TotalSmb3','Bed3','Surface3','Thickness3','Volume3'];
+field_names     =['Vx1','Vy1','Vel1','TotalSmb1','Bed1','Surface1','Thickness1','Volume1','Vx2','Vy2','Vel2','TotalSmb2','Bed2','Surface2','Thickness2','Volume2','Vx3','Vy3','Vel3','TotalSmb3','Bed3','Surface3','Thickness3','Volume3']
 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
 		1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
Index: /issm/trunk-jpl/test/NightlyRun/test126.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test126.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test126.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfConstrainedRestartTranHO3d
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 from massfluxatgate import massfluxatgate
 from generic import generic
@@ -14,10 +15,10 @@
 md=setmask(md,'all','')
 md=parameterize(md,'../Par/SquareShelfConstrained.py')
-md.cluster=generic('name',oshostname(),'np',1)
+md.cluster=generic('name',gethostname(),'np',1)
 md.transient.requested_outputs=['IceVolume','TotalSmb']
 md.extrude(3,1.)
 md=setflowequation(md,'HO','all')
 
-md.verbose=verbose('solution',1);
+md.verbose=verbose('solution',1)
 md.settings.recording_frequency=5
 
@@ -30,5 +31,5 @@
 
 #Fields and tolerances to track changes
-field_names     =['Vx1','Vy1','Vel1','TotalSmb1','Bed1','Surface1','Thickness1','Volume1','Temperature1','Pressure1','Vx2','Vy2','Vel2','TotalSmb2','Bed2','Surface2','Thickness2','Volume2','Temperature2','Pressure2','Vx3','Vy3','Vel3','TotalSmb3','Bed3','Surface3','Thickness3','Volume3','Temperature3','Pressure3'];
+field_names     =['Vx1','Vy1','Vel1','TotalSmb1','Bed1','Surface1','Thickness1','Volume1','Temperature1','Pressure1','Vx2','Vy2','Vel2','TotalSmb2','Bed2','Surface2','Thickness2','Volume2','Temperature2','Pressure2','Vx3','Vy3','Vel3','TotalSmb3','Bed3','Surface3','Thickness3','Volume3','Temperature3','Pressure3']
 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
 		1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
Index: /issm/trunk-jpl/test/NightlyRun/test1301.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test1301.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test1301.py	(revision 21408)
@@ -1,5 +1,6 @@
 #Test Name: ThermalMelting
-import numpy
+import numpy as np
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -8,5 +9,5 @@
 from paterson import *
 from solve import *
-from MatlabFuncs import *
+
 
 """
@@ -27,7 +28,7 @@
 
 #Some conditions specific to melting test
-md.initialization.pressure=numpy.zeros((md.mesh.numberofvertices,1),int)
-md.initialization.temperature=273.15*numpy.ones((md.mesh.numberofvertices,1))
-pos=numpy.nonzero(md.mesh.vertexonsurface)[0]
+md.initialization.pressure=np.zeros((md.mesh.numberofvertices,1),int)
+md.initialization.temperature=273.15*np.ones((md.mesh.numberofvertices))
+pos=np.nonzero(md.mesh.vertexonsurface)[0]
 md.thermal.spctemperature[pos]=md.initialization.temperature[pos]
 md.materials.rheology_B=paterson(md.initialization.temperature)
@@ -39,11 +40,11 @@
 
 #modeled results
-md.cluster=generic('name',oshostname(),'np',2)
+md.cluster=generic('name',gethostname(),'np',2)
 md=solve(md,'Thermal')
 
 #plot results
 comp_melting=md.results.ThermalSolution.BasalforcingsGroundediceMeltingRate
-relative=numpy.abs((comp_melting-melting)/melting)*100.
-relative[numpy.nonzero(comp_melting==melting)[0]]=0.
+relative=np.abs((comp_melting-melting)/melting)*100.
+relative[np.nonzero(comp_melting==melting)[0]]=0.
 #plotmodel(md,'data',comp_melting,'title','Modeled melting','data',melting,'title','Analytical melting',...
 #	'data',comp_melting-melting,'title','Absolute error','data',relative,'title','Relative error [%]',...
@@ -52,6 +53,6 @@
 	pass
 #	set(gcf,'Color','w')
-#	printmodel('thermalmelting','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off');
-#	system(['mv thermalmelting.png ' ISSM_DIR '/website/doc_pdf/validation/Images/Thermal ']);
+#	printmodel('thermalmelting','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off')
+#	system(['mv thermalmelting.png ' ISSM_DIR '/website/doc_pdf/validation/Images/Thermal '])
 
 #Fields and tolerances to track changes
Index: /issm/trunk-jpl/test/NightlyRun/test1302.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test1302.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test1302.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: ThermalAdvection
-import numpy
+import numpy as np
 import sys
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -8,5 +9,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 """
@@ -26,11 +27,11 @@
 
 #Thermal boundary conditions
-pos1=numpy.nonzero(md.mesh.elementonbase)[0]
+pos1=np.where(np.isnan(md.mesh.lowerelements))[0]
 md.thermal.spctemperature[md.mesh.elements[pos1,0:3]-1]=10.
-pos2=numpy.nonzero(md.mesh.elementonsurface)[0]
+pos2=np.where(np.isnan(md.mesh.upperelements))[0]
 md.thermal.spctemperature[md.mesh.elements[pos2,3:6]-1]=0.
-md.initialization.vz=0.1*numpy.ones((md.mesh.numberofvertices,1))
-md.initialization.vel=numpy.sqrt( md.initialization.vx**2+ md.initialization.vy**2+ md.initialization.vz**2)
-md.initialization.pressure=numpy.zeros((md.mesh.numberofvertices,1),int)
+md.initialization.vz=0.1*np.ones((md.mesh.numberofvertices))
+md.initialization.vel=np.sqrt(md.initialization.vx**2+ md.initialization.vy**2+ md.initialization.vz**2)
+md.initialization.pressure=np.zeros((md.mesh.numberofvertices),int)
 
 md.thermal.stabilization=2
@@ -38,16 +39,16 @@
 #d2T/dz2-w*rho_ice*c/k*dT/dz=0   T(surface)=0  T(bed)=10   => T=A exp(alpha z)+B
 alpha=0.1/md.constants.yts*md.materials.rho_ice*md.materials.heatcapacity/md.materials.thermalconductivity    #alpha=w rho_ice c /k  and w=0.1m/an
-A=10./(numpy.exp(alpha*(-1000.))-1.)    #A=T(bed)/(exp(alpha*bed)-1)  with bed=-1000 T(bed)=10
+A=10./(np.exp(alpha*(-1000.))-1.)    #A=T(bed)/(exp(alpha*bed)-1)  with bed=-1000 T(bed)=10
 B=-A
-md.initialization.temperature=A*numpy.exp(alpha*md.mesh.z)+B
+md.initialization.temperature=A*np.exp(alpha*md.mesh.z)+B
 
 #modeled results
-md.cluster=generic('name',oshostname(),'np',2)
+md.cluster=generic('name',gethostname(),'np',2)
 md=solve(md,'Thermal')
 
 #plot results
 comp_temp=md.results.ThermalSolution.Temperature
-relative=numpy.abs((comp_temp-md.initialization.temperature)/md.initialization.temperature)*100.
-relative[numpy.nonzero(comp_temp==md.initialization.temperature)[0]]=0.
+relative=np.abs((comp_temp-md.initialization.temperature)/md.initialization.temperature)*100.
+relative[np.nonzero(comp_temp==md.initialization.temperature)[0]]=0.
 #plotmodel(md,'data',comp_temp,'title','Modeled temperature [K]','data',md.initialization.temperature,'view',3,...
 #	'title','Analytical temperature [K]','view',3,'data',comp_temp-md.initialization.temperature,...
@@ -57,6 +58,6 @@
 	pass
 #	set(gcf,'Color','w')
-#	printmodel('thermaladvection','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off');
-#	system(['mv thermaladvection.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT ']);
+#	printmodel('thermaladvection','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off')
+#	system(['mv thermaladvection.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT '])
 
 #Fields and tolerances to track changes
Index: /issm/trunk-jpl/test/NightlyRun/test1303.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test1303.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test1303.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: ThermalConduction
-import numpy
+import numpy as np
 import sys
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -8,5 +9,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 """
@@ -26,9 +27,10 @@
 md=setflowequation(md,'HO','all')
 
-pos1=numpy.nonzero(md.mesh.elementonbase)[0]
+
+pos1=np.where(np.isnan(md.mesh.lowerelements))[0]
 md.thermal.spctemperature[md.mesh.elements[pos1,0:3]-1]=10.
-pos2=numpy.nonzero(md.mesh.elementonsurface)[0]
+pos2=np.where(np.isnan(md.mesh.upperelements))[0]
 md.thermal.spctemperature[md.mesh.elements[pos2,3:6]-1]=0.
-md.initialization.pressure=numpy.zeros((md.mesh.numberofvertices,1),int)
+md.initialization.pressure=np.zeros((md.mesh.numberofvertices),int)
 
 #analytical results
@@ -38,11 +40,11 @@
 
 #modeled results
-md.cluster=generic('name',oshostname(),'np',2)
+md.cluster=generic('name',gethostname(),'np',2)
 md=solve(md,'Thermal')
 
 #plot results
 comp_temp=md.results.ThermalSolution.Temperature
-relative=numpy.abs((comp_temp-md.initialization.temperature)/md.initialization.temperature)*100.
-relative[numpy.nonzero(comp_temp==md.initialization.temperature)[0]]=0.
+relative=np.abs((comp_temp-md.initialization.temperature)/md.initialization.temperature)*100.
+relative[np.nonzero(comp_temp==md.initialization.temperature)[0]]=0.
 #plotmodel(md,'data',comp_temp,'title','Modeled temperature [K]','data',md.initialization.temperature,'view',3,...
 #	'title','Analytical temperature [K]','view',3,'data',comp_temp-md.initialization.temperature,...
@@ -52,6 +54,6 @@
 	pass
 #	set(gcf,'Color','w')
-#	printmodel('thermalconduction','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off');
-#	system(['mv thermalconduction.png ' ISSM_DIR '/website/doc_pdf/validation/Images/Thermal ']);
+#	printmodel('thermalconduction','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off')
+#	system(['mv thermalconduction.png ' ISSM_DIR '/website/doc_pdf/validation/Images/Thermal '])
 
 #Fields and tolerances to track changes
Index: /issm/trunk-jpl/test/NightlyRun/test1304.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test1304.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test1304.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: ThermalGeothermalFlux
-import numpy
+import numpy as np
 import sys
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -8,5 +9,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 """
@@ -26,7 +27,7 @@
 md=setflowequation(md,'HO','all')
 
-pos2=numpy.nonzero(md.mesh.elementonsurface)[0]
+pos2=np.where(np.isnan(md.mesh.upperelements))[0]
 md.thermal.spctemperature[md.mesh.elements[pos2,3:6]-1]=0.
-md.initialization.pressure=numpy.zeros((md.mesh.numberofvertices,1),int)
+md.initialization.pressure=np.zeros((md.mesh.numberofvertices),int)
 md.basalforcings.geothermalflux[:]=0.1    #100mW/m^2
 
@@ -37,11 +38,11 @@
 
 #modeled results
-md.cluster=generic('name',oshostname(),'np',2)
+md.cluster=generic('name',gethostname(),'np',2)
 md=solve(md,'Thermal')
 
 #plot results
 comp_temp=md.results.ThermalSolution.Temperature
-relative=numpy.abs((comp_temp-md.initialization.temperature)/md.initialization.temperature)*100.
-relative[numpy.nonzero(comp_temp==md.initialization.temperature)[0]]=0.
+relative=np.abs((comp_temp-md.initialization.temperature)/md.initialization.temperature)*100.
+relative[np.where(comp_temp==md.initialization.temperature)[0]]=0.
 #plotmodel(md,'data',comp_temp,'title','Modeled temperature [K]','data',md.initialization.temperature,'view',3,...
 #	'title','Analytical temperature','view',3,'data',comp_temp-md.initialization.temperature,...
@@ -51,6 +52,6 @@
 	pass
 #	set(gcf,'Color','w')
-#	printmodel('thermalgeothermalflux','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off');
-#	system(['mv thermalgeothermalflux.png ' ISSM_DIR '/website/doc_pdf/validation/Images/Thermal ']);
+#	printmodel('thermalgeothermalflux','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off')
+#	system(['mv thermalgeothermalflux.png ' ISSM_DIR '/website/doc_pdf/validation/Images/Thermal '])
 
 #Fields and tolerances to track changes
Index: /issm/trunk-jpl/test/NightlyRun/test1501.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test1501.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test1501.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: SquareShelfTranSawTooth2d
-import numpy
+import numpy as np
 import sys
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -8,5 +9,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 printingflag = False
@@ -16,5 +17,5 @@
 md=parameterize(md,'../Par/SquareShelf.py')
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md.transient.isthermal=False
 
@@ -24,5 +25,5 @@
 
 #Solve for thinning rate -> -1 * surface mass balance
-smb= 2.*numpy.ones((md.mesh.numberofvertices,1))
+smb= 2.*np.ones((md.mesh.numberofvertices))
 md.smb.mass_balance= smb
 md.basalforcings.groundedice_melting_rate= smb
@@ -37,12 +38,12 @@
 smb = md.smb.mass_balance
 
-#tooth= [ [ones(400,1)*(smb') - 10.]' [ones(400,1)*(smb')]' ];
-tooth=numpy.hstack((numpy.tile(smb-10.,(1,400)),numpy.tile(smb,(1,400))))
-#smb=[ [ones(399,1)*(smb')]' smb  tooth tooth];
-smb=numpy.hstack((numpy.tile(smb,(1,399)),smb,tooth,tooth))
-
-#md.smb.mass_balance= smb;
-#md.smb.mass_balance(end+1,:)=[1.:2000.];
-md.smb.mass_balance=numpy.vstack((smb,numpy.arange(1,2001)))
+#tooth= [ [ones(400,1)*(smb') - 10.]' [ones(400,1)*(smb')]' ]
+tooth=np.hstack((np.tile(smb-10.,(1,400)),np.tile(smb,(1,400))))
+#smb=[ [ones(399,1)*(smb')]' smb  tooth tooth]
+smb=np.hstack((np.tile(smb,(1,399)),smb,tooth,tooth))
+
+#md.smb.mass_balance= smb
+#md.smb.mass_balance(end+1,:)=[1.:2000.]
+md.smb.mass_balance=np.vstack((smb,np.arange(1,2001)))
 
 md=solve(md,'Transient')
@@ -106,65 +107,65 @@
 
 	"""
-	starttime = 360;
-	endtime = 2000;
-	res = 40;
-	ts = [starttime:res:endtime];
-
-	index = md.mesh.elements;
-	x1=md.mesh.x(index(:,1)); x2=md.mesh.x(index(:,2)); x3=md.mesh.x(index(:,3));
-	y1=md.mesh.y(index(:,1)); y2=md.mesh.y(index(:,2)); y3=md.mesh.y(index(:,3));
-	areas=(0.5*((x2-x1).*(y3-y1)-(y2-y1).*(x3-x1)));
-
-	thickness = [];
-	volume = [];
-	massbal = [];
-	velocity = [];
+	starttime = 360
+	endtime = 2000
+	res = 40
+	ts = [starttime:res:endtime]
+
+	index = md.mesh.elements
+	x1=md.mesh.x(index(:)) x2=md.mesh.x(index(:,2)) x3=md.mesh.x(index(:,3))
+	y1=md.mesh.y(index(:)) y2=md.mesh.y(index(:,2)) y3=md.mesh.y(index(:,3))
+	areas=(0.5*((x2-x1).*(y3-y1)-(y2-y1).*(x3-x1)))
+
+	thickness = []
+	volume = []
+	massbal = []
+	velocity = []
 	for t=starttime:endtime
-		thickness = [thickness (md.results.TransientSolution(t).Thickness)];
-		volume = [volume mean(md.results.TransientSolution(t).Thickness.value,2).*areas];
-		massbal = [massbal (md.results.TransientSolution(t).SmbMassBalance)];
-		velocity = [velocity (md.results.TransientSolution(t).Vel)];
+		thickness = [thickness (md.results.TransientSolution(t).Thickness)]
+		volume = [volume mean(md.results.TransientSolution(t).Thickness.value,2).*areas]
+		massbal = [massbal (md.results.TransientSolution(t).SmbMassBalance)]
+		velocity = [velocity (md.results.TransientSolution(t).Vel)]
 	end
 
 	figure('Position', [0 0 860 932])
 
-	options = plotoptions('data','transient_movie','unit','km');
-	options = options.list{1};
-	options = checkplotoptions(md,options);
+	options = plotoptions('data','transient_movie','unit','km')
+	options = options.list{1}
+	options = checkplotoptions(md,options)
 
 	%loop over the time steps
-	results=md.results.TransientSolution;
-	count = 1;
+	results=md.results.TransientSolution
+	count = 1
 	for i=ts
 
 		subplot(5,9,[28:31 37:40])
 		set(gca,'pos',get(gca,'pos')+[-0.08 -0.08 0.07 0.08])
-		field = 'Thickness';
+		field = 'Thickness'
 
 		%process data
-		[x y z elements is2d isplanet]=processmesh(md,results(i).(field),options);
-		[data datatype]=processdata(md,results(i).(field),options);
-
-		titlestring=[field ' at time ' num2str(results(i).time/md.constants.yts) ' year'];
+		[x y z elements is2d isplanet]=processmesh(md,results(i).(field),options)
+		[data datatype]=processdata(md,results(i).(field),options)
+
+		titlestring=[field ' at time ' num2str(results(i).time/md.constants.yts) ' year']
 		plot_unit(x,y,z,elements,data,is2d,isplanet,datatype,options)
-		options=changefieldvalue(options,'title',titlestring);
-		options=addfielddefault(options,'colorbar',1);
-		options=changefieldvalue(options,'caxis',[0 max(max(thickness))]);
-		applyoptions(md,[],options);
+		options=changefieldvalue(options,'title',titlestring)
+		options=addfielddefault(options,'colorbar',1)
+		options=changefieldvalue(options,'caxis',[0 max(max(thickness))])
+		applyoptions(md,[],options)
 
 		subplot(5,9,[33:36 42:45])
 		set(gca,'pos',get(gca,'pos')+[-0.00 -0.08 0.07 0.08])
-		field = 'Vel';
+		field = 'Vel'
 
 		%process data
-		[x y z elements is2d isplanet]=processmesh(md,results(i).(field),options);
-		[data datatype]=processdata(md,results(i).(field),options);
-
-		titlestring=[field ' at time ' num2str(results(i).time/md.constants.yts) ' year'];
+		[x y z elements is2d isplanet]=processmesh(md,results(i).(field),options)
+		[data datatype]=processdata(md,results(i).(field),options)
+
+		titlestring=[field ' at time ' num2str(results(i).time/md.constants.yts) ' year']
 		plot_unit(x,y,z,elements,data,is2d,isplanet,datatype,options)
-		options=changefieldvalue(options,'title',titlestring);
-		options=addfielddefault(options,'colorbar',1);
-		options=changefieldvalue(options,'caxis',[0 max(max(velocity))]);
-		applyoptions(md,[],options);
+		options=changefieldvalue(options,'title',titlestring)
+		options=addfielddefault(options,'colorbar',1)
+		options=changefieldvalue(options,'caxis',[0 max(max(velocity))])
+		applyoptions(md,[],options)
 
 		subplot(5,4,1:4)
@@ -173,7 +174,7 @@
 		plot(starttime:endtime,mean(massbal),'k','LineWidth', 4)
 		hold on
-		ya = ylim;
+		ya = ylim
 		plot([i i], ya, 'r', 'LineWidth',6)
-		ylim(ya); xlim([starttime endtime]);
+		ylim(ya) xlim([starttime endtime])
 		title('Surface Mass Balance','FontSize',14)
 		ylabel('m/year','FontSize',14)
@@ -184,7 +185,7 @@
 		plot(starttime:endtime,sum(volume)/1000/1000/1000,'LineWidth',4)
 		hold on
-		ya = ylim;
+		ya = ylim
 		plot([i i], ya, 'r', 'LineWidth',6)
-		ylim(ya); xlim([starttime endtime]);
+		ylim(ya) xlim([starttime endtime])
 		title('Ice Volume','FontSize',14)
 		ylabel('km^3','FontSize',14)
@@ -195,27 +196,27 @@
 		plot(starttime:endtime,mean(velocity)/1000, 'LineWidth', 4)
 		hold on
-		ya = ylim;
+		ya = ylim
 		plot([i i], ya, 'r', 'LineWidth',6)
-		ylim(ya); xlim([starttime endtime]);
+		ylim(ya) xlim([starttime endtime])
 		title('Mean Velocity','FontSize', 14)
 		ylabel('km/year','FontSize', 14)
 		xlabel('year','FontSize', 14)
 
-		set(gcf,'Renderer','zbuffer','color','white'); %fixes a bug on Mac OS X (not needed in future Matlab version)
+		set(gcf,'Renderer','zbuffer','color','white') %fixes a bug on Mac OS X (not needed in future Matlab version)
 		if i==starttime,
 			%initialize images and frame
-			frame=getframe(gcf);
-			[images,map]=rgb2ind(frame.cdata,256,'nodither');
-			images(1,1,1,length(ts))=0;
+			frame=getframe(gcf)
+			[images,map]=rgb2ind(frame.cdata,256,'nodither')
+			images(1,1,1,length(ts))=0
 		else
-			frame=getframe(gcf);
-			images(:,:,1,count) = rgb2ind(frame.cdata,map,'nodither');
+			frame=getframe(gcf)
+			images(:,:,1,count) = rgb2ind(frame.cdata,map,'nodither')
 		end
 
-		count = count+1;
+		count = count+1
 
 	end
 
-	filename='transawtooth2d.gif';
+	filename='transawtooth2d.gif'
 	imwrite(images,map,filename,'DelayTime',1.0,'LoopCount',inf)
 	"""
Index: /issm/trunk-jpl/test/NightlyRun/test1502.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test1502.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test1502.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: SquareShelfTranSawTooth3d
-import numpy
+import numpy as np
 import sys
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -8,5 +9,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 printingflag = False
@@ -17,5 +18,5 @@
 md=setflowequation(md,'SSA','all')
 md.extrude(3,1.)
-md.cluster=generic('name',oshostname(),'np',2)
+md.cluster=generic('name',gethostname(),'np',2)
 md.transient.isthermal=False
 
@@ -25,5 +26,5 @@
 
 #Solve for thinning rate -> -1 * surface mass balance
-smb= 2.*numpy.ones((md.mesh.numberofvertices,1))
+smb= 2.*np.ones((md.mesh.numberofvertices))
 md.smb.mass_balance= smb
 md.basalforcings.groundedice_melting_rate= smb
@@ -38,12 +39,12 @@
 smb = md.smb.mass_balance
 
-#tooth= [ [ones(400,1)*(smb') - 10.]' [ones(400,1)*(smb')]' ];
-tooth=numpy.hstack((numpy.tile(smb-10.,(1,400)),numpy.tile(smb,(1,400))))
-#smb=[ [ones(399,1)*(smb')]' smb  tooth tooth];
-smb=numpy.hstack((numpy.tile(smb,(1,399)),smb,tooth,tooth))
-
-#md.smb.mass_balance= smb;
-#md.smb.mass_balance(end+1,:)=[1.:2000.];
-md.smb.mass_balance=numpy.vstack((smb,numpy.arange(1,2001)))
+#tooth= [ [ones(400,1)*(smb') - 10.]' [ones(400,1)*(smb')]' ]
+tooth=np.hstack((np.tile(smb-10.,(1,400)),np.tile(smb,(1,400))))
+#smb=[ [ones(399,1)*(smb')]' smb  tooth tooth]
+smb=np.hstack((np.tile(smb,(1,399)),smb,tooth,tooth))
+
+#md.smb.mass_balance= smb
+#md.smb.mass_balance(end+1,:)=[1.:2000.]
+md.smb.mass_balance=np.vstack((smb,np.arange(1,2001)))
 
 md=solve(md,'Transient')
@@ -112,65 +113,65 @@
 	"""
 
-	starttime = 360;
-	endtime = 2000;
-	res = 40;
-	ts = [starttime:res:endtime];
-
-	index = md.mesh.elements;
-	x1=md.mesh.x(index(:,1)); x2=md.mesh.x(index(:,2)); x3=md.mesh.x(index(:,3));
-	y1=md.mesh.y(index(:,1)); y2=md.mesh.y(index(:,2)); y3=md.mesh.y(index(:,3));
-	areas=(0.5*((x2-x1).*(y3-y1)-(y2-y1).*(x3-x1)));
-
-	thickness = [];
-	volume = [];
-	massbal = [];
-	velocity = [];
+	starttime = 360
+	endtime = 2000
+	res = 40
+	ts = [starttime:res:endtime]
+
+	index = md.mesh.elements
+	x1=md.mesh.x(index(:)) x2=md.mesh.x(index(:,2)) x3=md.mesh.x(index(:,3))
+	y1=md.mesh.y(index(:)) y2=md.mesh.y(index(:,2)) y3=md.mesh.y(index(:,3))
+	areas=(0.5*((x2-x1).*(y3-y1)-(y2-y1).*(x3-x1)))
+
+	thickness = []
+	volume = []
+	massbal = []
+	velocity = []
 	for t=starttime:endtime
-		thickness = [thickness (md.results.TransientSolution(t).Thickness)];
-		volume = [volume mean(md.results.TransientSolution(t).Thickness.value,2).*areas];
-		massbal = [massbal (md.results.TransientSolution(t).SmbMassBalance)];
-		velocity = [velocity (md.results.TransientSolution(t).Vel)];
+		thickness = [thickness (md.results.TransientSolution(t).Thickness)]
+		volume = [volume mean(md.results.TransientSolution(t).Thickness.value,2).*areas]
+		massbal = [massbal (md.results.TransientSolution(t).SmbMassBalance)]
+		velocity = [velocity (md.results.TransientSolution(t).Vel)]
 	end
 
 	figure('Position', [0 0 1060 1060])
 
-	options = plotoptions('data','transient_movie','unit','km');
-	options = options.list{1};
-	options = checkplotoptions(md,options);
+	options = plotoptions('data','transient_movie','unit','km')
+	options = options.list{1}
+	options = checkplotoptions(md,options)
 
 	%loop over the time steps
-	results=md.results.TransientSolution;
-	count = 1;
+	results=md.results.TransientSolution
+	count = 1
 	for i=ts
 
 		subplot(5,9,[28:31 37:40])
 		set(gca,'pos',get(gca,'pos')+[-0.08 -0.08 0.07 0.08])
-		field = 'Thickness';
+		field = 'Thickness'
 
 		%process data
-		[x y z elements is2d isplanet]=processmesh(md,results(i).(field),options);
-		[data datatype]=processdata(md,results(i).(field),options);
-
-		titlestring=[field ' at time ' num2str(results(i).time/md.constants.yts) ' year'];
+		[x y z elements is2d isplanet]=processmesh(md,results(i).(field),options)
+		[data datatype]=processdata(md,results(i).(field),options)
+
+		titlestring=[field ' at time ' num2str(results(i).time/md.constants.yts) ' year']
 		plot_unit(x,y,z,elements,data,is2d,isplanet,datatype,options)
-		options=changefieldvalue(options,'title',titlestring);
-		options=addfielddefault(options,'colorbar',1);
-		options=changefieldvalue(options,'caxis',[0 max(max(thickness))]);
-		applyoptions(md,[],options);
+		options=changefieldvalue(options,'title',titlestring)
+		options=addfielddefault(options,'colorbar',1)
+		options=changefieldvalue(options,'caxis',[0 max(max(thickness))])
+		applyoptions(md,[],options)
 
 		subplot(5,9,[33:36 42:45])
 		set(gca,'pos',get(gca,'pos')+[-0.01 -0.08 0.07 0.08])
-		field = 'Vel';
+		field = 'Vel'
 
 		%process data
-		[x y z elements is2d isplanet]=processmesh(md,results(i).(field),options);
-		[data datatype]=processdata(md,results(i).(field),options);
-
-		titlestring=[field ' at time ' num2str(results(i).time/md.constants.yts) ' year'];
+		[x y z elements is2d isplanet]=processmesh(md,results(i).(field),options)
+		[data datatype]=processdata(md,results(i).(field),options)
+
+		titlestring=[field ' at time ' num2str(results(i).time/md.constants.yts) ' year']
 		plot_unit(x,y,z,elements,data,is2d,isplanet,datatype,options)
-		options=changefieldvalue(options,'title',titlestring);
-		options=addfielddefault(options,'colorbar',1);
-		options=changefieldvalue(options,'caxis',[0 max(max(velocity))]);
-		applyoptions(md,[],options);
+		options=changefieldvalue(options,'title',titlestring)
+		options=addfielddefault(options,'colorbar',1)
+		options=changefieldvalue(options,'caxis',[0 max(max(velocity))])
+		applyoptions(md,[],options)
 
 		subplot(5,4,1:4)
@@ -179,7 +180,7 @@
 		plot(starttime:endtime,mean(massbal),'k','LineWidth', 4)
 		hold on
-		ya = ylim;
+		ya = ylim
 		plot([i i], ya, 'r', 'LineWidth',6)
-		ylim(ya); xlim([starttime endtime]);
+		ylim(ya) xlim([starttime endtime])
 		title('Surface Mass Balance','FontSize',14)
 		ylabel('m/year','FontSize',14)
@@ -190,7 +191,7 @@
 		plot(starttime:endtime,sum(volume)/1000/1000/1000,'LineWidth',4)
 		hold on
-		ya = ylim;
+		ya = ylim
 		plot([i i], ya, 'r', 'LineWidth',6)
-		ylim(ya); xlim([starttime endtime]);
+		ylim(ya) xlim([starttime endtime])
 		title('Ice Volume','FontSize',14)
 		ylabel('km^3','FontSize',14)
@@ -201,27 +202,27 @@
 		plot(starttime:endtime,mean(velocity)/1000, 'LineWidth', 4)
 		hold on
-		ya = ylim;
+		ya = ylim
 		plot([i i], ya, 'r', 'LineWidth',6)
-		ylim(ya); xlim([starttime endtime]);
+		ylim(ya) xlim([starttime endtime])
 		title('Mean Velocity','FontSize', 14)
 		ylabel('km/year','FontSize', 14)
 		xlabel('year','FontSize', 14)
 
-		set(gcf,'Renderer','zbuffer','color','white'); %fixes a bug on Mac OS X (not needed in future Matlab version)
+		set(gcf,'Renderer','zbuffer','color','white') %fixes a bug on Mac OS X (not needed in future Matlab version)
 		if i==starttime,
 			%initialize images and frame
-			frame=getframe(gcf);
-			[images,map]=rgb2ind(frame.cdata,256,'nodither');
-			images(1,1,1,length(ts))=0;
+			frame=getframe(gcf)
+			[images,map]=rgb2ind(frame.cdata,256,'nodither')
+			images(1,1,1,length(ts))=0
 		else
-			frame=getframe(gcf);
-			images(:,:,1,count) = rgb2ind(frame.cdata,map,'nodither');
+			frame=getframe(gcf)
+			images(:,:,1,count) = rgb2ind(frame.cdata,map,'nodither')
 		end
 
-		count = count+1;
+		count = count+1
 
 	end
 
-	filename='transawtooth3d.gif';
+	filename='transawtooth3d.gif'
 	imwrite(images,map,filename,'DelayTime',1.0,'LoopCount',inf)
 	"""
Index: /issm/trunk-jpl/test/NightlyRun/test1601.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test1601.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test1601.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: SquareShelfSSA2dRotation
-import numpy
+import numpy as np
 import sys
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -8,5 +9,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',150000.)
@@ -14,37 +15,37 @@
 md=parameterize(md,'../Par/SquareShelf.py')
 md=setflowequation(md,'SSA','all')
-md.stressbalance.spcvx[numpy.nonzero(md.mesh.y>0.)]=float('NaN')
+md.stressbalance.spcvx[np.nonzero(md.mesh.y>0.)]=float('NaN')
 md.initialization.vx[:]=0.
 md.initialization.vy[:]=0.
-md.initialization.vel=numpy.zeros_like(md.initialization.vx)
+md.initialization.vel=np.zeros_like(md.initialization.vx)
 
-md.cluster=generic('name',oshostname(),'np',2)
+md.cluster=generic('name',gethostname(),'np',2)
 md=solve(md,'Stressbalance')
 vel0=md.results.StressbalanceSolution.Vel
 
-theta=30.*numpy.pi/180.
+theta=30.*np.pi/180.
 x=md.mesh.x
 y=md.mesh.y
-md.mesh.x=numpy.cos(theta)*x-numpy.sin(theta)*y
-md.mesh.y=numpy.sin(theta)*x+numpy.cos(theta)*y
+md.mesh.x=np.cos(theta)*x-np.sin(theta)*y
+md.mesh.y=np.sin(theta)*x+np.cos(theta)*y
 
-md.stressbalance.referential[:,0:3]=numpy.tile([numpy.cos(theta),numpy.sin(theta),0],(md.mesh.numberofvertices,1))
-md.stressbalance.referential[:,3: ]=numpy.tile([0,0,1],(md.mesh.numberofvertices,1))
+md.stressbalance.referential[:,0:3]=np.tile([np.cos(theta),np.sin(theta),0],(md.mesh.numberofvertices))
+md.stressbalance.referential[:,3: ]=np.tile([0,0,1],(md.mesh.numberofvertices))
 md=solve(md,'Stressbalance')
 vel1=md.results.StressbalanceSolution.Vel
 
 #plotmodel(md,'data',vel0,'data',vel1,'data',vel1-vel0,'title','Cartesian CS','title','Rotated CS','title','difference')
-print "Error between Cartesian and rotated CS: %g" % (numpy.max(numpy.abs(vel0-vel1))/(numpy.max(numpy.abs(vel0))+sys.float_info.epsilon))
+print "Error between Cartesian and rotated CS: %g" % (np.max(np.abs(vel0-vel1))/(np.max(np.abs(vel0))+sys.float_info.epsilon))
 
 #Now, put CS back to normal except on the side where the spc are applied
-pos=numpy.nonzero(numpy.logical_or(x==0.,x==1000000.))[0]
+pos=np.nonzero(np.logical_or.reduce(x==0.,x==1000000.))[0]
 md.stressbalance.referential[:]=float('NaN')
-md.stressbalance.referential[pos,0:3]=numpy.tile([numpy.cos(theta),numpy.sin(theta),0],(len(pos),1))
-md.stressbalance.referential[pos,3: ]=numpy.tile([0,0,1],(len(pos),1))
+md.stressbalance.referential[pos,0:3]=np.tile([np.cos(theta),np.sin(theta),0],(len(pos)))
+md.stressbalance.referential[pos,3: ]=np.tile([0,0,1],(len(pos)))
 md=solve(md,'Stressbalance')
 vel2=md.results.StressbalanceSolution.Vel
 
 #plotmodel(md,'data',vel0,'data',vel2,'data',vel2-vel0,'title','Cartesian CS','title','Rotated CS','title','difference')
-print "Error between Cartesian and rotated CS: %g" % (numpy.max(numpy.abs(vel0-vel2))/(numpy.max(numpy.abs(vel0))+sys.float_info.epsilon))
+print "Error between Cartesian and rotated CS: %g" % (np.max(np.abs(vel0-vel2))/(np.max(np.abs(vel0))+sys.float_info.epsilon))
 
 #Fields and tolerances to track changes
Index: /issm/trunk-jpl/test/NightlyRun/test1602.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test1602.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test1602.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: SquareSheetShelfHORotation
-import numpy
+import numpy as np
 import sys
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -8,5 +9,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',150000.)
@@ -15,26 +16,26 @@
 md.extrude(5,1.)
 md=setflowequation(md,'HO','all')
-md.stressbalance.spcvx[numpy.nonzero(md.mesh.y>0.)]=float('NaN')
+md.stressbalance.spcvx[np.nonzero(md.mesh.y>0.)]=float('NaN')
 md.initialization.vx[:]=0.
 md.initialization.vy[:]=0.
-md.initialization.vel=numpy.zeros_like(md.initialization.vx)
+md.initialization.vel=np.zeros_like(md.initialization.vx)
 
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Stressbalance')
 vel0=md.results.StressbalanceSolution.Vel
 
-theta=30.*numpy.pi/180.
+theta=30.*np.pi/180.
 x=md.mesh.x
 y=md.mesh.y
-md.mesh.x=numpy.cos(theta)*x-numpy.sin(theta)*y
-md.mesh.y=numpy.sin(theta)*x+numpy.cos(theta)*y
+md.mesh.x=np.cos(theta)*x-np.sin(theta)*y
+md.mesh.y=np.sin(theta)*x+np.cos(theta)*y
 
-md.stressbalance.referential[:,0:3]=numpy.tile([numpy.cos(theta),numpy.sin(theta),0],(md.mesh.numberofvertices,1))
-md.stressbalance.referential[:,3: ]=numpy.tile([0,0,1],(md.mesh.numberofvertices,1))
+md.stressbalance.referential[:,0:3]=np.tile([np.cos(theta),np.sin(theta),0],(md.mesh.numberofvertices))
+md.stressbalance.referential[:,3: ]=np.tile([0,0,1],(md.mesh.numberofvertices))
 md=solve(md,'Stressbalance')
 vel1=md.results.StressbalanceSolution.Vel
 
 #plotmodel(md,'data',vel0,'data',vel1,'data',vel1-vel0,'title','Cartesian CS','title','Rotated CS','title','difference','view#all',2)
-print "Error between Cartesian and rotated CS: %g" % (numpy.max(numpy.abs(vel0-vel1))/(numpy.max(numpy.abs(vel0))+sys.float_info.epsilon))
+print "Error between Cartesian and rotated CS: %g" % (np.max(np.abs(vel0-vel1))/(np.max(np.abs(vel0))+sys.float_info.epsilon))
 
 #Fields and tolerances to track changes
@@ -43,3 +44,3 @@
 field_values=[\
 	vel1, \
-	];
+	]
Index: /issm/trunk-jpl/test/NightlyRun/test2001.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test2001.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test2001.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: SquareSheetConstrainedGia2d
-import numpy
+import numpy as np
 import copy
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -8,5 +9,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 #Define a model 
@@ -22,14 +23,12 @@
 md.timestepping.start_time=2400000 # 2,400 kyr
 md.timestepping.final_time=2500000 # 2,500 kyr
-md.geometry.thickness=numpy.hstack((\
-		numpy.vstack((md.geometry.thickness*0.0, 0.0)),\
-		numpy.vstack((md.geometry.thickness/2.0, 0.1)),\
-		numpy.vstack((md.geometry.thickness, 0.2)),\
-		numpy.vstack((md.geometry.thickness, 1.0)),\
-		numpy.vstack((md.geometry.thickness, md.timestepping.start_time)),\
-		))
+md.geometry.thickness=np.vstack((np.hstack((md.geometry.thickness*0.0, 0.0)),
+																 np.hstack((md.geometry.thickness/2.0, 0.1)),
+																 np.hstack((md.geometry.thickness, 0.2)),
+																 np.hstack((md.geometry.thickness, 1.0)),
+																 np.hstack((md.geometry.thickness, md.timestepping.start_time)))).T
 
 #Solve for GIA deflection 
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Gia')
 
@@ -37,7 +36,5 @@
 field_names     =['GiaW','GiadWdt']
 field_tolerances=[1e-13,1e-13]
-field_values    =[\
-		md.results.GiaSolution.GiaW,\
-		md.results.GiaSolution.GiadWdt,\
-		]
+field_values    =[md.results.GiaSolution.GiaW,
+									md.results.GiaSolution.GiadWdt]
 
Index: /issm/trunk-jpl/test/NightlyRun/test2002.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test2002.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test2002.py	(revision 21408)
@@ -1,7 +1,6 @@
 #Test Name: EarthSlr
-from MatlabFuncs import *
-from PythonFuncs import *
 from model import *
-from numpy import *
+from socket import gethostname
+import numpy as np
 from parameterize import *
 from solve import *
@@ -12,62 +11,62 @@
 from love_numbers import *
 
-#mesh earth: 
-md=model() 
+#mesh earth:
+md=model()
 md.mesh=gmshplanet('radius',6.371012*10**3,'resolution',700.) #500 km resolution mesh
 
 #parameterize slr solution:
-#slr loading:  {{{
-md.slr.deltathickness=zeros((md.mesh.numberofelements,1))
-md.slr.sealevel=zeros((md.mesh.numberofvertices,1))
+#slr loading:
+md.slr.deltathickness=np.zeros((md.mesh.numberofelements))
+md.slr.sealevel=np.zeros((md.mesh.numberofvertices))
 #antarctica
-late=numpy.sum(md.mesh.lat[md.mesh.elements-1],axis=1)/3
-longe=numpy.sum(md.mesh.long[md.mesh.elements-1],axis=1)/3
-pos=numpy.nonzero(late <-80)
+late=np.sum(md.mesh.lat[md.mesh.elements-1],axis=1)/3
+longe=np.sum(md.mesh.long[md.mesh.elements-1],axis=1)/3
+pos=np.where(late <-80)
 md.slr.deltathickness[pos]=-100
 #greenland 
-pos=numpy.nonzero(logical_and_n(late > 70,late < 80,longe>-60,longe<-30))
+pos=np.where(np.logical_and.reduce((late > 70,late < 80,longe>-60,longe<-30)))
 md.slr.deltathickness[pos]=-100
 
-#elastic loading from love numbers: 
+#elastic loading from love numbers:
 nlov=101
-md.slr.love_h = love_numbers('h')[:nlov];
-md.slr.love_k = love_numbers('k')[:nlov];
-md.slr.love_l = love_numbers('l')[:nlov];
+md.slr.love_h = love_numbers('h')[:nlov]
+md.slr.love_k = love_numbers('k')[:nlov]
+md.slr.love_l = love_numbers('l')[:nlov]
 
-#}}}
-#mask:  {{{
-md.mask=maskpsl() # use maskpsl class (instead of mask) to store the ocean function as a ocean_levelset 
-mask=gmtmask(md.mesh.lat,md.mesh.long) 
+#mask:
+md.mask=maskpsl() # use maskpsl class (instead of mask) to store the ocean function as a ocean_levelset
+mask=gmtmask(md.mesh.lat,md.mesh.long)
 
-icemask=ones((md.mesh.numberofvertices,1))
-pos=nonzero(mask==0)[0];  icemask[pos]=-1
-pos=nonzero(sum(mask[md.mesh.elements.astype(int)-1],axis=1)<3)[0]
+icemask=np.ones((md.mesh.numberofvertices))
+pos=np.where(mask==0)[0]  
+icemask[pos]=-1
+pos=np.where(np.sum(mask[md.mesh.elements.astype(int)-1],axis=1)<3)[0]
 icemask[md.mesh.elements[pos,:].astype(int)-1]=-1
 md.mask.ice_levelset=icemask
 
-md.mask.ocean_levelset=zeros((md.mesh.numberofvertices,1))
-pos=numpy.nonzero(md.mask.ice_levelset==1)
+md.mask.ocean_levelset=np.zeros((md.mesh.numberofvertices))
+pos=np.where(md.mask.ice_levelset==1)
 md.mask.ocean_levelset[pos]=1
 
 #make sure that the ice level set is all inclusive:
-md.mask.land_levelset=zeros((md.mesh.numberofvertices,1))
-md.mask.groundedice_levelset=-ones((md.mesh.numberofvertices,1))
+md.mask.land_levelset=np.zeros((md.mesh.numberofvertices))
+md.mask.groundedice_levelset=-np.ones((md.mesh.numberofvertices))
 
-#make sure wherever there is an ice load, that the mask is set to ice: 
-pos=nonzero(md.slr.deltathickness)[0];
+#make sure wherever there is an ice load, that the mask is set to ice:
+pos=np.nonzero(md.slr.deltathickness)[0]
 icemask[md.mesh.elements[pos,:]-1]=-1
-# }}}
+
 
 #geometry
 di=md.materials.rho_ice/md.materials.rho_water
-md.geometry.thickness=ones((md.mesh.numberofvertices,1))
-md.geometry.surface=(1-di)*zeros((md.mesh.numberofvertices,1))
+md.geometry.thickness=np.ones((md.mesh.numberofvertices))
+md.geometry.surface=(1-di)*np.zeros((md.mesh.numberofvertices))
 md.geometry.base=md.geometry.surface-md.geometry.thickness
 md.geometry.bed=md.geometry.base
 
 #materials
-md.initialization.temperature=273.25*ones((md.mesh.numberofvertices,1))
+md.initialization.temperature=273.25*np.ones((md.mesh.numberofvertices))
 md.materials.rheology_B=paterson(md.initialization.temperature)
-md.materials.rheology_n=3*ones((md.mesh.numberofelements,1))
+md.materials.rheology_n=3*np.ones((md.mesh.numberofelements))
 
 #Miscellaneous
@@ -75,5 +74,5 @@
 
 #Solution parameters
-md.slr.reltol=NaN
+md.slr.reltol=np.nan
 md.slr.abstol=1e-3
 
@@ -82,5 +81,5 @@
 md.slr.elastic=0
 md=solve(md,'Sealevelrise')
-Seustatic=md.results.SealevelriseSolution.Sealevel;
+Seustatic=md.results.SealevelriseSolution.Sealevel
 
 #eustatic + rigid run: 
@@ -88,5 +87,5 @@
 md.slr.elastic=0
 md=solve(md,'Sealevelrise')
-Srigid=md.results.SealevelriseSolution.Sealevel;
+Srigid=md.results.SealevelriseSolution.Sealevel
 
 #eustatic + rigid + elastic run: 
@@ -94,12 +93,12 @@
 md.slr.elastic=1
 md=solve(md,'Sealevelrise')
-Selastic=md.results.SealevelriseSolution.Sealevel;
+Selastic=md.results.SealevelriseSolution.Sealevel
 
 #eustatic + rigid + elastic + rotation run: 
 md.slr.rigid=1
 md.slr.elastic=1
-md.slr.rotation=1;
-md=solve(md,'Sealevelrise');
-Srotation=md.results.SealevelriseSolution.Sealevel;
+md.slr.rotation=1
+md=solve(md,'Sealevelrise')
+Srotation=md.results.SealevelriseSolution.Sealevel
 
 #Fields and tolerances to track changes
Index: /issm/trunk-jpl/test/NightlyRun/test201.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test201.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test201.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfStressSSA2d
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 from ContourToMesh import *
 
@@ -13,5 +14,5 @@
 md=parameterize(md,'../Par/SquareShelf.py')
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Stressbalance')
 
Index: /issm/trunk-jpl/test/NightlyRun/test202.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test202.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test202.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: SquareShelfStressSSA3d
-from MatlabFuncs import *
+
 from model import *
-from numpy import *
+from socket import gethostname
+import numpy as np
 from triangle import *
 from setmask import *
@@ -15,5 +16,5 @@
 md.extrude(3,2.)
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Stressbalance')
 
Index: /issm/trunk-jpl/test/NightlyRun/test203.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test203.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test203.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: SquareShelfStressHO
-from MatlabFuncs import *
+
 from model import *
-from numpy import *
+from socket import gethostname
+import numpy as np
 from triangle import *
 from setmask import *
@@ -15,5 +16,5 @@
 md.extrude(3,2.)
 md=setflowequation(md,'HO','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Stressbalance')
 
Index: /issm/trunk-jpl/test/NightlyRun/test204.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test204.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test204.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: SquareShelfStressFS
-from MatlabFuncs import *
+
 from model import *
-from numpy import *
+from socket import gethostname
+import numpy as np
 from triangle import *
 from setmask import *
@@ -15,9 +16,9 @@
 md.extrude(3,2.)
 md=setflowequation(md,'FS','all')
-md.cluster=generic('name',oshostname(),'np',3)
-md.stressbalance.shelf_dampening=1;
-md.timestepping.time_step=0;
+md.cluster=generic('name',gethostname(),'np',3)
+md.stressbalance.shelf_dampening=1
+md.timestepping.time_step=0
 md1=solve(md,'Stressbalance')
-md.stressbalance.shelf_dampening=0;
+md.stressbalance.shelf_dampening=0
 md=solve(md,'Stressbalance')
 
Index: /issm/trunk-jpl/test/NightlyRun/test205.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test205.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test205.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: SquareShelfStressMHOPenalties
-from MatlabFuncs import *
+
 from model import *
-from numpy import *
+from socket import gethostname
+import numpy as np
 from triangle import *
 from setmask import *
@@ -15,5 +16,5 @@
 md.extrude(3,2.)
 md=setflowequation(md,'HO','../Exp/SquareHalfRight.exp','fill','SSA','coupling','penalties')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Stressbalance')
 
Index: /issm/trunk-jpl/test/NightlyRun/test206.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test206.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test206.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: SquareShelfTherStea
-from MatlabFuncs import *
+
 from model import *
-from numpy import *
+from socket import gethostname
+import numpy as np
 from triangle import *
 from setmask import *
@@ -16,5 +17,5 @@
 md=setflowequation(md,'SSA','all')
 md.timestepping.time_step=0
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Thermal')
 
@@ -24,6 +25,4 @@
 field_names     =['Temperature','BasalforcingsGroundediceMeltingRate']
 field_tolerances=[1e-13,5e-6]
-field_values=[\
-	md.results.ThermalSolution.Temperature,\
-	md.results.ThermalSolution.BasalforcingsGroundediceMeltingRate,\
-	]
+field_values=[md.results.ThermalSolution.Temperature,
+							md.results.ThermalSolution.BasalforcingsGroundediceMeltingRate]
Index: /issm/trunk-jpl/test/NightlyRun/test207.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test207.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test207.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: SquareShelfTherTran
-from MatlabFuncs import *
+
 from model import *
-from numpy import *
+from socket import gethostname
+import numpy as np
 from triangle import *
 from setmask import *
@@ -15,5 +16,5 @@
 md.extrude(3,1.)
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md.transient.isstressbalance=False
 md.transient.ismasstransport=False
Index: /issm/trunk-jpl/test/NightlyRun/test208.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test208.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test208.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: SquareShelfTranSSA2d
-from MatlabFuncs import *
+
 from model import *
-from numpy import *
+from socket import gethostname
+import numpy as np
 from triangle import *
 from setmask import *
@@ -15,5 +16,5 @@
 md.basalforcings.floatingice_melting_rate[:]=1.
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md.transient.requested_outputs=['default','FloatingArea','GroundedArea','TotalFloatingBmb','TotalGroundedBmb']
 md=solve(md,'Transient')
Index: /issm/trunk-jpl/test/NightlyRun/test209.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test209.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test209.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: SquareShelfTranSSA3d
-from MatlabFuncs import *
+
 from model import *
-from numpy import *
+from socket import gethostname
+import numpy as np
 from triangle import *
 from setmask import *
@@ -15,5 +16,5 @@
 md.extrude(3,1.)
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Transient')
 
Index: /issm/trunk-jpl/test/NightlyRun/test210.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test210.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test210.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: SquareShelfTranHO
-from MatlabFuncs import *
+
 from model import *
-from numpy import *
+from socket import gethostname
+import numpy as np
 from triangle import *
 from setmask import *
@@ -15,5 +16,5 @@
 md.extrude(3,1.)
 md=setflowequation(md,'HO','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Transient')
 
Index: /issm/trunk-jpl/test/NightlyRun/test211.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test211.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test211.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: SquareShelfTranFS
-from MatlabFuncs import *
+
 from model import *
-from numpy import *
+from socket import gethostname
+import numpy as np
 from triangle import *
 from setmask import *
@@ -16,5 +17,5 @@
 md=setflowequation(md,'FS','all')
 md.stressbalance.reltol=NaN
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Transient')
 
Index: /issm/trunk-jpl/test/NightlyRun/test212.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test212.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test212.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: SquareShelfCMBSSA2d
-from MatlabFuncs import *
+
 from model import *
-from numpy import *
+from socket import gethostname
+import numpy as np
 from triangle import *
 from setmask import *
@@ -20,17 +21,17 @@
 md.inversion.iscontrol=1
 md.inversion.control_parameters=['MaterialsRheologyBbar']
-md.inversion.min_parameters=10**6*ones((md.mesh.numberofvertices,1))
-md.inversion.max_parameters=2.*10**9*ones((md.mesh.numberofvertices,1))
+md.inversion.min_parameters=10**6*ones((md.mesh.numberofvertices))
+md.inversion.max_parameters=2.*10**9*ones((md.mesh.numberofvertices))
 md.inversion.nsteps=2
 md.inversion.cost_functions=[101]
-md.inversion.cost_functions_coefficients=ones((md.mesh.numberofvertices,1))
-md.inversion.gradient_scaling=10**7*ones((md.inversion.nsteps,1))
-md.inversion.maxiter_per_step=2.*ones((md.inversion.nsteps,1))
-md.inversion.step_threshold=0.3*ones((md.inversion.nsteps,1))
+md.inversion.cost_functions_coefficients=ones((md.mesh.numberofvertices))
+md.inversion.gradient_scaling=10**7*ones((md.inversion.nsteps))
+md.inversion.maxiter_per_step=2.*ones((md.inversion.nsteps))
+md.inversion.step_threshold=0.3*ones((md.inversion.nsteps))
 md.inversion.vx_obs=md.initialization.vx
 md.inversion.vy_obs=md.initialization.vy
 
 
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Stressbalance')
 
Index: /issm/trunk-jpl/test/NightlyRun/test213.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test213.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test213.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: SquareShelfCMBSSA3d
-from MatlabFuncs import *
+
 from model import *
-from numpy import *
+from socket import gethostname
+import numpy as np
 from triangle import *
 from setmask import *
@@ -21,17 +22,17 @@
 md.inversion.iscontrol=1
 md.inversion.control_parameters=['MaterialsRheologyBbar']
-md.inversion.min_parameters=10**6*ones((md.mesh.numberofvertices,1))
-md.inversion.max_parameters=2.*10**9*ones((md.mesh.numberofvertices,1))
+md.inversion.min_parameters=10**6*ones((md.mesh.numberofvertices))
+md.inversion.max_parameters=2.*10**9*ones((md.mesh.numberofvertices))
 md.inversion.nsteps=2
 md.inversion.cost_functions=[101]
-md.inversion.cost_functions_coefficients=ones((md.mesh.numberofvertices,1))
-md.inversion.gradient_scaling=10**7*ones((md.inversion.nsteps,1))
-md.inversion.maxiter_per_step=2.*ones((md.inversion.nsteps,1))
-md.inversion.step_threshold=0.3*ones((md.inversion.nsteps,1))
+md.inversion.cost_functions_coefficients=ones((md.mesh.numberofvertices))
+md.inversion.gradient_scaling=10**7*ones((md.inversion.nsteps))
+md.inversion.maxiter_per_step=2.*ones((md.inversion.nsteps))
+md.inversion.step_threshold=0.3*ones((md.inversion.nsteps))
 md.inversion.vx_obs=md.initialization.vx
 md.inversion.vy_obs=md.initialization.vy
 
 
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Stressbalance')
 
Index: /issm/trunk-jpl/test/NightlyRun/test214.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test214.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test214.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: SquareShelfCMBHO
-from MatlabFuncs import *
+
 from model import *
-from numpy import *
+from socket import gethostname
+import numpy as np
 from triangle import *
 from setmask import *
@@ -21,17 +22,17 @@
 md.inversion.iscontrol=1
 md.inversion.control_parameters=['MaterialsRheologyBbar']
-md.inversion.min_parameters=10**6*ones((md.mesh.numberofvertices,1))
-md.inversion.max_parameters=2.*10**9*ones((md.mesh.numberofvertices,1))
+md.inversion.min_parameters=10**6*ones((md.mesh.numberofvertices))
+md.inversion.max_parameters=2.*10**9*ones((md.mesh.numberofvertices))
 md.inversion.nsteps=2
 md.inversion.cost_functions=[101]
-md.inversion.cost_functions_coefficients=ones((md.mesh.numberofvertices,1))
-md.inversion.gradient_scaling=10**7*ones((md.inversion.nsteps,1))
-md.inversion.maxiter_per_step=2.*ones((md.inversion.nsteps,1))
-md.inversion.step_threshold=0.3*ones((md.inversion.nsteps,1))
+md.inversion.cost_functions_coefficients=ones((md.mesh.numberofvertices))
+md.inversion.gradient_scaling=10**7*ones((md.inversion.nsteps))
+md.inversion.maxiter_per_step=2.*ones((md.inversion.nsteps))
+md.inversion.step_threshold=0.3*ones((md.inversion.nsteps))
 md.inversion.vx_obs=md.initialization.vx
 md.inversion.vy_obs=md.initialization.vy
 
 
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Stressbalance')
 
Index: /issm/trunk-jpl/test/NightlyRun/test215.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test215.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test215.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: SquareShelfCMBFS
-from MatlabFuncs import *
+
 from model import *
-from numpy import *
+from socket import gethostname
+import numpy as np
 from triangle import *
 from setmask import *
@@ -21,17 +22,17 @@
 md.inversion.iscontrol=1
 md.inversion.control_parameters=['MaterialsRheologyBbar']
-md.inversion.min_parameters=10**6*ones((md.mesh.numberofvertices,1))
-md.inversion.max_parameters=2.*10**9*ones((md.mesh.numberofvertices,1))
+md.inversion.min_parameters=10**6*ones((md.mesh.numberofvertices))
+md.inversion.max_parameters=2.*10**9*ones((md.mesh.numberofvertices))
 md.inversion.nsteps=2
 md.inversion.cost_functions=[101]
-md.inversion.cost_functions_coefficients=ones((md.mesh.numberofvertices,1))
-md.inversion.gradient_scaling=10**7*ones((md.inversion.nsteps,1))
-md.inversion.maxiter_per_step=2.*ones((md.inversion.nsteps,1))
-md.inversion.step_threshold=0.3*ones((md.inversion.nsteps,1))
+md.inversion.cost_functions_coefficients=ones((md.mesh.numberofvertices))
+md.inversion.gradient_scaling=10**7*ones((md.inversion.nsteps))
+md.inversion.maxiter_per_step=2.*ones((md.inversion.nsteps))
+md.inversion.step_threshold=0.3*ones((md.inversion.nsteps))
 md.inversion.vx_obs=md.initialization.vx
 md.inversion.vy_obs=md.initialization.vy
 
 
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Stressbalance')
 
Index: /issm/trunk-jpl/test/NightlyRun/test216.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test216.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test216.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: SquareShelfStressSSA2dRift
-from MatlabFuncs import *
+
 from model import *
-from numpy import *
+from socket import gethostname
+import numpy as np
 from triangle import *
 from meshprocessrifts import *
@@ -16,5 +17,5 @@
 md=parameterize(md,'../Par/SquareShelf2.py')
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 
 # rift settings
Index: /issm/trunk-jpl/test/NightlyRun/test217.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test217.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test217.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: SquareShelfConstrained
-from MatlabFuncs import *
+
 from model import *
-from numpy import *
+from socket import gethostname
+import numpy as np
 from triangle import *
 from setmask import *
@@ -15,5 +16,5 @@
 md=parameterize(md,'../Par/SquareShelf.py')
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 
 # redo the parameter file for this special shelf. 
@@ -33,31 +34,31 @@
 
 h=1000.
-md.geometry.thickness=h*ones((md.mesh.numberofvertices,1))
+md.geometry.thickness=h*ones((md.mesh.numberofvertices))
 md.geometry.base=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness
 md.geometry.surface=md.geometry.base+md.geometry.thickness
 
 # Initial velocity and pressure
-md.initialization.vx=zeros((md.mesh.numberofvertices,1))
-md.initialization.vy=zeros((md.mesh.numberofvertices,1))
-md.initialization.vz=zeros((md.mesh.numberofvertices,1))
-md.initialization.pressure=zeros((md.mesh.numberofvertices,1))
+md.initialization.vx=zeros((md.mesh.numberofvertices))
+md.initialization.vy=zeros((md.mesh.numberofvertices))
+md.initialization.vz=zeros((md.mesh.numberofvertices))
+md.initialization.pressure=zeros((md.mesh.numberofvertices))
 
 # Materials
-md.initialization.temperature=(273.-20.)*ones((md.mesh.numberofvertices,1))
+md.initialization.temperature=(273.-20.)*ones((md.mesh.numberofvertices))
 md.materials.rheology_B=paterson(md.initialization.temperature)
-md.materials.rheology_n=3.*ones((md.mesh.numberofelements,1))
+md.materials.rheology_n=3.*ones((md.mesh.numberofelements))
 
 # Boundary conditions:
-md.stressbalance.spcvx=float(nan)*ones((md.mesh.numberofvertices,1))
-md.stressbalance.spcvy=float(nan)*ones((md.mesh.numberofvertices,1))
-md.stressbalance.spcvz=float(nan)*ones((md.mesh.numberofvertices,1))
+md.stressbalance.spcvx=float(nan)*ones((md.mesh.numberofvertices))
+md.stressbalance.spcvy=float(nan)*ones((md.mesh.numberofvertices))
+md.stressbalance.spcvz=float(nan)*ones((md.mesh.numberofvertices))
 
 # constrain flanks to 0 normal velocity
-pos=numpy.nonzero(numpy.logical_or(md.mesh.x==xmin,md.mesh.x==xmax))
+pos=np.nonzero(np.logical_or.reduce(md.mesh.x==xmin,md.mesh.x==xmax))
 md.stressbalance.spcvx[pos]=0
 md.stressbalance.spcvz[pos]=float(nan)
 
 # constrain grounding line to 0 velocity
-pos=numpy.nonzero(md.mesh.y==ymin)
+pos=np.nonzero(md.mesh.y==ymin)
 md.stressbalance.spcvx[pos]=0
 md.stressbalance.spcvy[pos]=0
@@ -65,5 +66,5 @@
 # icefront
 nodeonicefront=zeros(md.mesh.numberofvertices)
-pos=numpy.nonzero(md.mesh.y==ymax)
+pos=np.nonzero(md.mesh.y==ymax)
 nodeonicefront[pos]=1
 md.mask.ice_levelset=-1+nodeonicefront
@@ -72,6 +73,6 @@
 
 # create analytical solution: strain rate is constant = ((rho_ice*g*h)/4B)^3 (Paterson, 4th Edition, page 292.
-# ey_c=(md.materials.rho_ice*md.constants.g*(1-di)*md.geometry.thickness./(4*md.materials.rheology_B)).^3;
-# vy_c=ey_c.*md.mesh.y*md.constants.yts;
+# ey_c=(md.materials.rho_ice*md.constants.g*(1-di)*md.geometry.thickness./(4*md.materials.rheology_B)).^3
+# vy_c=ey_c.*md.mesh.y*md.constants.yts
 
 # Fields and tolerances to track changes
Index: /issm/trunk-jpl/test/NightlyRun/test219.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test219.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test219.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: SquareShelfStressSSAHOTiling
-from MatlabFuncs import *
+
 from model import *
-from numpy import *
+from socket import gethostname
+import numpy as np
 from triangle import *
 from setmask import *
@@ -15,5 +16,5 @@
 md.extrude(3,2.)
 md=setflowequation(md,'HO','../Exp/SquareHalfRight.exp','fill','SSA')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Stressbalance')
 
Index: /issm/trunk-jpl/test/NightlyRun/test220.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test220.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test220.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: SquareShelfStressHOFS3dTiling
-from MatlabFuncs import *
+
 from model import *
-from numpy import *
+from socket import gethostname
+import numpy as np
 from triangle import *
 from setmask import *
@@ -15,5 +16,5 @@
 md.extrude(2,1.)
 md=setflowequation(md,'FS','../Exp/SquareHalfRight.exp','fill','HO')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Stressbalance')
 
Index: /issm/trunk-jpl/test/NightlyRun/test221.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test221.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test221.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfStressSSAFS3dTiling
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',120000.)
@@ -13,5 +14,5 @@
 md.extrude(2,1.)
 md=setflowequation(md,'FS','../Exp/SquareHalfRight.exp','fill','SSA')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md.stressbalance.viscosity_overshoot=0
 md=solve(md,'Stressbalance')
Index: /issm/trunk-jpl/test/NightlyRun/test222.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test222.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test222.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfStressSSA2dTransientIncrHydro
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',150000.)
@@ -12,5 +13,5 @@
 md=parameterize(md,'../Par/SquareShelf.py')
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md.masstransport.hydrostatic_adjustment='Incremental'
 md=solve(md,'Transient')
Index: /issm/trunk-jpl/test/NightlyRun/test223.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test223.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test223.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfStressSSA2dTransientIncrNonHydro
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',150000.)
@@ -14,5 +15,5 @@
 md.geometry.base=md.geometry.base+50.
 md.geometry.surface=md.geometry.surface+50.
-md.cluster=generic('name',oshostname(),'np',1)
+md.cluster=generic('name',gethostname(),'np',1)
 md.masstransport.hydrostatic_adjustment='Incremental'
 md=solve(md,'Transient')
Index: /issm/trunk-jpl/test/NightlyRun/test224.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test224.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test224.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfStressHOTransientIncrHydro
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',200000.)
@@ -13,5 +14,5 @@
 md.extrude(3,1.)
 md=setflowequation(md,'HO','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md.masstransport.hydrostatic_adjustment='Incremental'
 md=solve(md,'Transient')
Index: /issm/trunk-jpl/test/NightlyRun/test225.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test225.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test225.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfStressHOTransientIncrNonHydro
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',200000.)
@@ -15,5 +16,5 @@
 md.extrude(3,1.)
 md=setflowequation(md,'HO','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md.masstransport.hydrostatic_adjustment='Incremental'
 md=solve(md,'Transient')
Index: /issm/trunk-jpl/test/NightlyRun/test226.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test226.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test226.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfTranCflSSA2d
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',150000.)
@@ -12,5 +13,5 @@
 md=parameterize(md,'../Par/SquareShelf.py')
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md.timestepping.time_adapt=1.
 md.timestepping.final_time=15.
Index: /issm/trunk-jpl/test/NightlyRun/test227.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test227.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test227.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfTranCflHO
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',200000.)
@@ -13,5 +14,5 @@
 md.extrude(3,1.)
 md=setflowequation(md,'HO','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md.timestepping.time_adapt=1.
 md.timestepping.final_time=20.
Index: /issm/trunk-jpl/test/NightlyRun/test228.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test228.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test228.py	(revision 21408)
@@ -1,5 +1,6 @@
 #Test Name: SquareShelfTranForceNeg2d
-import numpy
+import numpy as np
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -7,5 +8,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',150000.)
@@ -13,5 +14,5 @@
 md=parameterize(md,'../Par/SquareShelf.py')
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 
 md.timestepping.time_step=1.
@@ -20,8 +21,8 @@
 
 #Set up transient
-smb=numpy.ones((md.mesh.numberofvertices,1))*3.6
-smb=numpy.hstack((smb,smb*-1.))
+smb=np.ones((md.mesh.numberofvertices))*3.6
+smb=np.vstack((smb,smb*-1.)).T
 
-md.smb.mass_balance=numpy.vstack((smb,[1.5,3.]))
+md.smb.mass_balance=np.vstack((smb,[1.5,3.]))
 md.transient.isthermal=False
 
@@ -29,44 +30,42 @@
 
 #Fields and tolerances to track changes
-field_names=['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1', \
-	'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2', \
-	'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3', \
-	'Vx4','Vy4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassBalance4']
-field_tolerances=[1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,\
-	1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,\
-	1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,\
-	1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10]
-field_values=[\
-	md.results.TransientSolution[0].Vx,\
-	md.results.TransientSolution[0].Vy,\
-	md.results.TransientSolution[0].Vel,\
-	md.results.TransientSolution[0].Pressure,\
-	md.results.TransientSolution[0].Base,\
-	md.results.TransientSolution[0].Surface,\
-	md.results.TransientSolution[0].Thickness,\
-	md.results.TransientSolution[0].SmbMassBalance,\
-	md.results.TransientSolution[1].Vx,\
-	md.results.TransientSolution[1].Vy,\
-	md.results.TransientSolution[1].Vel,\
-	md.results.TransientSolution[1].Pressure,\
-	md.results.TransientSolution[1].Base,\
-	md.results.TransientSolution[1].Surface,\
-	md.results.TransientSolution[1].Thickness,\
-	md.results.TransientSolution[1].SmbMassBalance,\
-	md.results.TransientSolution[2].Vx,\
-	md.results.TransientSolution[2].Vy,\
-	md.results.TransientSolution[2].Vel,\
-	md.results.TransientSolution[2].Pressure,\
-	md.results.TransientSolution[2].Base,\
-	md.results.TransientSolution[2].Surface,\
-	md.results.TransientSolution[2].Thickness,\
-	md.results.TransientSolution[2].SmbMassBalance,\
-	md.results.TransientSolution[3].Vx,\
-	md.results.TransientSolution[3].Vy,\
-	md.results.TransientSolution[3].Vel,\
-	md.results.TransientSolution[3].Pressure,\
-	md.results.TransientSolution[3].Base,\
-	md.results.TransientSolution[3].Surface,\
-	md.results.TransientSolution[3].Thickness,\
-	md.results.TransientSolution[3].SmbMassBalance,\
-	]
+field_names=['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1',
+						 'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2',
+						 'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3',
+						 'Vx4','Vy4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassBalance4']
+field_tolerances=[1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,
+									1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,
+									1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,
+									1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10]
+field_values=[md.results.TransientSolution[0].Vx,
+							md.results.TransientSolution[0].Vy,
+							md.results.TransientSolution[0].Vel,
+							md.results.TransientSolution[0].Pressure,
+							md.results.TransientSolution[0].Base,
+							md.results.TransientSolution[0].Surface,
+							md.results.TransientSolution[0].Thickness,
+							md.results.TransientSolution[0].SmbMassBalance,
+							md.results.TransientSolution[1].Vx,
+							md.results.TransientSolution[1].Vy,
+							md.results.TransientSolution[1].Vel,
+							md.results.TransientSolution[1].Pressure,
+							md.results.TransientSolution[1].Base,
+							md.results.TransientSolution[1].Surface,
+							md.results.TransientSolution[1].Thickness,
+							md.results.TransientSolution[1].SmbMassBalance,
+							md.results.TransientSolution[2].Vx,
+							md.results.TransientSolution[2].Vy,
+							md.results.TransientSolution[2].Vel,
+							md.results.TransientSolution[2].Pressure,
+							md.results.TransientSolution[2].Base,
+							md.results.TransientSolution[2].Surface,
+							md.results.TransientSolution[2].Thickness,
+							md.results.TransientSolution[2].SmbMassBalance,
+							md.results.TransientSolution[3].Vx,
+							md.results.TransientSolution[3].Vy,
+							md.results.TransientSolution[3].Vel,
+							md.results.TransientSolution[3].Pressure,
+							md.results.TransientSolution[3].Base,
+							md.results.TransientSolution[3].Surface,
+							md.results.TransientSolution[3].Thickness,
+							md.results.TransientSolution[3].SmbMassBalance]
Index: /issm/trunk-jpl/test/NightlyRun/test229.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test229.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test229.py	(revision 21408)
@@ -1,5 +1,6 @@
 #Test Name: SquareShelfTranForcePos2d
-import numpy
+import numpy as np
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -7,5 +8,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',150000.)
@@ -13,5 +14,5 @@
 md=parameterize(md,'../Par/SquareShelf.py')
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 
 md.timestepping.time_step=1.
@@ -20,8 +21,8 @@
 
 #Set up transient
-smb=numpy.ones((md.mesh.numberofvertices,1))*3.6
-smb=numpy.hstack((smb,smb*2.))
+smb=np.ones((md.mesh.numberofvertices))*3.6
+smb=np.vstack((smb,smb*2.)).T
 
-md.smb.mass_balance=numpy.vstack((smb,[1.5,3.]))
+md.smb.mass_balance=np.vstack((smb,[1.5,3.]))
 md.transient.isthermal=False
 
@@ -29,44 +30,42 @@
 
 #Fields and tolerances to track changes
-field_names=['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1', \
-	'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2', \
-	'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3', \
-	'Vx4','Vy4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassBalance4']
-field_tolerances=[1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,\
-	1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,\
-	1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,\
-	1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10]
-field_values=[\
-	md.results.TransientSolution[0].Vx,\
-	md.results.TransientSolution[0].Vy,\
-	md.results.TransientSolution[0].Vel,\
-	md.results.TransientSolution[0].Pressure,\
-	md.results.TransientSolution[0].Base,\
-	md.results.TransientSolution[0].Surface,\
-	md.results.TransientSolution[0].Thickness,\
-	md.results.TransientSolution[0].SmbMassBalance,\
-	md.results.TransientSolution[1].Vx,\
-	md.results.TransientSolution[1].Vy,\
-	md.results.TransientSolution[1].Vel,\
-	md.results.TransientSolution[1].Pressure,\
-	md.results.TransientSolution[1].Base,\
-	md.results.TransientSolution[1].Surface,\
-	md.results.TransientSolution[1].Thickness,\
-	md.results.TransientSolution[1].SmbMassBalance,\
-	md.results.TransientSolution[2].Vx,\
-	md.results.TransientSolution[2].Vy,\
-	md.results.TransientSolution[2].Vel,\
-	md.results.TransientSolution[2].Pressure,\
-	md.results.TransientSolution[2].Base,\
-	md.results.TransientSolution[2].Surface,\
-	md.results.TransientSolution[2].Thickness,\
-	md.results.TransientSolution[2].SmbMassBalance,\
-	md.results.TransientSolution[3].Vx,\
-	md.results.TransientSolution[3].Vy,\
-	md.results.TransientSolution[3].Vel,\
-	md.results.TransientSolution[3].Pressure,\
-	md.results.TransientSolution[3].Base,\
-	md.results.TransientSolution[3].Surface,\
-	md.results.TransientSolution[3].Thickness,\
-	md.results.TransientSolution[3].SmbMassBalance,\
-	]
+field_names=['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1',
+						 'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2',
+						 'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3',
+						 'Vx4','Vy4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassBalance4']
+field_tolerances=[1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,
+									1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,
+									1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,
+									1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10]
+field_values=[md.results.TransientSolution[0].Vx,
+							md.results.TransientSolution[0].Vy,
+							md.results.TransientSolution[0].Vel,
+							md.results.TransientSolution[0].Pressure,
+							md.results.TransientSolution[0].Base,
+							md.results.TransientSolution[0].Surface,
+							md.results.TransientSolution[0].Thickness,
+							md.results.TransientSolution[0].SmbMassBalance,
+							md.results.TransientSolution[1].Vx,
+							md.results.TransientSolution[1].Vy,
+							md.results.TransientSolution[1].Vel,
+							md.results.TransientSolution[1].Pressure,
+							md.results.TransientSolution[1].Base,
+							md.results.TransientSolution[1].Surface,
+							md.results.TransientSolution[1].Thickness,
+							md.results.TransientSolution[1].SmbMassBalance,
+							md.results.TransientSolution[2].Vx,
+							md.results.TransientSolution[2].Vy,
+							md.results.TransientSolution[2].Vel,
+							md.results.TransientSolution[2].Pressure,
+							md.results.TransientSolution[2].Base,
+							md.results.TransientSolution[2].Surface,
+							md.results.TransientSolution[2].Thickness,
+							md.results.TransientSolution[2].SmbMassBalance,
+							md.results.TransientSolution[3].Vx,
+							md.results.TransientSolution[3].Vy,
+							md.results.TransientSolution[3].Vel,
+							md.results.TransientSolution[3].Pressure,
+							md.results.TransientSolution[3].Base,
+							md.results.TransientSolution[3].Surface,
+							md.results.TransientSolution[3].Thickness,
+							md.results.TransientSolution[3].SmbMassBalance]
Index: /issm/trunk-jpl/test/NightlyRun/test230.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test230.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test230.py	(revision 21408)
@@ -1,5 +1,6 @@
 #Test Name: SquareShelfTranForceNeg3d
-import numpy
+import numpy as np
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -7,5 +8,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',350000.)
@@ -14,5 +15,5 @@
 md.extrude(3,1.)
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 
 md.timestepping.time_step=1.
@@ -21,8 +22,8 @@
 
 #Set up transient
-smb=numpy.ones((md.mesh.numberofvertices,1))*3.6
-smb=numpy.hstack((smb,smb*-1.))
+smb=np.ones((md.mesh.numberofvertices))*3.6
+smb=np.vstack((smb,smb*-1.)).T
 
-md.smb.mass_balance=numpy.vstack((smb,[1.5,3.]))
+md.smb.mass_balance=np.vstack((smb,[1.5,3.]))
 md.transient.isthermal=False
 
@@ -30,48 +31,46 @@
 
 #Fields and tolerances to track changes
-field_names     =['Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1', \
-	'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2', \
-	'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3', \
-	'Vx4','Vy4','Vz4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassbalance4']
-field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
-	1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
-	1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
-	1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]
-field_values=[\
-	md.results.TransientSolution[0].Vx,\
-	md.results.TransientSolution[0].Vy,\
-	md.results.TransientSolution[0].Vz,\
-	md.results.TransientSolution[0].Vel,\
-	md.results.TransientSolution[0].Pressure,\
-	md.results.TransientSolution[0].Base,\
-	md.results.TransientSolution[0].Surface,\
-	md.results.TransientSolution[0].Thickness,\
-	md.results.TransientSolution[0].SmbMassBalance,\
-	md.results.TransientSolution[1].Vx,\
-	md.results.TransientSolution[1].Vy,\
-	md.results.TransientSolution[1].Vz,\
-	md.results.TransientSolution[1].Vel,\
-	md.results.TransientSolution[1].Pressure,\
-	md.results.TransientSolution[1].Base,\
-	md.results.TransientSolution[1].Surface,\
-	md.results.TransientSolution[1].Thickness,\
-	md.results.TransientSolution[1].SmbMassBalance,\
-	md.results.TransientSolution[2].Vx,\
-	md.results.TransientSolution[2].Vy,\
-	md.results.TransientSolution[2].Vz,\
-	md.results.TransientSolution[2].Vel,\
-	md.results.TransientSolution[2].Pressure,\
-	md.results.TransientSolution[2].Base,\
-	md.results.TransientSolution[2].Surface,\
-	md.results.TransientSolution[2].Thickness,\
-	md.results.TransientSolution[2].SmbMassBalance,\
-	md.results.TransientSolution[3].Vx,\
-	md.results.TransientSolution[3].Vy,\
-	md.results.TransientSolution[3].Vz,\
-	md.results.TransientSolution[3].Vel,\
-	md.results.TransientSolution[3].Pressure,\
-	md.results.TransientSolution[3].Base,\
-	md.results.TransientSolution[3].Surface,\
-	md.results.TransientSolution[3].Thickness,\
-	md.results.TransientSolution[3].SmbMassBalance,\
-	]
+field_names     =['Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1',
+									'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2',
+									'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3',
+									'Vx4','Vy4','Vz4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassbalance4']
+field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,
+									1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,
+									1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,
+									1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]
+field_values=[md.results.TransientSolution[0].Vx,
+							md.results.TransientSolution[0].Vy,
+							md.results.TransientSolution[0].Vz,
+							md.results.TransientSolution[0].Vel,
+							md.results.TransientSolution[0].Pressure,
+							md.results.TransientSolution[0].Base,
+							md.results.TransientSolution[0].Surface,
+							md.results.TransientSolution[0].Thickness,
+							md.results.TransientSolution[0].SmbMassBalance,
+							md.results.TransientSolution[1].Vx,
+							md.results.TransientSolution[1].Vy,
+							md.results.TransientSolution[1].Vz,
+							md.results.TransientSolution[1].Vel,
+							md.results.TransientSolution[1].Pressure,
+							md.results.TransientSolution[1].Base,
+							md.results.TransientSolution[1].Surface,
+							md.results.TransientSolution[1].Thickness,
+							md.results.TransientSolution[1].SmbMassBalance,
+							md.results.TransientSolution[2].Vx,
+							md.results.TransientSolution[2].Vy,
+							md.results.TransientSolution[2].Vz,
+							md.results.TransientSolution[2].Vel,
+							md.results.TransientSolution[2].Pressure,
+							md.results.TransientSolution[2].Base,
+							md.results.TransientSolution[2].Surface,
+							md.results.TransientSolution[2].Thickness,
+							md.results.TransientSolution[2].SmbMassBalance,
+							md.results.TransientSolution[3].Vx,
+							md.results.TransientSolution[3].Vy,
+							md.results.TransientSolution[3].Vz,
+							md.results.TransientSolution[3].Vel,
+							md.results.TransientSolution[3].Pressure,
+							md.results.TransientSolution[3].Base,
+							md.results.TransientSolution[3].Surface,
+							md.results.TransientSolution[3].Thickness,
+							md.results.TransientSolution[3].SmbMassBalance]
Index: /issm/trunk-jpl/test/NightlyRun/test231.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test231.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test231.py	(revision 21408)
@@ -1,5 +1,6 @@
 #Test Name: SquareShelfTranForcePos3d
-import numpy
+import numpy as np
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -7,5 +8,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',350000.)
@@ -14,5 +15,5 @@
 md.extrude(3,1.)
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 
 md.timestepping.time_step=1.
@@ -21,8 +22,8 @@
 
 #Set up transient
-smb=numpy.ones((md.mesh.numberofvertices,1))*3.6
-smb=numpy.hstack((smb,smb*2.))
+smb=np.ones((md.mesh.numberofvertices))*3.6
+smb=np.vstack((smb,smb*2.)).T
 
-md.smb.mass_balance=numpy.vstack((smb,[1.5,3.]))
+md.smb.mass_balance=np.vstack((smb,[1.5,3.]))
 md.transient.isthermal=False
 
@@ -30,48 +31,46 @@
 
 #Fields and tolerances to track changes
-field_names     =['Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1', \
-	'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2', \
-	'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3', \
-	'Vx4','Vy4','Vz4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassbalance4']
-field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
-	1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
-	1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
-	1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]
-field_values=[\
-	md.results.TransientSolution[0].Vx,\
-	md.results.TransientSolution[0].Vy,\
-	md.results.TransientSolution[0].Vz,\
-	md.results.TransientSolution[0].Vel,\
-	md.results.TransientSolution[0].Pressure,\
-	md.results.TransientSolution[0].Base,\
-	md.results.TransientSolution[0].Surface,\
-	md.results.TransientSolution[0].Thickness,\
-	md.results.TransientSolution[0].SmbMassBalance,\
-	md.results.TransientSolution[1].Vx,\
-	md.results.TransientSolution[1].Vy,\
-	md.results.TransientSolution[1].Vz,\
-	md.results.TransientSolution[1].Vel,\
-	md.results.TransientSolution[1].Pressure,\
-	md.results.TransientSolution[1].Base,\
-	md.results.TransientSolution[1].Surface,\
-	md.results.TransientSolution[1].Thickness,\
-	md.results.TransientSolution[1].SmbMassBalance,\
-	md.results.TransientSolution[2].Vx,\
-	md.results.TransientSolution[2].Vy,\
-	md.results.TransientSolution[2].Vz,\
-	md.results.TransientSolution[2].Vel,\
-	md.results.TransientSolution[2].Pressure,\
-	md.results.TransientSolution[2].Base,\
-	md.results.TransientSolution[2].Surface,\
-	md.results.TransientSolution[2].Thickness,\
-	md.results.TransientSolution[2].SmbMassBalance,\
-	md.results.TransientSolution[3].Vx,\
-	md.results.TransientSolution[3].Vy,\
-	md.results.TransientSolution[3].Vz,\
-	md.results.TransientSolution[3].Vel,\
-	md.results.TransientSolution[3].Pressure,\
-	md.results.TransientSolution[3].Base,\
-	md.results.TransientSolution[3].Surface,\
-	md.results.TransientSolution[3].Thickness,\
-	md.results.TransientSolution[3].SmbMassBalance,\
-	]
+field_names     =['Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1',
+									'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2',
+									'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3',
+									'Vx4','Vy4','Vz4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassbalance4']
+field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,
+									1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,
+									1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,
+									1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]
+field_values=[md.results.TransientSolution[0].Vx,
+							md.results.TransientSolution[0].Vy,
+							md.results.TransientSolution[0].Vz,
+							md.results.TransientSolution[0].Vel,
+							md.results.TransientSolution[0].Pressure,
+							md.results.TransientSolution[0].Base,
+							md.results.TransientSolution[0].Surface,
+							md.results.TransientSolution[0].Thickness,
+							md.results.TransientSolution[0].SmbMassBalance,
+							md.results.TransientSolution[1].Vx,
+							md.results.TransientSolution[1].Vy,
+							md.results.TransientSolution[1].Vz,
+							md.results.TransientSolution[1].Vel,
+							md.results.TransientSolution[1].Pressure,
+							md.results.TransientSolution[1].Base,
+							md.results.TransientSolution[1].Surface,
+							md.results.TransientSolution[1].Thickness,
+							md.results.TransientSolution[1].SmbMassBalance,
+							md.results.TransientSolution[2].Vx,
+							md.results.TransientSolution[2].Vy,
+							md.results.TransientSolution[2].Vz,
+							md.results.TransientSolution[2].Vel,
+							md.results.TransientSolution[2].Pressure,
+							md.results.TransientSolution[2].Base,
+							md.results.TransientSolution[2].Surface,
+							md.results.TransientSolution[2].Thickness,
+							md.results.TransientSolution[2].SmbMassBalance,
+							md.results.TransientSolution[3].Vx,
+							md.results.TransientSolution[3].Vy,
+							md.results.TransientSolution[3].Vz,
+							md.results.TransientSolution[3].Vel,
+							md.results.TransientSolution[3].Pressure,
+							md.results.TransientSolution[3].Base,
+							md.results.TransientSolution[3].Surface,
+							md.results.TransientSolution[3].Thickness,
+							md.results.TransientSolution[3].SmbMassBalance]
Index: /issm/trunk-jpl/test/NightlyRun/test232.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test232.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test232.py	(revision 21408)
@@ -1,5 +1,6 @@
 #Test Name: SquareShelfTherTranForcTemp
-import numpy
+import numpy as np
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -7,5 +8,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',180000.)
@@ -14,6 +15,6 @@
 md.extrude(3,1.)
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
-md.thermal.spctemperature=numpy.vstack((numpy.vstack((md.thermal.spctemperature, md.thermal.spctemperature+5., md.thermal.spctemperature+10., md.thermal.spctemperature+15.)).T, [1.5,2.5,3.5,4.]))
+md.cluster=generic('name',gethostname(),'np',3)
+md.thermal.spctemperature=np.vstack((np.vstack((md.thermal.spctemperature, md.thermal.spctemperature+5., md.thermal.spctemperature+10., md.thermal.spctemperature+15.)).T, [1.5,2.5,3.5,4.]))
 md.timestepping.time_step=1.
 md.timestepping.final_time=4.
Index: /issm/trunk-jpl/test/NightlyRun/test233.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test233.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test233.py	(revision 21408)
@@ -1,5 +1,6 @@
 #Test Name: SquareShelfTranHOForcTemp
-import numpy
+import numpy as np
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -7,5 +8,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',200000.)
@@ -14,6 +15,6 @@
 md.extrude(3,1.)
 md=setflowequation(md,'HO','all')
-md.cluster=generic('name',oshostname(),'np',3)
-md.thermal.spctemperature=numpy.vstack((numpy.vstack((md.thermal.spctemperature, md.thermal.spctemperature+5.)).T, [1.,2.]))
+md.cluster=generic('name',gethostname(),'np',3)
+md.thermal.spctemperature=np.vstack((np.vstack((md.thermal.spctemperature, md.thermal.spctemperature+5.)).T, [1.,2.]))
 md.timestepping.time_step=0.5
 md.timestepping.final_time=2.
Index: /issm/trunk-jpl/test/NightlyRun/test236.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test236.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test236.py	(revision 21408)
@@ -1,5 +1,6 @@
 #Test Name: SquareShelfTranIspddIsdeltaSSA2d
-import numpy
+import numpy as np
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -7,5 +8,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',150000.)
@@ -14,5 +15,5 @@
 
 # Use of ispdd and isdelta18o methods
-md.smb = SMBpdd();
+md.smb = SMBpdd()
 md.smb.isdelta18o=1
 md.smb.ismungsm=0
@@ -20,15 +21,15 @@
 # Add temperature, precipitation and delta18o needed to measure the surface mass balance
 # creating delta18o
-delta18o=numpy.loadtxt('../Data/delta18o.data')
+delta18o=np.loadtxt('../Data/delta18o.data')
 md.smb.delta18o=delta18o
 # creating delta18oSurface
-md.smb.delta18o_surface = numpy.zeros((2,numpy.size(delta18o,axis=1)))
+md.smb.delta18o_surface = np.zeros((2,np.size(delta18o,axis=1)))
 md.smb.delta18o_surface[1,:] = delta18o[1,:]
 
 # creating Present day and lgm temperatures
 # Same temperature over the all region:
-tmonth=numpy.ones(12)*(238.15+20.)
-md.smb.temperatures_presentday=numpy.zeros((md.mesh.numberofvertices+1,12))
-md.smb.temperatures_lgm=numpy.zeros((md.mesh.numberofvertices+1,12))
+tmonth=np.ones(12)*(238.15+20.)
+md.smb.temperatures_presentday=np.zeros((md.mesh.numberofvertices+1,12))
+md.smb.temperatures_lgm=np.zeros((md.mesh.numberofvertices+1,12))
 for imonth in xrange(0,12):
     md.smb.temperatures_presentday[0:md.mesh.numberofvertices,imonth]=tmonth[imonth]
@@ -39,8 +40,8 @@
 
 # creating initialization and spc temperatures initialization and spc
-md.thermal.spctemperature=numpy.mean(md.smb.temperatures_lgm[0:md.mesh.numberofvertices,:],axis=1).reshape(-1,1)    #-10*ones(md.mesh.numberofvertices,1)
-md.thermal.spctemperature=numpy.tile(md.thermal.spctemperature,(1,md.timestepping.final_time/md.timestepping.time_step))
-itemp=numpy.arange(0,md.timestepping.final_time,md.timestepping.time_step)
-md.thermal.spctemperature=numpy.vstack((md.thermal.spctemperature,itemp.reshape(1,-1)))
+md.thermal.spctemperature=np.mean(md.smb.temperatures_lgm[0:md.mesh.numberofvertices,:],axis=1).reshape(-1,1)    #-10*ones(md.mesh.numberofvertices,1)
+md.thermal.spctemperature=np.tile(md.thermal.spctemperature,(1,md.timestepping.final_time/md.timestepping.time_step))
+itemp=np.arange(0,md.timestepping.final_time,md.timestepping.time_step)
+md.thermal.spctemperature=np.vstack((md.thermal.spctemperature,itemp.reshape(1,-1)))
 
 md.initialization.temperature=md.smb.temperatures_lgm[0:md.mesh.numberofvertices,0]    #*ones(md.mesh.numberofvertices,1)
@@ -48,6 +49,6 @@
 
 # creating precipitation
-md.smb.precipitations_presentday=numpy.zeros((md.mesh.numberofvertices+1,12))
-md.smb.precipitations_lgm=numpy.zeros((md.mesh.numberofvertices+1,12))
+md.smb.precipitations_presentday=np.zeros((md.mesh.numberofvertices+1,12))
+md.smb.precipitations_lgm=np.zeros((md.mesh.numberofvertices+1,12))
 for imonth in xrange(0,12):
     md.smb.precipitations_presentday[0:md.mesh.numberofvertices,imonth]=-0.4*10**(-6)*md.mesh.y+0.5
@@ -57,9 +58,9 @@
 
 # Interpolation factors
-md.smb.Tdiff=0.5*numpy.ones((2,md.timestepping.final_time))
-md.smb.sealev=0.5*numpy.ones((2,md.timestepping.final_time))
+md.smb.Tdiff=0.5*np.ones((2,md.timestepping.final_time))
+md.smb.sealev=0.5*np.ones((2,md.timestepping.final_time))
 # Year of each data point
-md.smb.Tdiff[1,1:md.timestepping.final_time]=numpy.arange(1.,md.timestepping.final_time)
-md.smb.sealev[1,1:md.timestepping.final_time]=numpy.arange(1.,md.timestepping.final_time)
+md.smb.Tdiff[1,1:md.timestepping.final_time]=np.arange(1.,md.timestepping.final_time)
+md.smb.sealev[1,1:md.timestepping.final_time]=np.arange(1.,md.timestepping.final_time)
 
 # time steps and resolution
@@ -71,5 +72,5 @@
 md.transient.requested_outputs=['default','SmbMonthlytemperatures']
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Transient')
 
@@ -77,8 +78,8 @@
 field_names     =['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMonthlytemperatures1','SmbMassBalance1',\
 		            'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMonthlytemperatures2','SmbMassBalance2',\
-				      'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMonthlytemperatures3','SmbMassBalance3'];
+				      'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMonthlytemperatures3','SmbMassBalance3']
 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
 		            1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
-			         1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13];
+			         1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]
 field_values=[\
 	md.results.TransientSolution[0].Vx,\
Index: /issm/trunk-jpl/test/NightlyRun/test237.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test237.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test237.py	(revision 21408)
@@ -1,5 +1,6 @@
 #Test Name: SquareShelfTranIspddIsdeltaSSA3d
-import numpy
+import numpy as np
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -7,5 +8,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 from generic import generic
 
@@ -15,5 +16,5 @@
 
 # Use of ispdd and isdelta18o methods
-md.smb = SMBpdd();
+md.smb = SMBpdd()
 md.smb.isdelta18o=0
 md.smb.ismungsm=1
@@ -26,7 +27,7 @@
 # creating Present day and lgm temperatures
 # Same temperature over the all region:
-tmonth=numpy.ones(12)*(238.15+20.)
-md.smb.temperatures_presentday=numpy.zeros((md.mesh.numberofvertices+1,12))
-md.smb.temperatures_lgm=numpy.zeros((md.mesh.numberofvertices+1,12))
+tmonth=np.ones(12)*(238.15+20.)
+md.smb.temperatures_presentday=np.zeros((md.mesh.numberofvertices+1,12))
+md.smb.temperatures_lgm=np.zeros((md.mesh.numberofvertices+1,12))
 for imonth in xrange(0,12):
     md.smb.temperatures_presentday[0:md.mesh.numberofvertices,imonth]=tmonth[imonth]
@@ -37,8 +38,8 @@
 
 # creating initialization and spc temperatures initialization and spc
-md.thermal.spctemperature=numpy.mean(md.smb.temperatures_lgm[0:md.mesh.numberofvertices,:],axis=1).reshape(-1,1)    #-10*ones(md.mesh.numberofvertices,1)
-md.thermal.spctemperature=numpy.tile(md.thermal.spctemperature,(1,md.timestepping.final_time/md.timestepping.time_step))
-itemp=numpy.arange(0,md.timestepping.final_time,md.timestepping.time_step)
-md.thermal.spctemperature=numpy.vstack((md.thermal.spctemperature,itemp.reshape(1,-1)))
+md.thermal.spctemperature=np.mean(md.smb.temperatures_lgm[0:md.mesh.numberofvertices,:],axis=1).reshape(-1,1)    #-10*ones(md.mesh.numberofvertices,1)
+md.thermal.spctemperature=np.tile(md.thermal.spctemperature,(1,md.timestepping.final_time/md.timestepping.time_step))
+itemp=np.arange(0,md.timestepping.final_time,md.timestepping.time_step)
+md.thermal.spctemperature=np.vstack((md.thermal.spctemperature,itemp.reshape(1,-1)))
 
 md.initialization.temperature=md.smb.temperatures_lgm[0:md.mesh.numberofvertices,0].reshape(-1,1)   #*ones(md.mesh.numberofvertices,1)
@@ -46,6 +47,6 @@
 
 # creating precipitation
-md.smb.precipitations_presentday=numpy.zeros((md.mesh.numberofvertices+1,12))
-md.smb.precipitations_lgm=numpy.zeros((md.mesh.numberofvertices+1,12))
+md.smb.precipitations_presentday=np.zeros((md.mesh.numberofvertices+1,12))
+md.smb.precipitations_lgm=np.zeros((md.mesh.numberofvertices+1,12))
 for imonth in xrange(0,12):
     md.smb.precipitations_presentday[0:md.mesh.numberofvertices,imonth]=-0.4*10**(-6)*md.mesh.y+0.5
@@ -55,7 +56,7 @@
 
 fsize=int(md.timestepping.final_time/md.timestepping.time_step)+2
-md.smb.Pfac=numpy.zeros((2,fsize))
-md.smb.Tdiff=numpy.zeros((2,fsize))
-md.smb.sealev=numpy.zeros((2,fsize))
+md.smb.Pfac=np.zeros((2,fsize))
+md.smb.Tdiff=np.zeros((2,fsize))
+md.smb.sealev=np.zeros((2,fsize))
 for iint in xrange(0,fsize):
     # Interpolation factors
@@ -72,5 +73,5 @@
 md.extrude(3,1.)
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',1)
+md.cluster=generic('name',gethostname(),'np',1)
 md=solve(md,'Transient')
 
@@ -78,8 +79,8 @@
 field_names     =['Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Temperature1','BasalforcingsGroundediceMeltingRate1','SmbMonthlytemperatures1','SmbMassBalance1',\
 		'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Temperature2','BasalforcingsGroundediceMeltingRate2','SmbMonthlytemperatures2','SmbMassBalance2',\
-		'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','Temperature3','BasalforcingsGroundediceMeltingRate3','SmbMonthlytemperatures3','SmbMassBalance3'];
+		'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','Temperature3','BasalforcingsGroundediceMeltingRate3','SmbMonthlytemperatures3','SmbMassBalance3']
 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-8,1e-8,1e-8,1e-13,1e-8,1e-13,1e-13,\
 		1e-13,1e-13,1e-13,1e-13,1e-13,1e-8,1e-8,1e-8,7e-13,1e-7,1e-13,1e-13,\
-		1e-13,1e-13,1e-08,1e-13,1e-13,1e-8,1e-8,1e-8,7e-13,5e-7,1e-13,1e-13];
+		1e-13,1e-13,1e-08,1e-13,1e-13,1e-8,1e-8,1e-8,7e-13,5e-7,1e-13,1e-13]
 field_values=[\
 	md.results.TransientSolution[0].Vx,\
Index: /issm/trunk-jpl/test/NightlyRun/test238.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test238.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test238.py	(revision 21408)
@@ -1,5 +1,6 @@
 #Test Name: SquareShelfTranIspddIsdeltaO18pdSSA2d 
-import numpy
+import numpy as np
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -7,5 +8,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',150000.)
@@ -14,16 +15,16 @@
 
 # Use of ispdd and isdelta18o methods
-md.smb = SMBd18opdd();
-md.smb.isd18opd=1;
+md.smb = SMBd18opdd()
+md.smb.isd18opd=1
 
 # Add temperature, precipitation and delta18o needed to measure the surface mass balance
 # creating delta18o
-delta18o=numpy.loadtxt('../Data/delta18o.data')
+delta18o=np.loadtxt('../Data/delta18o.data')
 md.smb.delta18o=delta18o
 
 # creating Present day temperatures
 # Same temperature over the all region:
-tmonth=numpy.ones(12)*(238.15+20.)
-md.smb.temperatures_presentday=numpy.zeros((md.mesh.numberofvertices+1,12))
+tmonth=np.ones(12)*(238.15+20.)
+md.smb.temperatures_presentday=np.zeros((md.mesh.numberofvertices+1,12))
 for imonth in xrange(0,12):
     md.smb.temperatures_presentday[0:md.mesh.numberofvertices,imonth]=tmonth[imonth]
@@ -32,5 +33,5 @@
 
 # creating initialization and spc temperatures initialization and spc
-md.thermal.spctemperature=numpy.mean(md.smb.temperatures_presentday[0:md.mesh.numberofvertices,:],axis=1).reshape(-1,1)
+md.thermal.spctemperature=np.mean(md.smb.temperatures_presentday[0:md.mesh.numberofvertices,:],axis=1).reshape(-1,1)
 md.thermal.spctemperature=md.thermal.spctemperature-10
 md.initialization.temperature=md.thermal.spctemperature
@@ -38,5 +39,5 @@
 
 # creating precipitation
-md.smb.precipitations_presentday=numpy.zeros((md.mesh.numberofvertices+1,12))
+md.smb.precipitations_presentday=np.zeros((md.mesh.numberofvertices+1,12))
 for imonth in xrange(0,12):
     md.smb.precipitations_presentday[0:md.mesh.numberofvertices,imonth]=-0.4*10**(-6)*md.mesh.y+0.5
@@ -44,12 +45,12 @@
 
 # time steps and resolution
-md.timestepping.time_step=20;
-md.settings.output_frequency=1;
-md.timestepping.final_time=60;
+md.timestepping.time_step=20
+md.settings.output_frequency=1
+md.timestepping.final_time=60
 
 # 
 md.transient.requested_outputs=['default','SmbMonthlytemperatures']
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Transient')
 
@@ -57,8 +58,8 @@
 field_names     =['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMonthlytemperatures1','SmbMassBalance1',\
 		            'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMonthlytemperatures2','SmbMassBalance2',\
-				      'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMonthlytemperatures3','SmbMassBalance3'];
+				      'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMonthlytemperatures3','SmbMassBalance3']
 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
 		            1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
-			         1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13];
+			         1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]
 field_values=[\
 	md.results.TransientSolution[0].Vx,\
Index: /issm/trunk-jpl/test/NightlyRun/test239.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test239.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test239.py	(revision 21408)
@@ -1,5 +1,6 @@
 #Test Name: SquareShelfTranIspddIsdeltaO18pdInterpSSA2d 
-import numpy
+import numpy as np
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -7,5 +8,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',150000.)
@@ -14,16 +15,16 @@
 
 # Use of ispdd and isdelta18o methods
-md.smb = SMBd18opdd();
-md.smb.isd18opd=1;
+md.smb = SMBd18opdd()
+md.smb.isd18opd=1
 
 # Add temperature, precipitation and delta18o needed to measure the surface mass balance
 # creating delta18o
-delta18o=numpy.loadtxt('../Data/delta18o.data')
+delta18o=np.loadtxt('../Data/delta18o.data')
 md.smb.delta18o=delta18o
 
 # creating Present day temperatures
 # Same temperature over the all region:
-tmonth=numpy.ones(12)*(238.15+20.)
-md.smb.temperatures_presentday=numpy.zeros((md.mesh.numberofvertices+1,12))
+tmonth=np.ones(12)*(238.15+20.)
+md.smb.temperatures_presentday=np.zeros((md.mesh.numberofvertices+1,12))
 for imonth in xrange(0,12):
     md.smb.temperatures_presentday[0:md.mesh.numberofvertices,imonth]=tmonth[imonth]
@@ -32,5 +33,5 @@
 
 # creating initialization and spc temperatures initialization and spc
-md.thermal.spctemperature=numpy.mean(md.smb.temperatures_presentday[0:md.mesh.numberofvertices,:],axis=1).reshape(-1,1)
+md.thermal.spctemperature=np.mean(md.smb.temperatures_presentday[0:md.mesh.numberofvertices,:],axis=1).reshape(-1,1)
 md.thermal.spctemperature=md.thermal.spctemperature-10
 md.initialization.temperature=md.thermal.spctemperature
@@ -38,5 +39,5 @@
 
 # creating precipitation
-md.smb.precipitations_presentday=numpy.zeros((md.mesh.numberofvertices+1,12))
+md.smb.precipitations_presentday=np.zeros((md.mesh.numberofvertices+1,12))
 for imonth in xrange(0,12):
     md.smb.precipitations_presentday[0:md.mesh.numberofvertices,imonth]=-0.4*10**(-6)*md.mesh.y+0.5
@@ -44,12 +45,12 @@
 
 # time steps and resolution
-md.timestepping.time_step=0.5;
-md.settings.output_frequency=1;
-md.timestepping.final_time=2;
+md.timestepping.time_step=0.5
+md.settings.output_frequency=1
+md.timestepping.final_time=2
 
 # 
 md.transient.requested_outputs=['default','SmbMonthlytemperatures']
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Transient')
 
@@ -57,8 +58,8 @@
 field_names     =['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMonthlytemperatures1','SmbMassBalance1',\
 		            'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMonthlytemperatures2','SmbMassBalance2',\
-				      'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMonthlytemperatures3','SmbMassBalance3'];
+				      'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMonthlytemperatures3','SmbMassBalance3']
 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
 		            1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
-			         1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13];
+			         1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]
 field_values=[\
 	md.results.TransientSolution[0].Vx,\
Index: /issm/trunk-jpl/test/NightlyRun/test240.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test240.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test240.py	(revision 21408)
@@ -1,5 +1,6 @@
 #Test Name: SquareShelfTranIspddIsdeltaO18pdNoInterpSSA2d 
-import numpy
+import numpy as np
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -7,5 +8,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',150000.)
@@ -14,16 +15,16 @@
 
 # Use of ispdd and isdelta18o methods
-md.smb = SMBd18opdd();
-md.smb.isd18opd=1;
+md.smb = SMBd18opdd()
+md.smb.isd18opd=1
 
 # Add temperature, precipitation and delta18o needed to measure the surface mass balance
 # creating delta18o
-delta18o=numpy.loadtxt('../Data/delta18o.data')
+delta18o=np.loadtxt('../Data/delta18o.data')
 md.smb.delta18o=delta18o
 
 # creating Present day temperatures
 # Same temperature over the all region:
-tmonth=numpy.ones(12)*(238.15+20.)
-md.smb.temperatures_presentday=numpy.zeros((md.mesh.numberofvertices+1,12))
+tmonth=np.ones(12)*(238.15+20.)
+md.smb.temperatures_presentday=np.zeros((md.mesh.numberofvertices+1,12))
 for imonth in xrange(0,12):
     md.smb.temperatures_presentday[0:md.mesh.numberofvertices,imonth]=tmonth[imonth]
@@ -32,5 +33,5 @@
 
 # creating initialization and spc temperatures initialization and spc
-md.thermal.spctemperature=numpy.mean(md.smb.temperatures_presentday[0:md.mesh.numberofvertices,:],axis=1).reshape(-1,1)
+md.thermal.spctemperature=np.mean(md.smb.temperatures_presentday[0:md.mesh.numberofvertices,:],axis=1).reshape(-1,1)
 md.thermal.spctemperature=md.thermal.spctemperature-10
 md.initialization.temperature=md.thermal.spctemperature
@@ -38,5 +39,5 @@
 
 # creating precipitation
-md.smb.precipitations_presentday=numpy.zeros((md.mesh.numberofvertices+1,12))
+md.smb.precipitations_presentday=np.zeros((md.mesh.numberofvertices+1,12))
 for imonth in xrange(0,12):
     md.smb.precipitations_presentday[0:md.mesh.numberofvertices,imonth]=-0.4*10**(-6)*md.mesh.y+0.5
@@ -44,13 +45,13 @@
 
 # time steps and resolution
-md.timestepping.time_step=0.5;
-md.settings.output_frequency=1;
-md.timestepping.final_time=2;
-md.timestepping.interp_forcings=0;
+md.timestepping.time_step=0.5
+md.settings.output_frequency=1
+md.timestepping.final_time=2
+md.timestepping.interp_forcings=0
 
 # 
 md.transient.requested_outputs=['default','SmbMonthlytemperatures']
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Transient')
 
@@ -58,8 +59,8 @@
 field_names     =['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMonthlytemperatures1','SmbMassBalance1',\
 		            'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMonthlytemperatures2','SmbMassBalance2',\
-				      'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMonthlytemperatures3','SmbMassBalance3'];
+				      'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMonthlytemperatures3','SmbMassBalance3']
 field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
 		            1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
-			         1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13];
+			         1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]
 field_values=[\
 	md.results.TransientSolution[0].Vx,\
Index: /issm/trunk-jpl/test/NightlyRun/test241.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test241.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test241.py	(revision 21408)
@@ -1,5 +1,6 @@
 #Test Name: SquareShelfTranForceNoInterp2d
-import numpy
+import numpy as np
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -7,5 +8,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',150000.)
@@ -13,5 +14,5 @@
 md=parameterize(md,'../Par/SquareShelf.py')
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 
 md.timestepping.time_step=1.
@@ -21,8 +22,8 @@
 
 #Set up transient
-smb=numpy.ones((md.mesh.numberofvertices,1))*3.6
-smb=numpy.hstack((smb,smb*-1.))
+smb=np.ones((md.mesh.numberofvertices))*3.6
+smb=np.vstack((smb,smb*-1.)).T
 
-md.smb.mass_balance=numpy.vstack((smb,[1.5,3.]))
+md.smb.mass_balance=np.vstack((smb,[1.5,3.]))
 md.transient.isthermal=False
 
@@ -30,44 +31,42 @@
 
 #Fields and tolerances to track changes
-field_names=['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1', \
-	'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2', \
-	'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3', \
-	'Vx4','Vy4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassBalance4']
-field_tolerances=[1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,\
-	1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,\
-	1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,\
-	1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10]
-field_values=[\
-	md.results.TransientSolution[0].Vx,\
-	md.results.TransientSolution[0].Vy,\
-	md.results.TransientSolution[0].Vel,\
-	md.results.TransientSolution[0].Pressure,\
-	md.results.TransientSolution[0].Base,\
-	md.results.TransientSolution[0].Surface,\
-	md.results.TransientSolution[0].Thickness,\
-	md.results.TransientSolution[0].SmbMassBalance,\
-	md.results.TransientSolution[1].Vx,\
-	md.results.TransientSolution[1].Vy,\
-	md.results.TransientSolution[1].Vel,\
-	md.results.TransientSolution[1].Pressure,\
-	md.results.TransientSolution[1].Base,\
-	md.results.TransientSolution[1].Surface,\
-	md.results.TransientSolution[1].Thickness,\
-	md.results.TransientSolution[1].SmbMassBalance,\
-	md.results.TransientSolution[2].Vx,\
-	md.results.TransientSolution[2].Vy,\
-	md.results.TransientSolution[2].Vel,\
-	md.results.TransientSolution[2].Pressure,\
-	md.results.TransientSolution[2].Base,\
-	md.results.TransientSolution[2].Surface,\
-	md.results.TransientSolution[2].Thickness,\
-	md.results.TransientSolution[2].SmbMassBalance,\
-	md.results.TransientSolution[3].Vx,\
-	md.results.TransientSolution[3].Vy,\
-	md.results.TransientSolution[3].Vel,\
-	md.results.TransientSolution[3].Pressure,\
-	md.results.TransientSolution[3].Base,\
-	md.results.TransientSolution[3].Surface,\
-	md.results.TransientSolution[3].Thickness,\
-	md.results.TransientSolution[3].SmbMassBalance,\
-	]
+field_names=['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1',
+						 'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2',
+						 'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3',
+						 'Vx4','Vy4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassBalance4']
+field_tolerances=[1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,
+									1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,
+									1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,
+									1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10]
+field_values=[md.results.TransientSolution[0].Vx,
+							md.results.TransientSolution[0].Vy,
+							md.results.TransientSolution[0].Vel,
+							md.results.TransientSolution[0].Pressure,
+							md.results.TransientSolution[0].Base,
+							md.results.TransientSolution[0].Surface,
+							md.results.TransientSolution[0].Thickness,
+							md.results.TransientSolution[0].SmbMassBalance,
+							md.results.TransientSolution[1].Vx,
+							md.results.TransientSolution[1].Vy,
+							md.results.TransientSolution[1].Vel,
+							md.results.TransientSolution[1].Pressure,
+							md.results.TransientSolution[1].Base,
+							md.results.TransientSolution[1].Surface,
+							md.results.TransientSolution[1].Thickness,
+							md.results.TransientSolution[1].SmbMassBalance,
+							md.results.TransientSolution[2].Vx,
+							md.results.TransientSolution[2].Vy,
+							md.results.TransientSolution[2].Vel,
+							md.results.TransientSolution[2].Pressure,
+							md.results.TransientSolution[2].Base,
+							md.results.TransientSolution[2].Surface,
+							md.results.TransientSolution[2].Thickness,
+							md.results.TransientSolution[2].SmbMassBalance,
+							md.results.TransientSolution[3].Vx,
+							md.results.TransientSolution[3].Vy,
+							md.results.TransientSolution[3].Vel,
+							md.results.TransientSolution[3].Pressure,
+							md.results.TransientSolution[3].Base,
+							md.results.TransientSolution[3].Surface,
+							md.results.TransientSolution[3].Thickness,
+							md.results.TransientSolution[3].SmbMassBalance]
Index: /issm/trunk-jpl/test/NightlyRun/test242.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test242.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test242.py	(revision 21408)
@@ -1,5 +1,6 @@
 #Test Name: SquareShelfTranForceNoInterp3d
-import numpy
+import numpy as np
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -7,5 +8,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',350000.)
@@ -14,5 +15,5 @@
 md.extrude(3,1.)
 md=setflowequation(md,'HO','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 
 md.timestepping.time_step=1.
@@ -22,8 +23,8 @@
 
 #Set up transient
-smb=numpy.ones((md.mesh.numberofvertices,1))*3.6
-smb=numpy.hstack((smb,smb*-1.))
+smb=np.ones((md.mesh.numberofvertices))*3.6
+smb=np.vstack((smb,smb*-1.)).T
 
-md.smb.mass_balance=numpy.vstack((smb,[1.5,3.]))
+md.smb.mass_balance=np.vstack((smb,[1.5,3.]))
 md.transient.isthermal=False
 
@@ -31,49 +32,46 @@
 
 #Fields and tolerances to track changes
-field_names     =['Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1', \
-	'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2', \
-	'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3', \
-	'Vx4','Vy4','Vz4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassbalance4']
-field_tolerances=[\
-		1e-09,1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-13,\
-		1e-09,1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-13,\
-		1e-09,1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-13,\
-		1e-09,1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-13]
-field_values=[\
-	md.results.TransientSolution[0].Vx,\
-	md.results.TransientSolution[0].Vy,\
-	md.results.TransientSolution[0].Vz,\
-	md.results.TransientSolution[0].Vel,\
-	md.results.TransientSolution[0].Pressure,\
-	md.results.TransientSolution[0].Base,\
-	md.results.TransientSolution[0].Surface,\
-	md.results.TransientSolution[0].Thickness,\
-	md.results.TransientSolution[0].SmbMassBalance,\
-	md.results.TransientSolution[1].Vx,\
-	md.results.TransientSolution[1].Vy,\
-	md.results.TransientSolution[1].Vz,\
-	md.results.TransientSolution[1].Vel,\
-	md.results.TransientSolution[1].Pressure,\
-	md.results.TransientSolution[1].Base,\
-	md.results.TransientSolution[1].Surface,\
-	md.results.TransientSolution[1].Thickness,\
-	md.results.TransientSolution[1].SmbMassBalance,\
-	md.results.TransientSolution[2].Vx,\
-	md.results.TransientSolution[2].Vy,\
-	md.results.TransientSolution[2].Vz,\
-	md.results.TransientSolution[2].Vel,\
-	md.results.TransientSolution[2].Pressure,\
-	md.results.TransientSolution[2].Base,\
-	md.results.TransientSolution[2].Surface,\
-	md.results.TransientSolution[2].Thickness,\
-	md.results.TransientSolution[2].SmbMassBalance,\
-	md.results.TransientSolution[3].Vx,\
-	md.results.TransientSolution[3].Vy,\
-	md.results.TransientSolution[3].Vz,\
-	md.results.TransientSolution[3].Vel,\
-	md.results.TransientSolution[3].Pressure,\
-	md.results.TransientSolution[3].Base,\
-	md.results.TransientSolution[3].Surface,\
-	md.results.TransientSolution[3].Thickness,\
-	md.results.TransientSolution[3].SmbMassBalance,\
-	]
+field_names     =['Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1',
+									'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2',
+									'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3',
+									'Vx4','Vy4','Vz4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassbalance4']
+field_tolerances=[1e-09,1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-13,
+									1e-09,1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-13,
+									1e-09,1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-13,
+									1e-09,1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-13]
+field_values=[md.results.TransientSolution[0].Vx,
+							md.results.TransientSolution[0].Vy,
+							md.results.TransientSolution[0].Vz,
+							md.results.TransientSolution[0].Vel,
+							md.results.TransientSolution[0].Pressure,
+							md.results.TransientSolution[0].Base,
+							md.results.TransientSolution[0].Surface,
+							md.results.TransientSolution[0].Thickness,
+							md.results.TransientSolution[0].SmbMassBalance,
+							md.results.TransientSolution[1].Vx,
+							md.results.TransientSolution[1].Vy,
+							md.results.TransientSolution[1].Vz,
+							md.results.TransientSolution[1].Vel,
+							md.results.TransientSolution[1].Pressure,
+							md.results.TransientSolution[1].Base,
+							md.results.TransientSolution[1].Surface,
+							md.results.TransientSolution[1].Thickness,
+							md.results.TransientSolution[1].SmbMassBalance,
+							md.results.TransientSolution[2].Vx,
+							md.results.TransientSolution[2].Vy,
+							md.results.TransientSolution[2].Vz,
+							md.results.TransientSolution[2].Vel,
+							md.results.TransientSolution[2].Pressure,
+							md.results.TransientSolution[2].Base,
+							md.results.TransientSolution[2].Surface,
+							md.results.TransientSolution[2].Thickness,
+							md.results.TransientSolution[2].SmbMassBalance,
+							md.results.TransientSolution[3].Vx,
+							md.results.TransientSolution[3].Vy,
+							md.results.TransientSolution[3].Vz,
+							md.results.TransientSolution[3].Vel,
+							md.results.TransientSolution[3].Pressure,
+							md.results.TransientSolution[3].Base,
+							md.results.TransientSolution[3].Surface,
+							md.results.TransientSolution[3].Thickness,
+							md.results.TransientSolution[3].SmbMassBalance]
Index: /issm/trunk-jpl/test/NightlyRun/test270.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test270.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test270.py	(revision 21408)
@@ -1,5 +1,6 @@
 #Test Name: SquareShelfStressSSA2dDamage
-import numpy
-from model import model
+import numpy as np
+from model import *
+ from socket import gethostnamemodel
 from triangle import triangle
 from setmask import setmask
@@ -9,5 +10,5 @@
 from matdamageice import matdamageice
 from generic import generic
-from socket import gethostname as oshostname
+from socket import gethostname
 
 md=triangle(model(),'../Exp/Square.exp',150000.)
@@ -16,8 +17,8 @@
 md=parameterize(md,'../Par/SquareShelf.py')
 md.damage.isdamage=1
-md.damage.D=0.5*numpy.ones(md.mesh.numberofvertices)
-md.damage.spcdamage=numpy.nan*numpy.ones(md.mesh.numberofvertices)
+md.damage.D=0.5*np.ones(md.mesh.numberofvertices)
+md.damage.spcdamage=np.nan*np.ones(md.mesh.numberofvertices)
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Stressbalance')
 
Index: /issm/trunk-jpl/test/NightlyRun/test272.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test272.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test272.py	(revision 21408)
@@ -1,5 +1,6 @@
 #Test Name: SquareShelfCMDSSA2dDamage
-import numpy
-from model import model
+import numpy as np
+from model import *
+ from socket import gethostnamemodel
 from triangle import triangle
 from setmask import setmask
@@ -7,5 +8,5 @@
 from setflowequation import setflowequation
 from solve import solve
-from socket import gethostname as oshostname
+from socket import gethostname
 from matdamageice import matdamageice
 from generic import generic
@@ -16,6 +17,6 @@
 md=parameterize(md,'../Par/SquareShelf.py')
 md.damage.isdamage=1
-md.damage.D=0.5*numpy.ones(md.mesh.numberofvertices)
-md.damage.spcdamage=numpy.nan*numpy.ones(md.mesh.numberofvertices)
+md.damage.D=0.5*np.ones(md.mesh.numberofvertices)
+md.damage.spcdamage=np.nan*np.ones(md.mesh.numberofvertices)
 md=setflowequation(md,'SSA','all')
 
@@ -23,16 +24,16 @@
 md.inversion.iscontrol=1
 md.inversion.control_parameters=['DamageDbar']
-md.inversion.min_parameters=10**-13*numpy.ones((md.mesh.numberofvertices,1))
-md.inversion.max_parameters=numpy.ones((md.mesh.numberofvertices,1))
+md.inversion.min_parameters=10**-13*np.ones((md.mesh.numberofvertices))
+md.inversion.max_parameters=np.ones((md.mesh.numberofvertices))
 md.inversion.nsteps=2
 md.inversion.cost_functions=[101]
-md.inversion.cost_functions_coefficients=numpy.ones((md.mesh.numberofvertices,1))
-md.inversion.gradient_scaling=0.9*numpy.ones((md.inversion.nsteps,1))
-md.inversion.maxiter_per_step=2.*numpy.ones((md.inversion.nsteps,1))
-md.inversion.step_threshold=0.99*numpy.ones((md.inversion.nsteps,1))
+md.inversion.cost_functions_coefficients=np.ones((md.mesh.numberofvertices))
+md.inversion.gradient_scaling=0.9*np.ones((md.inversion.nsteps))
+md.inversion.maxiter_per_step=2.*np.ones((md.inversion.nsteps))
+md.inversion.step_threshold=0.99*np.ones((md.inversion.nsteps))
 md.inversion.vx_obs=md.initialization.vx 
 md.inversion.vy_obs=md.initialization.vy
 
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Stressbalance')
 
Index: /issm/trunk-jpl/test/NightlyRun/test273.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test273.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test273.py	(revision 21408)
@@ -1,5 +1,6 @@
 #Test Name: SquareShelfStressSSA2dDamageUpdate
-import numpy
-from model import model
+import numpy as np
+from model import *
+ from socket import gethostnamemodel
 from triangle import triangle
 from setmask import setmask
@@ -9,5 +10,5 @@
 from matdamageice import matdamageice
 from generic import generic
-from socket import gethostname as oshostname
+from socket import gethostname
 
 md=triangle(model(),'../Exp/Square.exp',150000.)
@@ -16,8 +17,8 @@
 md=parameterize(md,'../Par/SquareShelf.py')
 md.damage.isdamage=1
-md.damage.D=0.*numpy.ones(md.mesh.numberofvertices)
-md.damage.spcdamage=numpy.nan*numpy.ones(md.mesh.numberofvertices)
+md.damage.D=0.*np.ones(md.mesh.numberofvertices)
+md.damage.spcdamage=np.nan*np.ones(md.mesh.numberofvertices)
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 
 md.stressbalance.requested_outputs=['default','NewDamage']
Index: /issm/trunk-jpl/test/NightlyRun/test274.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test274.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test274.py	(revision 21408)
@@ -1,5 +1,6 @@
 #Test Name: SquareShelfStressSSA2dDamageRift
-import numpy
-from model import model
+import numpy as np
+from model import *
+ from socket import gethostnamemodel
 from triangle import triangle
 from setmask import setmask
@@ -7,5 +8,5 @@
 from setflowequation import setflowequation
 from solve import solve
-from socket import gethostname as oshostname
+from socket import gethostname
 from matdamageice import matdamageice
 from meshprocessrifts import meshprocessrifts
@@ -18,9 +19,9 @@
 md=parameterize(md,'../Par/SquareShelf2.py')
 md.damage.isdamage=1
-md.damage.D=0.5*numpy.ones(md.mesh.numberofvertices)
-md.damage.spcdamage=numpy.nan*numpy.ones(md.mesh.numberofvertices)
+md.damage.D=0.5*np.ones(md.mesh.numberofvertices)
+md.damage.spcdamage=np.nan*np.ones(md.mesh.numberofvertices)
 md=setflowequation(md,'SSA','all')
 
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 print md.rifts.riftstruct[0]['fill']
 md=solve(md,'Stressbalance')
Index: /issm/trunk-jpl/test/NightlyRun/test275.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test275.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test275.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: SquareShelfDamageEvolutionSSA2dPralong 
-import numpy
+import numpy as np
 from triangle import triangle
-from model import model
+from model import *
+ from socket import gethostnamemodel
 from setmask import setmask
 from parameterize import parameterize
@@ -8,5 +9,5 @@
 from setflowequation import setflowequation
 from generic import generic
-from socket import gethostname as oshostname
+from socket import gethostname
 from solve import solve
 from matdamageice import matdamageice
@@ -17,6 +18,6 @@
 md=parameterize(md,'../Par/SquareShelf.py')
 md.damage.isdamage=1
-md.damage.D=0.1*numpy.ones(md.mesh.numberofvertices)
-md.damage.spcdamage=numpy.nan*numpy.ones(md.mesh.numberofvertices)
+md.damage.D=0.1*np.ones(md.mesh.numberofvertices)
+md.damage.spcdamage=np.nan*np.ones(md.mesh.numberofvertices)
 md.damage.law=1
 
@@ -31,5 +32,5 @@
 
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'DamageEvolution')
 
Index: /issm/trunk-jpl/test/NightlyRun/test280.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test280.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test280.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfStressSSA2dHigherOrder
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 from ContourToMesh import *
 
@@ -13,5 +14,5 @@
 md=parameterize(md,'../Par/SquareShelf.py')
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 
 field_names=[]
Index: /issm/trunk-jpl/test/NightlyRun/test285.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test285.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test285.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfStressHOHigherOrder
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,13 +7,13 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 from ContourToMesh import *
 
-md=triangle(model(),'../Exp/Square.exp',150000.);
-md=setmask(md,'all','');
-md=parameterize(md,'../Par/SquareShelf.py');
+md=triangle(model(),'../Exp/Square.exp',150000.)
+md=setmask(md,'all','')
+md=parameterize(md,'../Par/SquareShelf.py')
 md.extrude(3,2.)
-md=setflowequation(md,'HO','all');
-md.cluster=generic('name',oshostname(),'np',3);
+md=setflowequation(md,'HO','all')
+md.cluster=generic('name',gethostname(),'np',3)
 
 field_names=[]
Index: /issm/trunk-jpl/test/NightlyRun/test290.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test290.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test290.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfStressFSP2P1
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,18 +7,18 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 from ContourToMesh import *
 
-md=triangle(model(),'../Exp/Square.exp',150000.);
-md=setmask(md,'all','');
-md=parameterize(md,'../Par/SquareShelf.py');
+md=triangle(model(),'../Exp/Square.exp',150000.)
+md=setmask(md,'all','')
+md=parameterize(md,'../Par/SquareShelf.py')
 md.extrude(3,2.)
-md=setflowequation(md,'FS','all');
-md.flowequation.fe_FS='TaylorHood';
-md.cluster=generic('name',oshostname(),'np',3);
-md=solve(md,'Stressbalance');
+md=setflowequation(md,'FS','all')
+md.flowequation.fe_FS='TaylorHood'
+md.cluster=generic('name',gethostname(),'np',3)
+md=solve(md,'Stressbalance')
 
 #Fields and tolerances to track changes
-field_names     =['Vx', 'Vy', 'Vz', 'Vel','Pressure'];
+field_names     =['Vx', 'Vy', 'Vz', 'Vel','Pressure']
 field_tolerances=[5e-5,5e-5,8e-5,5e-5,1e-7]
 field_values=[\
@@ -27,3 +28,3 @@
 	md.results.StressbalanceSolution.Vel,\
 	md.results.StressbalanceSolution.Pressure,\
-	];
+	]
Index: /issm/trunk-jpl/test/NightlyRun/test291.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test291.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test291.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfStressFSP4z
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 from ContourToMesh import *
 
@@ -15,9 +16,9 @@
 md=setflowequation(md,'FS','all')
 md.flowequation.fe_FS='OneLayerP4z'
-md.cluster=generic('name',oshostname(),'np',1)
+md.cluster=generic('name',gethostname(),'np',1)
 md=solve(md,'Stressbalance')
 
 #Fields and tolerances to track changes
-field_names     =['Vx', 'Vy', 'Vz', 'Vel','Pressure'];
+field_names     =['Vx', 'Vy', 'Vz', 'Vel','Pressure']
 field_tolerances=[5e-5,5e-5,8e-5,5e-5,1e-7]
 field_values=[\
@@ -27,3 +28,3 @@
 	md.results.StressbalanceSolution.Vel,\
 	md.results.StressbalanceSolution.Pressure,\
-	];
+	]
Index: /issm/trunk-jpl/test/NightlyRun/test292.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test292.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test292.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: SquareShelfTranSSA2dFloatingMeltParam
-from MatlabFuncs import *
+
 from model import *
-from numpy import *
+from socket import gethostname
+import numpy as np
 from triangle import *
 from setmask import *
@@ -15,5 +16,5 @@
 md=parameterize(md,'../Par/SquareShelf.py')
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md.basalforcings=linearbasalforcings(md.basalforcings)
 md=solve(md,'Transient')
Index: /issm/trunk-jpl/test/NightlyRun/test3001.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3001.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test3001.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfConstrainedStressSSA2dAdolc
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',50000.)
@@ -12,5 +13,5 @@
 md=parameterize(md,'../Par/SquareShelfConstrained.py')
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',1)
+md.cluster=generic('name',gethostname(),'np',1)
 md.stressbalance.requested_outputs=['default','DeviatoricStressxx','DeviatoricStressyy','DeviatoricStressxy']
 md.autodiff.isautodiff=True
Index: /issm/trunk-jpl/test/NightlyRun/test3002.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3002.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test3002.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfConstrainedStressSSA3dAdolc
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',180000.)
@@ -13,5 +14,5 @@
 md.extrude(3,2.)
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',1)
+md.cluster=generic('name',gethostname(),'np',1)
 md.autodiff.isautodiff=True
 md=solve(md,'Stressbalance')
Index: /issm/trunk-jpl/test/NightlyRun/test3003.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3003.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test3003.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfConstrainedStressHOAdolc
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',180000.)
@@ -13,5 +14,5 @@
 md.extrude(3,2.)
 md=setflowequation(md,'HO','all')
-md.cluster=generic('name',oshostname(),'np',1)
+md.cluster=generic('name',gethostname(),'np',1)
 md.stressbalance.requested_outputs=['default','StressTensorxx','StressTensoryy','StressTensorzz','StressTensorxy','StressTensorxz','StressTensoryz']
 md.autodiff.isautodiff=True
Index: /issm/trunk-jpl/test/NightlyRun/test3004.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3004.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test3004.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfConstrainedStressFSAdolc
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',180000.)
@@ -13,5 +14,5 @@
 md.extrude(3,2.)
 md=setflowequation(md,'FS','all')
-md.cluster=generic('name',oshostname(),'np',1)
+md.cluster=generic('name',gethostname(),'np',1)
 md.autodiff.isautodiff=True
 md=solve(md,'Stressbalance')
Index: /issm/trunk-jpl/test/NightlyRun/test3005.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3005.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test3005.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfConstrainedMasstransp2dAdolc
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',150000.)
@@ -12,5 +13,5 @@
 md=parameterize(md,'../Par/SquareShelfConstrained.py')
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',1)
+md.cluster=generic('name',gethostname(),'np',1)
 md.autodiff.isautodiff=True
 md=solve(md,'Masstransport')
Index: /issm/trunk-jpl/test/NightlyRun/test3006.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3006.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test3006.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfConstrainedMasstransp2dDGAdolc
 from model import *
+from socket import gethostname
 from triangle import *
 from meshconvert import *
@@ -7,5 +8,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',150000.)
@@ -14,5 +15,5 @@
 md=parameterize(md,'../Par/SquareShelfConstrained.py')
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',1)
+md.cluster=generic('name',gethostname(),'np',1)
 md.masstransport.stabilization=3
 md.masstransport.spcthickness=md.geometry.thickness
Index: /issm/trunk-jpl/test/NightlyRun/test3007.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3007.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test3007.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfConstrainedMasstransp3dAdolc
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',150000.)
@@ -13,5 +14,5 @@
 md=setflowequation(md,'SSA','all')
 md.extrude(5,3.)
-md.cluster=generic('name',oshostname(),'np',1)
+md.cluster=generic('name',gethostname(),'np',1)
 md.autodiff.isautodiff=True
 md=solve(md,'Masstransport')
Index: /issm/trunk-jpl/test/NightlyRun/test3008.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3008.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test3008.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfConstrainedTherSteaAdolc
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',180000.)
@@ -14,5 +15,5 @@
 md=setflowequation(md,'SSA','all')
 md.timestepping.time_step=0
-md.cluster=generic('name',oshostname(),'np',1)
+md.cluster=generic('name',gethostname(),'np',1)
 md.autodiff.isautodiff=True
 md=solve(md,'Thermal')
Index: /issm/trunk-jpl/test/NightlyRun/test3009.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3009.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test3009.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfConstrainedTherTranAdolc
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',180000.)
@@ -13,5 +14,5 @@
 md.extrude(3,1.)
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',1)
+md.cluster=generic('name',gethostname(),'np',1)
 md.transient.isstressbalance=False
 md.transient.ismasstransport=False
Index: /issm/trunk-jpl/test/NightlyRun/test301.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test301.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test301.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareSheetConstrainedStressSSA2d
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',150000.)
@@ -12,5 +13,5 @@
 md=parameterize(md,'../Par/SquareSheetConstrained.py')
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Stressbalance')
 
Index: /issm/trunk-jpl/test/NightlyRun/test3010.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3010.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test3010.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfConstrainedTranSSA2dAdolc
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',150000.)
@@ -12,5 +13,5 @@
 md=parameterize(md,'../Par/SquareShelfConstrained.py')
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',1)
+md.cluster=generic('name',gethostname(),'np',1)
 md.transient.requested_outputs=['IceVolume']
 
Index: /issm/trunk-jpl/test/NightlyRun/test3015.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3015.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test3015.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: SquareShelfConstrainedMasstransp2dAdolcForwardDifference
-import numpy
+import numpy as np
 import copy
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -11,5 +12,5 @@
 from SetIceShelfBC import *
 from solve import *
-from MatlabFuncs import *
+
 
 #This test runs test3005 with autodiff on, and checks that 
@@ -21,5 +22,5 @@
 md=parameterize(md,'../Par/SquareShelfConstrained.py')
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',1)
+md.cluster=generic('name',gethostname(),'np',1)
 md.masstransport.requested_outputs=['IceVolume']
 md.verbose=verbose('autodiff',True)
Index: /issm/trunk-jpl/test/NightlyRun/test3019.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3019.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test3019.py	(revision 21408)
@@ -1,5 +1,6 @@
 #Test Name: SquareShelfConstrainedTherTranAdolcReverseVsForward
-import numpy
+import numpy as np
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -9,5 +10,5 @@
 from dependent import *
 from solve import *
-from MatlabFuncs import *
+
 
 #test reverse scalar vs forward vectorial drivers in ADOLC, using the test3009 setup, equivalent to test109 setup.
@@ -16,5 +17,5 @@
 md=parameterize(md,'../Par/SquareShelfConstrained.py')
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',1)
+md.cluster=generic('name',gethostname(),'np',1)
 #md.toolkits.DefaultAnalysis=issmgslsolver()
 
@@ -33,5 +34,5 @@
 
 #now run vectorial forward mode
-md.autodiff.independents=[independent('name','md.geometry.thickness','type','vertex','nods',md.mesh.numberofvertices,'fov_forward_indices',numpy.arange(1,md.mesh.numberofvertices+1))]
+md.autodiff.independents=[independent('name','md.geometry.thickness','type','vertex','nods',md.mesh.numberofvertices,'fov_forward_indices',np.arange(1,md.mesh.numberofvertices+1))]
 md.autodiff.dependents=[dependent('name','MaxVel','type','scalar')]
 md.autodiff.driver='fov_forward'
Index: /issm/trunk-jpl/test/NightlyRun/test302.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test302.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test302.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareSheetConstrainedStressSIA2d
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',150000.)
@@ -12,5 +13,5 @@
 md=parameterize(md,'../Par/SquareSheetConstrained.py')
 md=setflowequation(md,'SIA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Stressbalance')
 
Index: /issm/trunk-jpl/test/NightlyRun/test3020.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3020.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test3020.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: SquareShelfConstrainedTranAdolcReverseVsForward
-import numpy
+import numpy as np
 import copy
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -11,5 +12,5 @@
 from SetIceShelfBC import *
 from solve import *
-from MatlabFuncs import *
+
 
 #This test runs test3020 with autodiff on, and checks that 
@@ -21,5 +22,5 @@
 md=parameterize(md,'../Par/SquareShelfConstrained.py')
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',1)
+md.cluster=generic('name',gethostname(),'np',1)
 md.transient.requested_outputs=['IceVolume','MaxVel']
 md.verbose=verbose('autodiff',True)
Index: /issm/trunk-jpl/test/NightlyRun/test303.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test303.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test303.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareSheetConstrainedStressSIASSA2d
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',150000.)
@@ -12,5 +13,5 @@
 md=parameterize(md,'../Par/SquareSheetConstrained.py')
 md=setflowequation(md,'SIA','../Exp/SquareHalfRight.exp','fill','SSA')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Stressbalance')
 
Index: /issm/trunk-jpl/test/NightlyRun/test304.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test304.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test304.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareSheetConstrainedStressSSA3d
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',180000.)
@@ -13,5 +14,5 @@
 md.extrude(3,2.)
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Stressbalance')
 
Index: /issm/trunk-jpl/test/NightlyRun/test305.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test305.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test305.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareSheetConstrainedStressSIA3d
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',180000.)
@@ -13,5 +14,5 @@
 md.extrude(5,2.)
 md=setflowequation(md,'SIA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Stressbalance')
 
Index: /issm/trunk-jpl/test/NightlyRun/test306.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test306.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test306.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareSheetConstrainedStressSIASSA3d
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',180000.)
@@ -13,5 +14,5 @@
 md.extrude(4,2.)
 md=setflowequation(md,'SIA','../Exp/SquareHalfRight.exp','fill','SSA')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Stressbalance')
 
Index: /issm/trunk-jpl/test/NightlyRun/test307.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test307.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test307.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareSheetConstrainedStressHO
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',180000.)
@@ -13,5 +14,5 @@
 md.extrude(3,1.)
 md=setflowequation(md,'HO','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Stressbalance')
 
Index: /issm/trunk-jpl/test/NightlyRun/test308.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test308.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test308.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareSheetConstrainedStressFS
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',180000.)
@@ -13,5 +14,5 @@
 md.extrude(3,1.)
 md=setflowequation(md,'FS','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Stressbalance')
 
Index: /issm/trunk-jpl/test/NightlyRun/test309.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test309.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test309.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareSheetConstrainedMasstransp2d
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',150000.)
@@ -12,5 +13,5 @@
 md=parameterize(md,'../Par/SquareSheetConstrained.py')
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Masstransport')
 
Index: /issm/trunk-jpl/test/NightlyRun/test310.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test310.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test310.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareSheetConstrainedMasstransp2dDG
 from model import *
+from socket import gethostname
 from triangle import *
 from meshconvert import *
@@ -7,5 +8,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',150000.)
@@ -16,5 +17,5 @@
 md.masstransport.stabilization=3
 md.masstransport.spcthickness=md.geometry.thickness
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Masstransport')
 
Index: /issm/trunk-jpl/test/NightlyRun/test3101.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3101.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test3101.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfConstrainedStressSSA2dAdolcMumps
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',50000.)
@@ -12,5 +13,5 @@
 md=parameterize(md,'../Par/SquareShelfConstrained.py')
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md.stressbalance.requested_outputs=['default','DeviatoricStressxx','DeviatoricStressyy','DeviatoricStressxy']
 
Index: /issm/trunk-jpl/test/NightlyRun/test3102.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3102.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test3102.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfConstrainedStressSSA3dAdolcMumps
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',180000.)
@@ -13,5 +14,5 @@
 md.extrude(3,2.)
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md.autodiff.isautodiff=True
 
Index: /issm/trunk-jpl/test/NightlyRun/test3103.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3103.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test3103.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfConstrainedStressHOAdolcMumps
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',180000.)
@@ -13,5 +14,5 @@
 md.extrude(3,2.)
 md=setflowequation(md,'HO','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md.stressbalance.requested_outputs=['default','StressTensorxx','StressTensoryy','StressTensorzz','StressTensorxy','StressTensorxz','StressTensoryz']
 
Index: /issm/trunk-jpl/test/NightlyRun/test3104.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3104.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test3104.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfConstrainedStressFSAdolcMumps
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',180000.)
@@ -13,5 +14,5 @@
 md.extrude(3,2.)
 md=setflowequation(md,'FS','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 
 md.autodiff.isautodiff=True
Index: /issm/trunk-jpl/test/NightlyRun/test3105.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3105.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test3105.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfConstrainedMasstransp2dAdolcMumps
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',150000.)
@@ -12,5 +13,5 @@
 md=parameterize(md,'../Par/SquareShelfConstrained.py')
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 
 md.autodiff.isautodiff=True
Index: /issm/trunk-jpl/test/NightlyRun/test3106.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3106.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test3106.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfConstrainedMasstransp2dDGAdolcMumps
 from model import *
+from socket import gethostname
 from triangle import *
 from meshconvert import *
@@ -7,5 +8,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',150000.)
@@ -14,5 +15,5 @@
 md=parameterize(md,'../Par/SquareShelfConstrained.py')
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md.masstransport.stabilization=3
 md.masstransport.spcthickness=md.geometry.thickness
Index: /issm/trunk-jpl/test/NightlyRun/test3107.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3107.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test3107.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfConstrainedMasstransp3dAdolcMumps
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',150000.)
@@ -13,5 +14,5 @@
 md=setflowequation(md,'SSA','all')
 md.extrude(5,3.)
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 
 md.autodiff.isautodiff=True
Index: /issm/trunk-jpl/test/NightlyRun/test3108.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3108.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test3108.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfConstrainedTherSteaAdolcMumps
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',180000.)
@@ -14,5 +15,5 @@
 md=setflowequation(md,'SSA','all')
 md.timestepping.time_step=0
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 
 md.autodiff.isautodiff=True
Index: /issm/trunk-jpl/test/NightlyRun/test3109.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3109.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test3109.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfConstrainedTherTranAdolcMumps
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',180000.)
@@ -13,5 +14,5 @@
 md.extrude(3,1.)
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md.transient.isstressbalance=False
 md.transient.ismasstransport=False
Index: /issm/trunk-jpl/test/NightlyRun/test311.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test311.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test311.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareSheetConstrainedMasstransp3d
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',150000.)
@@ -13,5 +14,5 @@
 md=setflowequation(md,'SSA','all')
 md.extrude(5,0.5)
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Masstransport')
 
Index: /issm/trunk-jpl/test/NightlyRun/test3110.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3110.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test3110.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareShelfConstrainedTranSSA2dAdolcMumps
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',150000.)
@@ -12,5 +13,5 @@
 md=parameterize(md,'../Par/SquareShelfConstrained.py')
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 
 md.transient.requested_outputs=['IceVolume']
Index: /issm/trunk-jpl/test/NightlyRun/test3119.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3119.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test3119.py	(revision 21408)
@@ -1,4 +1,5 @@
-import numpy
+import numpy as np
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -8,5 +9,5 @@
 from dependent import *
 from solve import *
-from MatlabFuncs import *
+
 
 #test reverse scalar vs forward vectorial drivers in ADOLC, using the test3009 setup, equivalent to test109 setup.
@@ -15,5 +16,5 @@
 md=parameterize(md,'../Par/SquareShelfConstrained.py')
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 
 md.autodiff.isautodiff=True
Index: /issm/trunk-jpl/test/NightlyRun/test312.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test312.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test312.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareSheetConstrainedTherStea
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',180000.)
@@ -14,5 +15,5 @@
 md=setflowequation(md,'SSA','all')
 md.timestepping.time_step=0.
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Thermal')
 
Index: /issm/trunk-jpl/test/NightlyRun/test313.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test313.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test313.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareSheetConstrainedTherTran
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',180000.)
@@ -13,5 +14,5 @@
 md.extrude(3,1.)
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md.verbose=verbose('convergence',True,'solution',True)
 md.transient.isstressbalance=False
Index: /issm/trunk-jpl/test/NightlyRun/test314.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test314.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test314.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareSheetConstrainedTranSIA2d
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',150000.)
@@ -12,5 +13,5 @@
 md=parameterize(md,'../Par/SquareSheetConstrained.py')
 md=setflowequation(md,'SIA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md.transient.requested_outputs=['default','GroundedArea','FloatingArea','IceVolume']
 md=solve(md,'Transient')
Index: /issm/trunk-jpl/test/NightlyRun/test315.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test315.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test315.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareSheetConstrainedTranSIA3d
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',150000.)
@@ -13,5 +14,5 @@
 md.extrude(5,1.2)
 md=setflowequation(md,'SIA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Transient')
 
Index: /issm/trunk-jpl/test/NightlyRun/test316.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test316.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test316.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareSheetConstrainedTranSSA2d
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',150000.)
@@ -12,5 +13,5 @@
 md=parameterize(md,'../Par/SquareSheetConstrained.py')
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Transient')
 
Index: /issm/trunk-jpl/test/NightlyRun/test317.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test317.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test317.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareSheetConstrainedTranHO
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',200000.)
@@ -14,5 +15,5 @@
 md.extrude(3,1.)
 md=setflowequation(md,'HO','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md.transient.requested_outputs=['default','GroundedArea','FloatingArea','TotalFloatingBmb','TotalGroundedBmb']
 md=solve(md,'Transient')
Index: /issm/trunk-jpl/test/NightlyRun/test318.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test318.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test318.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: SquareSheetConstrainedSteaSIA3d
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',180000.)
@@ -13,5 +14,5 @@
 md.extrude(4,1.)
 md=setflowequation(md,'SIA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md.timestepping.time_step=0
 md=solve(md,'Steadystate')
Index: /issm/trunk-jpl/test/NightlyRun/test319.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test319.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test319.py	(revision 21408)
@@ -1,5 +1,6 @@
 #Test Name: SquareSheetConstrainedCMDragSSA2d
-import numpy
+import numpy as np
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -7,5 +8,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',200000.)
@@ -17,17 +18,17 @@
 md.inversion.iscontrol=1
 md.inversion.control_parameters=['FrictionCoefficient']
-md.inversion.min_parameters=1.*numpy.ones((md.mesh.numberofvertices,1))
-md.inversion.max_parameters=200.*numpy.ones((md.mesh.numberofvertices,1))
+md.inversion.min_parameters=1.*np.ones((md.mesh.numberofvertices))
+md.inversion.max_parameters=200.*np.ones((md.mesh.numberofvertices))
 md.inversion.nsteps=2
 md.inversion.cost_functions=[103,501]
-md.inversion.cost_functions_coefficients=numpy.ones((md.mesh.numberofvertices,2))
+md.inversion.cost_functions_coefficients=np.ones((md.mesh.numberofvertices,2))
 md.inversion.cost_functions_coefficients[:,1]=2.*10**-7
-md.inversion.gradient_scaling=3.*numpy.ones((md.inversion.nsteps,1))
-md.inversion.maxiter_per_step=2*numpy.ones(md.inversion.nsteps)
-md.inversion.step_threshold=0.3*numpy.ones(md.inversion.nsteps)
+md.inversion.gradient_scaling=3.*np.ones((md.inversion.nsteps))
+md.inversion.maxiter_per_step=2*np.ones(md.inversion.nsteps)
+md.inversion.step_threshold=0.3*np.ones(md.inversion.nsteps)
 md.inversion.vx_obs=md.initialization.vx
 md.inversion.vy_obs=md.initialization.vy
 
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Stressbalance')
 
Index: /issm/trunk-jpl/test/NightlyRun/test320.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test320.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test320.py	(revision 21408)
@@ -1,5 +1,6 @@
 #Test Name: SquareSheetConstrainedCMDragSSA3d
-import numpy
+import numpy as np
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -7,5 +8,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',200000.)
@@ -18,17 +19,17 @@
 md.inversion.iscontrol=1
 md.inversion.control_parameters=['FrictionCoefficient']
-md.inversion.min_parameters=1.*numpy.ones((md.mesh.numberofvertices,1))
-md.inversion.max_parameters=200.*numpy.ones((md.mesh.numberofvertices,1))
+md.inversion.min_parameters=1.*np.ones((md.mesh.numberofvertices))
+md.inversion.max_parameters=200.*np.ones((md.mesh.numberofvertices))
 md.inversion.nsteps=2
 md.inversion.cost_functions=[103,501]
-md.inversion.cost_functions_coefficients=numpy.ones((md.mesh.numberofvertices,2))
+md.inversion.cost_functions_coefficients=np.ones((md.mesh.numberofvertices,2))
 md.inversion.cost_functions_coefficients[:,1]=2.*10**-7
-md.inversion.gradient_scaling=3.*numpy.ones((md.inversion.nsteps,1))
-md.inversion.maxiter_per_step=2*numpy.ones(md.inversion.nsteps)
-md.inversion.step_threshold=0.3*numpy.ones(md.inversion.nsteps)
+md.inversion.gradient_scaling=3.*np.ones((md.inversion.nsteps))
+md.inversion.maxiter_per_step=2*np.ones(md.inversion.nsteps)
+md.inversion.step_threshold=0.3*np.ones(md.inversion.nsteps)
 md.inversion.vx_obs=md.initialization.vx
 md.inversion.vy_obs=md.initialization.vy
 
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Stressbalance')
 
Index: /issm/trunk-jpl/test/NightlyRun/test321.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test321.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test321.py	(revision 21408)
@@ -1,5 +1,6 @@
 #Test Name: SquareSheetConstrainedCMDragHO
-import numpy
+import numpy as np
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -7,5 +8,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',200000.)
@@ -18,17 +19,17 @@
 md.inversion.iscontrol=1
 md.inversion.control_parameters=['FrictionCoefficient']
-md.inversion.min_parameters=1.*numpy.ones((md.mesh.numberofvertices,1))
-md.inversion.max_parameters=200.*numpy.ones((md.mesh.numberofvertices,1))
+md.inversion.min_parameters=1.*np.ones((md.mesh.numberofvertices))
+md.inversion.max_parameters=200.*np.ones((md.mesh.numberofvertices))
 md.inversion.nsteps=2
 md.inversion.cost_functions=[102,501]
-md.inversion.cost_functions_coefficients=numpy.ones((md.mesh.numberofvertices,2))
+md.inversion.cost_functions_coefficients=np.ones((md.mesh.numberofvertices,2))
 md.inversion.cost_functions_coefficients[:,1]=2*10**-7
-md.inversion.gradient_scaling=3.*numpy.ones((md.inversion.nsteps,1))
-md.inversion.maxiter_per_step=2*numpy.ones(md.inversion.nsteps)
-md.inversion.step_threshold=0.3*numpy.ones(md.inversion.nsteps)
+md.inversion.gradient_scaling=3.*np.ones((md.inversion.nsteps))
+md.inversion.maxiter_per_step=2*np.ones(md.inversion.nsteps)
+md.inversion.step_threshold=0.3*np.ones(md.inversion.nsteps)
 md.inversion.vx_obs=md.initialization.vx
 md.inversion.vy_obs=md.initialization.vy
 
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Stressbalance')
 
Index: /issm/trunk-jpl/test/NightlyRun/test322.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test322.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test322.py	(revision 21408)
@@ -1,5 +1,6 @@
 #Test Name: SquareSheetConstrainedCMDragFS
-import numpy
+import numpy as np
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -7,5 +8,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',200000.)
@@ -18,17 +19,17 @@
 md.inversion.iscontrol=1
 md.inversion.control_parameters=['FrictionCoefficient']
-md.inversion.min_parameters=1.*numpy.ones((md.mesh.numberofvertices,1))
-md.inversion.max_parameters=200.*numpy.ones((md.mesh.numberofvertices,1))
+md.inversion.min_parameters=1.*np.ones((md.mesh.numberofvertices))
+md.inversion.max_parameters=200.*np.ones((md.mesh.numberofvertices))
 md.inversion.nsteps=2
 md.inversion.cost_functions=[104,501]
-md.inversion.cost_functions_coefficients=numpy.ones((md.mesh.numberofvertices,2))
+md.inversion.cost_functions_coefficients=np.ones((md.mesh.numberofvertices,2))
 md.inversion.cost_functions_coefficients[:,1]=2.*10**-7
-md.inversion.gradient_scaling=3.*numpy.ones((md.inversion.nsteps,1))
-md.inversion.maxiter_per_step=2*numpy.ones(md.inversion.nsteps)
-md.inversion.step_threshold=0.3*numpy.ones(md.inversion.nsteps)
+md.inversion.gradient_scaling=3.*np.ones((md.inversion.nsteps))
+md.inversion.maxiter_per_step=2*np.ones(md.inversion.nsteps)
+md.inversion.step_threshold=0.3*np.ones(md.inversion.nsteps)
 md.inversion.vx_obs=md.initialization.vx
 md.inversion.vy_obs=md.initialization.vy
 
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Stressbalance')
 
Index: /issm/trunk-jpl/test/NightlyRun/test323.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test323.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test323.py	(revision 21408)
@@ -1,5 +1,6 @@
 #Test Name: SquareSheetConstrainedTranCflSSA2d
-import numpy
+import numpy as np
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -7,5 +8,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',150000.)
@@ -13,5 +14,5 @@
 md=parameterize(md,'../Par/SquareSheetConstrained.py')
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md.timestepping.time_adapt=1
 md.timestepping.final_time=1120.
Index: /issm/trunk-jpl/test/NightlyRun/test324.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test324.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test324.py	(revision 21408)
@@ -1,5 +1,6 @@
 #Test Name: SquareSheetConstrainedTranCflSIA3d
-import numpy
+import numpy as np
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -7,5 +8,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',150000.)
@@ -14,5 +15,5 @@
 md.extrude(5,1.2)
 md=setflowequation(md,'SIA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md.timestepping.time_adapt=1
 md.timestepping.final_time=16000.
Index: /issm/trunk-jpl/test/NightlyRun/test325.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test325.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test325.py	(revision 21408)
@@ -1,5 +1,6 @@
 #Test Name: SquareSheetConstrainedEnthalpyStea
-import numpy
+import numpy as np
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -7,5 +8,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',180000.)
@@ -15,10 +16,10 @@
 md=setflowequation(md,'SSA','all')
 md.timestepping.time_step=0.
-md.initialization.waterfraction=numpy.zeros((md.mesh.numberofvertices,1))
-md.initialization.watercolumn=numpy.zeros((md.mesh.numberofvertices,1))
+md.initialization.waterfraction=np.zeros((md.mesh.numberofvertices))
+md.initialization.watercolumn=np.zeros((md.mesh.numberofvertices))
 md.thermal.isenthalpy = 1
 md.thermal.isdynamicbasalspc = 1
 
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Thermal')
 
Index: /issm/trunk-jpl/test/NightlyRun/test326.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test326.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test326.py	(revision 21408)
@@ -1,5 +1,6 @@
 #Test Name: SquareSheetConstrainedEnthalpyTran
-import numpy
+import numpy as np
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -7,5 +8,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',180000.)
@@ -14,7 +15,7 @@
 md.extrude(3,1.)
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
-md.initialization.waterfraction=numpy.zeros((md.mesh.numberofvertices,1))
-md.initialization.watercolumn=numpy.zeros((md.mesh.numberofvertices,1))
+md.cluster=generic('name',gethostname(),'np',3)
+md.initialization.waterfraction=np.zeros((md.mesh.numberofvertices))
+md.initialization.watercolumn=np.zeros((md.mesh.numberofvertices))
 md.transient.isstressbalance=False
 md.transient.ismasstransport=False
Index: /issm/trunk-jpl/test/NightlyRun/test327.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test327.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test327.py	(revision 21408)
@@ -1,5 +1,6 @@
 #Test Name: SquareSheetConstrainedTransHOEnth
-import numpy
+import numpy as np
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -7,5 +8,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',200000.)
@@ -14,9 +15,9 @@
 md.extrude(3,1.)
 md=setflowequation(md,'HO','all')
-md.cluster=generic('name',oshostname(),'np',3)
-md.initialization.waterfraction=numpy.zeros((md.mesh.numberofvertices,1))
-md.initialization.watercolumn=numpy.zeros((md.mesh.numberofvertices,1))
+md.cluster=generic('name',gethostname(),'np',3)
+md.initialization.waterfraction=np.zeros((md.mesh.numberofvertices))
+md.initialization.watercolumn=np.zeros((md.mesh.numberofvertices))
 md.initialization.temperature[:]=272.
-md.thermal.spctemperature[numpy.nonzero(md.mesh.vertexonsurface)[0]]=272.
+md.thermal.spctemperature[np.nonzero(md.mesh.vertexonsurface)[0]]=272.
 md.thermal.isenthalpy=1
 md.thermal.isdynamicbasalspc=1
Index: /issm/trunk-jpl/test/NightlyRun/test328.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test328.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test328.py	(revision 21408)
@@ -1,6 +1,6 @@
 #Test Name: SquareSheetConstrainedSmbGradients2d
-import numpy
 import copy
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -8,5 +8,4 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
 
 md=triangle(model(),'../Exp/Square.exp',150000.)
@@ -14,40 +13,52 @@
 md=parameterize(md,'../Par/SquareSheetConstrained.py')
 md=setflowequation(md,'SSA','all')
-md.smb = SMBgradients();
+md.smb = SMBgradients()
 md.smb.b_pos=-100. + 0.00005*md.mesh.x - 0.0001*md.mesh.y
 md.smb.b_neg=250. + 0.000051*md.mesh.x - 0.00011*md.mesh.y
 md.transient.requested_outputs=['default','TotalSmb']
-md.smb.href=copy.deepcopy(md.geometry.surface).reshape(-1)
-md.smb.smbref= 1000. - 0.001*md.mesh.x - 0.005*md.mesh.y;
-md.cluster=generic('name',oshostname(),'np',3)
+md.smb.href=copy.deepcopy(md.geometry.surface)
+md.smb.smbref= 1000. - 0.001*md.mesh.x - 0.005*md.mesh.y
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Transient')
 
 #Fields and tolerances to track changes
-field_names     =['Vx1','Vy1','Vel1','Bed1','Surface1','Thickness1','SMB1','TotalSmb1','Vx2','Vy2','Vel2','Bed2','Surface2','Thickness2','SMB2','TotalSmb2','Vx3','Vy3','Vel3','Bed3','Surface3','Thickness3','SMB3','TotalSmb3']
-field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]
-field_values=[\
-	md.results.TransientSolution[0].Vx,\
-	md.results.TransientSolution[0].Vy,\
-	md.results.TransientSolution[0].Vel,\
-	md.results.TransientSolution[0].Base,\
-	md.results.TransientSolution[0].Surface,\
-	md.results.TransientSolution[0].Thickness,\
-	md.results.TransientSolution[0].SmbMassBalance,\
-	md.results.TransientSolution[0].TotalSmb,\
-	md.results.TransientSolution[1].Vx,\
-	md.results.TransientSolution[1].Vy,\
-	md.results.TransientSolution[1].Vel,\
-	md.results.TransientSolution[1].Base,\
-	md.results.TransientSolution[1].Surface,\
-	md.results.TransientSolution[1].Thickness,\
-	md.results.TransientSolution[1].TotalSmb,\
-	md.results.TransientSolution[1].SmbMassBalance,\
-	md.results.TransientSolution[2].Vx,\
-	md.results.TransientSolution[2].Vy,\
-	md.results.TransientSolution[2].Vel,\
-	md.results.TransientSolution[2].Base,\
-	md.results.TransientSolution[2].Surface,\
-	md.results.TransientSolution[2].Thickness,\
-	md.results.TransientSolution[2].SmbMassBalance,\
-	md.results.TransientSolution[2].TotalSmb,\
-	]
+field_names     =['Vx1','Vy1','Vel1',
+									'Bed1','Surface1','Thickness1',
+									'SMB1','TotalSmb1',
+									'Vx2','Vy2','Vel2','Bed2',
+									'Surface2','Thickness2',
+									'SMB2','TotalSmb2','Vx3','Vy3',
+									'Vel3','Bed3','Surface3',
+									'Thickness3','SMB3','TotalSmb3']
+field_tolerances=[1e-13,1e-13,1e-13,
+									1e-13,1e-13,1e-13,
+									1e-13,1e-13,1e-13,
+									1e-13,1e-13,1e-13,
+									1e-13,1e-13,1e-13,
+									1e-13,1e-13,1e-13,
+									1e-13,1e-13,1e-13,
+									1e-13,1e-13,1e-13]
+field_values=[md.results.TransientSolution[0].Vx,
+							md.results.TransientSolution[0].Vy,
+							md.results.TransientSolution[0].Vel,
+							md.results.TransientSolution[0].Base,
+							md.results.TransientSolution[0].Surface,
+							md.results.TransientSolution[0].Thickness,
+							md.results.TransientSolution[0].SmbMassBalance,
+							md.results.TransientSolution[0].TotalSmb,
+							md.results.TransientSolution[1].Vx,
+							md.results.TransientSolution[1].Vy,
+							md.results.TransientSolution[1].Vel,
+							md.results.TransientSolution[1].Base,
+							md.results.TransientSolution[1].Surface,
+							md.results.TransientSolution[1].Thickness,
+							md.results.TransientSolution[1].TotalSmb,
+							md.results.TransientSolution[1].SmbMassBalance,
+							md.results.TransientSolution[2].Vx,
+							md.results.TransientSolution[2].Vy,
+							md.results.TransientSolution[2].Vel,
+							md.results.TransientSolution[2].Base,
+							md.results.TransientSolution[2].Surface,
+							md.results.TransientSolution[2].Thickness,
+							md.results.TransientSolution[2].SmbMassBalance,
+							md.results.TransientSolution[2].TotalSmb]
Index: /issm/trunk-jpl/test/NightlyRun/test329.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test329.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test329.py	(revision 21408)
@@ -1,6 +1,6 @@
 #Test Name: SquareSheetConstrainedSmbGradients3d
-import numpy
 import copy
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -8,5 +8,4 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
 
 md=triangle(model(),'../Exp/Square.exp',150000.)
@@ -15,48 +14,60 @@
 md.extrude(3,1)
 md=setflowequation(md,'HO','all')
-md.smb = SMBgradients();
+md.smb = SMBgradients()
 md.smb.b_pos=-100. + 0.00005*md.mesh.x - 0.0001*md.mesh.y
 md.smb.b_neg=250. + 0.000051*md.mesh.x - 0.00011*md.mesh.y
-md.smb.href=copy.deepcopy(md.geometry.surface).reshape(-1)
-md.smb.smbref= 1000. - 0.001*md.mesh.x - 0.005*md.mesh.y;
+md.smb.href=copy.deepcopy(md.geometry.surface)
+md.smb.smbref= 1000. - 0.001*md.mesh.x - 0.005*md.mesh.y
 md.transient.requested_outputs=['default','TotalSmb']
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Transient')
 
 #Fields and tolerances to track changes
-field_names     =['Vx1','Vy1','Vz1','Vel1','Bed1','Surface1','Thickness1','Temperature1','SMB1','TotalSmb1','Vx2','Vy2','Vz2','Vel2','Bed2','Surface2','Thickness2','Temperature2','SMB2','TotalSmb2','Vx3','Vy3','Vz3','Vel3','Bed3','Surface3','Thickness3','Temperature3','SMB3','TotalSmb3']
-field_tolerances=[1e-09,1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,\
-	1e-09,1e-09,1e-10,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,\
-	1e-09,5e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10]
-field_values=[\
-	md.results.TransientSolution[0].Vx,\
-	md.results.TransientSolution[0].Vy,\
-	md.results.TransientSolution[0].Vz,\
-	md.results.TransientSolution[0].Vel,\
-	md.results.TransientSolution[0].Base,\
-	md.results.TransientSolution[0].Surface,\
-	md.results.TransientSolution[0].Thickness,\
-	md.results.TransientSolution[0].Temperature,\
-	md.results.TransientSolution[0].SmbMassBalance,\
-	md.results.TransientSolution[0].TotalSmb,\
-	md.results.TransientSolution[1].Vx,\
-	md.results.TransientSolution[1].Vy,\
-	md.results.TransientSolution[1].Vz,\
-	md.results.TransientSolution[1].Vel,\
-	md.results.TransientSolution[1].Base,\
-	md.results.TransientSolution[1].Surface,\
-	md.results.TransientSolution[1].Thickness,\
-	md.results.TransientSolution[1].Temperature,\
-	md.results.TransientSolution[1].SmbMassBalance,\
-	md.results.TransientSolution[1].TotalSmb,\
-	md.results.TransientSolution[2].Vx,\
-	md.results.TransientSolution[2].Vy,\
-	md.results.TransientSolution[2].Vz,\
-	md.results.TransientSolution[2].Vel,\
-	md.results.TransientSolution[2].Base,\
-	md.results.TransientSolution[2].Surface,\
-	md.results.TransientSolution[2].Thickness,\
-	md.results.TransientSolution[2].Temperature,\
-	md.results.TransientSolution[2].SmbMassBalance,\
-	md.results.TransientSolution[2].TotalSmb,\
-	]
+field_names     =['Vx1','Vy1','Vz1','Vel1',
+									'Bed1','Surface1','Thickness1',
+									'Temperature1','SMB1','TotalSmb1',
+									'Vx2','Vy2','Vz2','Vel2',
+									'Bed2','Surface2','Thickness2',
+									'Temperature2','SMB2','TotalSmb2',
+									'Vx3','Vy3','Vz3','Vel3',
+									'Bed3','Surface3','Thickness3',
+									'Temperature3','SMB3','TotalSmb3']
+field_tolerances=[1e-09,1e-09,1e-09,1e-09,
+									1e-10,1e-10,1e-10,
+									1e-10,1e-10,1e-10,
+									1e-09,1e-09,1e-10,1e-09,
+									1e-10,1e-10,1e-10,
+									1e-10,1e-10,1e-10,
+									1e-09,5e-09,1e-09,1e-09,
+									1e-10,1e-10,1e-10,
+									1e-10,1e-10,1e-10]
+field_values=[md.results.TransientSolution[0].Vx,
+							md.results.TransientSolution[0].Vy,
+							md.results.TransientSolution[0].Vz,
+							md.results.TransientSolution[0].Vel,
+							md.results.TransientSolution[0].Base,
+							md.results.TransientSolution[0].Surface,
+							md.results.TransientSolution[0].Thickness,
+							md.results.TransientSolution[0].Temperature,
+							md.results.TransientSolution[0].SmbMassBalance,
+							md.results.TransientSolution[0].TotalSmb,
+							md.results.TransientSolution[1].Vx,
+							md.results.TransientSolution[1].Vy,
+							md.results.TransientSolution[1].Vz,
+							md.results.TransientSolution[1].Vel,
+							md.results.TransientSolution[1].Base,
+							md.results.TransientSolution[1].Surface,
+							md.results.TransientSolution[1].Thickness,
+							md.results.TransientSolution[1].Temperature,
+							md.results.TransientSolution[1].SmbMassBalance,
+							md.results.TransientSolution[1].TotalSmb,
+							md.results.TransientSolution[2].Vx,
+							md.results.TransientSolution[2].Vy,
+							md.results.TransientSolution[2].Vz,
+							md.results.TransientSolution[2].Vel,
+							md.results.TransientSolution[2].Base,
+							md.results.TransientSolution[2].Surface,
+							md.results.TransientSolution[2].Thickness,
+							md.results.TransientSolution[2].Temperature,
+							md.results.TransientSolution[2].SmbMassBalance,
+							md.results.TransientSolution[2].TotalSmb]
Index: /issm/trunk-jpl/test/NightlyRun/test3300.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3300.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test3300.py	(revision 21408)
@@ -1,4 +1,5 @@
 import numpy as np
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -7,5 +8,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 from generic import generic
@@ -18,5 +19,5 @@
 md.transient.issmb=True
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',1)
+md.cluster=generic('name',gethostname(),'np',1)
 md.hydrology=hydrologydc()
 md.hydrology=md.hydrology.initialize(md)
@@ -26,13 +27,13 @@
 md.hydrology.sedimentlimit=400.0
 md.hydrology.sediment_thickness=20.0
-md.initialization.sediment_head=np.zeros((md.mesh.numberofvertices,1))
-md.hydrology.spcsediment_head=float('NaN')*np.ones((md.mesh.numberofvertices,1))
-md.basalforcings.groundedice_melting_rate = 2.0*np.ones((md.mesh.numberofvertices,1))
-md.hydrology.sediment_transmitivity=1.5e-4*np.ones((md.mesh.numberofvertices,1))
+md.initialization.sediment_head=np.zeros((md.mesh.numberofvertices))
+md.hydrology.spcsediment_head=float('NaN')*np.ones((md.mesh.numberofvertices))
+md.basalforcings.groundedice_melting_rate = 2.0*np.ones((md.mesh.numberofvertices))
+md.hydrology.sediment_transmitivity=1.5e-4*np.ones((md.mesh.numberofvertices))
 
-md.initialization.epl_head=np.zeros((md.mesh.numberofvertices,1))
-md.initialization.epl_thickness=np.ones((md.mesh.numberofvertices,1))
-md.hydrology.spcepl_head=float('NaN')*np.ones((md.mesh.numberofvertices,1))
-md.hydrology.mask_eplactive_node=np.zeros((md.mesh.numberofvertices,1))
+md.initialization.epl_head=np.zeros((md.mesh.numberofvertices))
+md.initialization.epl_thickness=np.ones((md.mesh.numberofvertices))
+md.hydrology.spcepl_head=float('NaN')*np.ones((md.mesh.numberofvertices))
+md.hydrology.mask_eplactive_node=np.zeros((md.mesh.numberofvertices))
 
 md.hydrology.epl_conductivity=1.5e-2
@@ -61,6 +62,6 @@
 totvol=np.zeros(4001)
 time=np.arange(0.002,8.001,0.002)
-store=md.constants.g*md.hydrology.sediment_porosity*md.materials.rho_freshwater*((md.hydrology.sediment_compressibility/md.hydrology.sediment_porosity)+md.hydrology.water_compressibility);
-sedstore=20.0*store;
+store=md.constants.g*md.hydrology.sediment_porosity*md.materials.rho_freshwater*((md.hydrology.sediment_compressibility/md.hydrology.sediment_porosity)+md.hydrology.water_compressibility)
+sedstore=20.0*store
 for i in range(0,4000):
 	sedvol[i]=np.mean(md.results.TransientSolution[i].SedimentHead)*sedstore
Index: /issm/trunk-jpl/test/NightlyRun/test332.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test332.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test332.py	(revision 21408)
@@ -1,5 +1,6 @@
 #Test Name: SquareSheetConstrainedHydrologyDC
-import numpy
+import numpy as np
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -8,5 +9,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 from generic import generic
@@ -20,5 +21,5 @@
 
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',1)
+md.cluster=generic('name',gethostname(),'np',1)
 md.hydrology=hydrologydc()
 md.hydrology=md.hydrology.initialize(md)
@@ -27,11 +28,11 @@
 md.hydrology.sedimentlimit_flag=1
 md.hydrology.sedimentlimit=8000.0
-md.initialization.sediment_head=numpy.zeros((md.mesh.numberofvertices,1))
-md.hydrology.spcsediment_head=float('NaN')*numpy.ones((md.mesh.numberofvertices,1))
-pos=numpy.nonzero(md.mesh.y==0.)[0]
+md.initialization.sediment_head=np.zeros((md.mesh.numberofvertices))
+md.hydrology.spcsediment_head=float('NaN')*np.ones((md.mesh.numberofvertices))
+pos=np.nonzero(md.mesh.y==0.)[0]
 md.hydrology.spcsediment_head[pos]=0.0
-md.basalforcings.groundedice_melting_rate = 2.0*numpy.ones((md.mesh.numberofvertices,1))
-md.basalforcings.floatingice_melting_rate = 0.0*numpy.ones((md.mesh.numberofvertices,1))
-md.hydrology.sediment_transmitivity= 3.0*numpy.ones((md.mesh.numberofvertices,1))
+md.basalforcings.groundedice_melting_rate = 2.0*np.ones((md.mesh.numberofvertices))
+md.basalforcings.floatingice_melting_rate = 0.0*np.ones((md.mesh.numberofvertices))
+md.hydrology.sediment_transmitivity= 3.0*np.ones((md.mesh.numberofvertices))
 md.timestepping.time_step=0
 md.timestepping.final_time=1.0
Index: /issm/trunk-jpl/test/NightlyRun/test333.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test333.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test333.py	(revision 21408)
@@ -2,4 +2,5 @@
 import numpy as np
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -8,5 +9,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 from generic import generic
@@ -19,5 +20,5 @@
 md.transient.issmb=True
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',1)
+md.cluster=generic('name',gethostname(),'np',1)
 md.hydrology=hydrologydc()
 md.hydrology=md.hydrology.initialize(md)
@@ -26,15 +27,15 @@
 md.hydrology.sedimentlimit_flag=1
 md.hydrology.sedimentlimit=800.0
-md.initialization.sediment_head=np.zeros((md.mesh.numberofvertices,1))
-md.hydrology.spcsediment_head=float('NaN')*np.ones((md.mesh.numberofvertices,1))
+md.initialization.sediment_head=np.zeros((md.mesh.numberofvertices))
+md.hydrology.spcsediment_head=float('NaN')*np.ones((md.mesh.numberofvertices))
 
-md.basalforcings.groundedice_melting_rate = 2.0*np.ones((md.mesh.numberofvertices,1))
-md.basalforcings.floatingice_melting_rate = 0.0*np.ones((md.mesh.numberofvertices,1))
-md.hydrology.sediment_transmitivity= 3.0*np.ones((md.mesh.numberofvertices,1))
+md.basalforcings.groundedice_melting_rate = 2.0*np.ones((md.mesh.numberofvertices))
+md.basalforcings.floatingice_melting_rate = 0.0*np.ones((md.mesh.numberofvertices))
+md.hydrology.sediment_transmitivity= 3.0*np.ones((md.mesh.numberofvertices))
 
-md.initialization.epl_head=np.zeros((md.mesh.numberofvertices,1))
-md.initialization.epl_thickness=np.ones((md.mesh.numberofvertices,1))
-md.hydrology.spcepl_head=float('NaN')*np.ones((md.mesh.numberofvertices,1))
-md.hydrology.mask_eplactive_node=np.zeros((md.mesh.numberofvertices,1))
+md.initialization.epl_head=np.zeros((md.mesh.numberofvertices))
+md.initialization.epl_thickness=np.ones((md.mesh.numberofvertices))
+md.hydrology.spcepl_head=float('NaN')*np.ones((md.mesh.numberofvertices))
+md.hydrology.mask_eplactive_node=np.zeros((md.mesh.numberofvertices))
 md.hydrology.epl_conductivity=30
 md.hydrology.epl_initial_thickness=1
@@ -50,6 +51,6 @@
 eplvol=np.zeros(10)
 time=np.arange(0.2,2.1,0.2)
-store=md.constants.g*md.hydrology.sediment_porosity*md.materials.rho_freshwater*((md.hydrology.sediment_compressibility/md.hydrology.sediment_porosity)+md.hydrology.water_compressibility);
-sedstore=20.0*store;
+store=md.constants.g*md.hydrology.sediment_porosity*md.materials.rho_freshwater*((md.hydrology.sediment_compressibility/md.hydrology.sediment_porosity)+md.hydrology.water_compressibility)
+sedstore=20.0*store
 for i in range(0,10):
 	sedvol[i]=np.mean(md.results.TransientSolution[i].SedimentHead)*sedstore
Index: /issm/trunk-jpl/test/NightlyRun/test334.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test334.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test334.py	(revision 21408)
@@ -2,4 +2,5 @@
 import numpy as np
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -8,5 +9,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 from generic import generic
@@ -18,5 +19,5 @@
 md.transient.ishydrology=True
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',1)
+md.cluster=generic('name',gethostname(),'np',1)
 md.hydrology=hydrologydc()
 md.hydrology=md.hydrology.initialize(md)
@@ -25,11 +26,11 @@
 md.hydrology.sedimentlimit_flag=1
 md.hydrology.sedimentlimit=8000.0
-md.initialization.sediment_head=np.zeros((md.mesh.numberofvertices,1))
-md.hydrology.spcsediment_head=float('NaN')*np.ones((md.mesh.numberofvertices,1))
+md.initialization.sediment_head=np.zeros((md.mesh.numberofvertices))
+md.hydrology.spcsediment_head=float('NaN')*np.ones((md.mesh.numberofvertices))
 md.hydrology.spcsediment_head[np.where(md.mesh.y==0)]=0.0
 
-md.basalforcings.groundedice_melting_rate = 2.0*np.ones((md.mesh.numberofvertices,1))
-md.basalforcings.floatingice_melting_rate = 0.0*np.ones((md.mesh.numberofvertices,1))
-md.hydrology.sediment_transmitivity= 3.0*np.ones((md.mesh.numberofvertices,1))
+md.basalforcings.groundedice_melting_rate = 2.0*np.ones((md.mesh.numberofvertices))
+md.basalforcings.floatingice_melting_rate = 0.0*np.ones((md.mesh.numberofvertices))
+md.hydrology.sediment_transmitivity= 3.0*np.ones((md.mesh.numberofvertices))
 
 md.timestepping.time_step=0
Index: /issm/trunk-jpl/test/NightlyRun/test335.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test335.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test335.py	(revision 21408)
@@ -2,4 +2,5 @@
 import numpy as np 
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -8,5 +9,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 from generic import generic
@@ -19,5 +20,5 @@
 md.transient.issmb=True
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',1)
+md.cluster=generic('name',gethostname(),'np',1)
 md.hydrology=hydrologydc()
 md.hydrology=md.hydrology.initialize(md)
@@ -26,14 +27,14 @@
 md.hydrology.sedimentlimit_flag=1
 md.hydrology.sedimentlimit=800.0
-md.initialization.sediment_head=np.zeros((md.mesh.numberofvertices,1))
-md.hydrology.spcsediment_head=float('NaN')*np.ones((md.mesh.numberofvertices,1))
-md.basalforcings.groundedice_melting_rate = 2.0*np.ones((md.mesh.numberofvertices,1))
-md.basalforcings.floatingice_melting_rate = np.zeros((md.mesh.numberofvertices,1))
-md.hydrology.sediment_transmitivity=3*np.ones((md.mesh.numberofvertices,1))
+md.initialization.sediment_head=np.zeros((md.mesh.numberofvertices))
+md.hydrology.spcsediment_head=float('NaN')*np.ones((md.mesh.numberofvertices))
+md.basalforcings.groundedice_melting_rate = 2.0*np.ones((md.mesh.numberofvertices))
+md.basalforcings.floatingice_melting_rate = np.zeros((md.mesh.numberofvertices))
+md.hydrology.sediment_transmitivity=3*np.ones((md.mesh.numberofvertices))
 
-md.initialization.epl_head=np.zeros((md.mesh.numberofvertices,1))
-md.initialization.epl_thickness=np.ones((md.mesh.numberofvertices,1))
-md.hydrology.spcepl_head=float('NaN')*np.ones((md.mesh.numberofvertices,1))
-md.hydrology.mask_eplactive_node=np.zeros((md.mesh.numberofvertices,1))
+md.initialization.epl_head=np.zeros((md.mesh.numberofvertices))
+md.initialization.epl_thickness=np.ones((md.mesh.numberofvertices))
+md.hydrology.spcepl_head=float('NaN')*np.ones((md.mesh.numberofvertices))
+md.hydrology.mask_eplactive_node=np.zeros((md.mesh.numberofvertices))
 md.hydrology.epl_conductivity=30
 md.hydrology.epl_initial_thickness=1
Index: /issm/trunk-jpl/test/NightlyRun/test336.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test336.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test336.py	(revision 21408)
@@ -1,5 +1,6 @@
 #Test Name: SquareSheetConstrainedSmbComponents2d
-import numpy
+import numpy as np
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -7,5 +8,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',150000.)
@@ -13,5 +14,5 @@
 md=parameterize(md,'../Par/SquareShelf.py')
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 
 md.timestepping.time_step=1.
@@ -20,11 +21,11 @@
 
 #Set up transient
-smb=numpy.ones((md.mesh.numberofvertices,1))*3.6
-smb=numpy.hstack((smb,smb*-1.))
+smb=np.ones((md.mesh.numberofvertices))*3.6
+smb=np.vstack((smb,smb*-1.)).T
 
-md.smb=SMBcomponents();
-md.smb.accumulation=numpy.vstack((smb*2, [1.5,3.]));
-md.smb.runoff=numpy.vstack((smb/2, [1.5,3.]));
-md.smb.evaporation=numpy.vstack((smb/2, [1.5,3.]));
+md.smb=SMBcomponents()
+md.smb.accumulation=np.vstack((smb*2, [1.5,3.]))
+md.smb.runoff=np.vstack((smb/2, [1.5,3.]))
+md.smb.evaporation=np.vstack((smb/2, [1.5,3.]))
 md.transient.isthermal=False
 
@@ -32,44 +33,42 @@
 
 #Fields and tolerances to track changes
-field_names=['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1', \
-	'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2', \
-	'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3', \
-	'Vx4','Vy4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassBalance4']
-field_tolerances=[1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,\
-	1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,\
-	1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,\
-	1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10]
-field_values=[\
-	md.results.TransientSolution[0].Vx,\
-	md.results.TransientSolution[0].Vy,\
-	md.results.TransientSolution[0].Vel,\
-	md.results.TransientSolution[0].Pressure,\
-	md.results.TransientSolution[0].Base,\
-	md.results.TransientSolution[0].Surface,\
-	md.results.TransientSolution[0].Thickness,\
-	md.results.TransientSolution[0].SmbMassBalance,\
-	md.results.TransientSolution[1].Vx,\
-	md.results.TransientSolution[1].Vy,\
-	md.results.TransientSolution[1].Vel,\
-	md.results.TransientSolution[1].Pressure,\
-	md.results.TransientSolution[1].Base,\
-	md.results.TransientSolution[1].Surface,\
-	md.results.TransientSolution[1].Thickness,\
-	md.results.TransientSolution[1].SmbMassBalance,\
-	md.results.TransientSolution[2].Vx,\
-	md.results.TransientSolution[2].Vy,\
-	md.results.TransientSolution[2].Vel,\
-	md.results.TransientSolution[2].Pressure,\
-	md.results.TransientSolution[2].Base,\
-	md.results.TransientSolution[2].Surface,\
-	md.results.TransientSolution[2].Thickness,\
-	md.results.TransientSolution[2].SmbMassBalance,\
-	md.results.TransientSolution[3].Vx,\
-	md.results.TransientSolution[3].Vy,\
-	md.results.TransientSolution[3].Vel,\
-	md.results.TransientSolution[3].Pressure,\
-	md.results.TransientSolution[3].Base,\
-	md.results.TransientSolution[3].Surface,\
-	md.results.TransientSolution[3].Thickness,\
-	md.results.TransientSolution[3].SmbMassBalance,\
-	]
+field_names=['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1',
+						 'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2',
+						 'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3',
+						 'Vx4','Vy4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassBalance4']
+field_tolerances=[1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,
+									1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,
+									1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,
+									1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10]
+field_values=[md.results.TransientSolution[0].Vx,
+							md.results.TransientSolution[0].Vy,
+							md.results.TransientSolution[0].Vel,
+							md.results.TransientSolution[0].Pressure,
+							md.results.TransientSolution[0].Base,
+							md.results.TransientSolution[0].Surface,
+							md.results.TransientSolution[0].Thickness,
+							md.results.TransientSolution[0].SmbMassBalance,
+							md.results.TransientSolution[1].Vx,
+							md.results.TransientSolution[1].Vy,
+							md.results.TransientSolution[1].Vel,
+							md.results.TransientSolution[1].Pressure,
+							md.results.TransientSolution[1].Base,
+							md.results.TransientSolution[1].Surface,
+							md.results.TransientSolution[1].Thickness,
+							md.results.TransientSolution[1].SmbMassBalance,
+							md.results.TransientSolution[2].Vx,
+							md.results.TransientSolution[2].Vy,
+							md.results.TransientSolution[2].Vel,
+							md.results.TransientSolution[2].Pressure,
+							md.results.TransientSolution[2].Base,
+							md.results.TransientSolution[2].Surface,
+							md.results.TransientSolution[2].Thickness,
+							md.results.TransientSolution[2].SmbMassBalance,
+							md.results.TransientSolution[3].Vx,
+							md.results.TransientSolution[3].Vy,
+							md.results.TransientSolution[3].Vel,
+							md.results.TransientSolution[3].Pressure,
+							md.results.TransientSolution[3].Base,
+							md.results.TransientSolution[3].Surface,
+							md.results.TransientSolution[3].Thickness,
+							md.results.TransientSolution[3].SmbMassBalance]
Index: /issm/trunk-jpl/test/NightlyRun/test337.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test337.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test337.py	(revision 21408)
@@ -1,5 +1,6 @@
 #Test Name: SquareSheetConstrainedSmbComponents3d
-import numpy
+import numpy as np
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -7,5 +8,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',150000.)
@@ -14,5 +15,5 @@
 md.extrude(3,1.)
 md=setflowequation(md,'HO','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 
 md.timestepping.time_step=1.
@@ -21,11 +22,11 @@
 
 #Set up transient
-smb=numpy.ones((md.mesh.numberofvertices,1))*3.6
-smb=numpy.hstack((smb,smb*-1.))
+smb=np.ones((md.mesh.numberofvertices))*3.6
+smb=np.vstack((smb,smb*-1.)).T
 
-md.smb=SMBcomponents();
-md.smb.accumulation=numpy.vstack((smb*2, [1.5,3.]));
-md.smb.runoff=numpy.vstack((smb/2, [1.5,3.]));
-md.smb.evaporation=numpy.vstack((smb/2, [1.5,3.]));
+md.smb=SMBcomponents()
+md.smb.accumulation=np.vstack((smb*2, [1.5,3.]))
+md.smb.runoff=np.vstack((smb/2, [1.5,3.]))
+md.smb.evaporation=np.vstack((smb/2, [1.5,3.]))
 md.transient.isthermal=False
 
@@ -33,45 +34,42 @@
 
 #Fields and tolerances to track changes
-field_names=['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1', \
-	'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2', \
-	'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3', \
-	'Vx4','Vy4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassBalance4']
-field_tolerances=[\
-		5e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,\
-		5e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,\
-		5e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,\
-		5e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10]
-field_values=[\
-	md.results.TransientSolution[0].Vx,\
-	md.results.TransientSolution[0].Vy,\
-	md.results.TransientSolution[0].Vel,\
-	md.results.TransientSolution[0].Pressure,\
-	md.results.TransientSolution[0].Base,\
-	md.results.TransientSolution[0].Surface,\
-	md.results.TransientSolution[0].Thickness,\
-	md.results.TransientSolution[0].SmbMassBalance,\
-	md.results.TransientSolution[1].Vx,\
-	md.results.TransientSolution[1].Vy,\
-	md.results.TransientSolution[1].Vel,\
-	md.results.TransientSolution[1].Pressure,\
-	md.results.TransientSolution[1].Base,\
-	md.results.TransientSolution[1].Surface,\
-	md.results.TransientSolution[1].Thickness,\
-	md.results.TransientSolution[1].SmbMassBalance,\
-	md.results.TransientSolution[2].Vx,\
-	md.results.TransientSolution[2].Vy,\
-	md.results.TransientSolution[2].Vel,\
-	md.results.TransientSolution[2].Pressure,\
-	md.results.TransientSolution[2].Base,\
-	md.results.TransientSolution[2].Surface,\
-	md.results.TransientSolution[2].Thickness,\
-	md.results.TransientSolution[2].SmbMassBalance,\
-	md.results.TransientSolution[3].Vx,\
-	md.results.TransientSolution[3].Vy,\
-	md.results.TransientSolution[3].Vel,\
-	md.results.TransientSolution[3].Pressure,\
-	md.results.TransientSolution[3].Base,\
-	md.results.TransientSolution[3].Surface,\
-	md.results.TransientSolution[3].Thickness,\
-	md.results.TransientSolution[3].SmbMassBalance,\
-	]
+field_names=['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1',
+						 'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2',
+						 'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3',
+						 'Vx4','Vy4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassBalance4']
+field_tolerances=[5e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,
+									5e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,
+									5e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,
+									5e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10]
+field_values=[md.results.TransientSolution[0].Vx,
+							md.results.TransientSolution[0].Vy,
+							md.results.TransientSolution[0].Vel,
+							md.results.TransientSolution[0].Pressure,
+							md.results.TransientSolution[0].Base,
+							md.results.TransientSolution[0].Surface,
+							md.results.TransientSolution[0].Thickness,
+							md.results.TransientSolution[0].SmbMassBalance,
+							md.results.TransientSolution[1].Vx,
+							md.results.TransientSolution[1].Vy,
+							md.results.TransientSolution[1].Vel,
+							md.results.TransientSolution[1].Pressure,
+							md.results.TransientSolution[1].Base,
+							md.results.TransientSolution[1].Surface,
+							md.results.TransientSolution[1].Thickness,
+							md.results.TransientSolution[1].SmbMassBalance,
+							md.results.TransientSolution[2].Vx,
+							md.results.TransientSolution[2].Vy,
+							md.results.TransientSolution[2].Vel,
+							md.results.TransientSolution[2].Pressure,
+							md.results.TransientSolution[2].Base,
+							md.results.TransientSolution[2].Surface,
+							md.results.TransientSolution[2].Thickness,
+							md.results.TransientSolution[2].SmbMassBalance,
+							md.results.TransientSolution[3].Vx,
+							md.results.TransientSolution[3].Vy,
+							md.results.TransientSolution[3].Vel,
+							md.results.TransientSolution[3].Pressure,
+							md.results.TransientSolution[3].Base,
+							md.results.TransientSolution[3].Surface,
+							md.results.TransientSolution[3].Thickness,
+							md.results.TransientSolution[3].SmbMassBalance]
Index: /issm/trunk-jpl/test/NightlyRun/test338.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test338.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test338.py	(revision 21408)
@@ -1,5 +1,6 @@
 #Test Name: SquareSheetConstrainedSmbMeltComponents2d
-import numpy
+import numpy as np
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -7,5 +8,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',150000.)
@@ -13,19 +14,19 @@
 md=parameterize(md,'../Par/SquareShelf.py')
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 
 md.timestepping.time_step=1.
 md.settings.output_frequency=1
-md.timestepping.final_time=4.
+md.timestepping.final_time=400.
 
 #Set up transient
-smb=numpy.ones((md.mesh.numberofvertices,1))*3.6
-smb=numpy.hstack((smb,smb*-1.))
+smb=np.ones((md.mesh.numberofvertices))*3.6
+smb=np.vstack((smb,smb*-1.)).T
 
-md.smb=SMBmeltcomponents();
-md.smb.accumulation=numpy.vstack((smb, [1.5,3.]));
-md.smb.evaporation=numpy.vstack((smb/2, [1.5,3.]));
-md.smb.melt=numpy.vstack((smb/2, [1.5,3.]));
-md.smb.refreeze=numpy.vstack((smb, [1.5,3.]));
+md.smb=SMBmeltcomponents()
+md.smb.accumulation=np.vstack((smb, [1.5,3.]))
+md.smb.evaporation=np.vstack((smb/2, [1.5,3.]))
+md.smb.melt=np.vstack((smb/2, [1.5,3.]))
+md.smb.refreeze=np.vstack((smb, [1.5,3.]))
 md.transient.isthermal=False
 
@@ -33,44 +34,42 @@
 
 #Fields and tolerances to track changes
-field_names=['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1', \
-	'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2', \
-	'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3', \
-	'Vx4','Vy4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassBalance4']
-field_tolerances=[1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,\
-	1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,\
-	1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,\
-	1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10]
-field_values=[\
-	md.results.TransientSolution[0].Vx,\
-	md.results.TransientSolution[0].Vy,\
-	md.results.TransientSolution[0].Vel,\
-	md.results.TransientSolution[0].Pressure,\
-	md.results.TransientSolution[0].Base,\
-	md.results.TransientSolution[0].Surface,\
-	md.results.TransientSolution[0].Thickness,\
-	md.results.TransientSolution[0].SmbMassBalance,\
-	md.results.TransientSolution[1].Vx,\
-	md.results.TransientSolution[1].Vy,\
-	md.results.TransientSolution[1].Vel,\
-	md.results.TransientSolution[1].Pressure,\
-	md.results.TransientSolution[1].Base,\
-	md.results.TransientSolution[1].Surface,\
-	md.results.TransientSolution[1].Thickness,\
-	md.results.TransientSolution[1].SmbMassBalance,\
-	md.results.TransientSolution[2].Vx,\
-	md.results.TransientSolution[2].Vy,\
-	md.results.TransientSolution[2].Vel,\
-	md.results.TransientSolution[2].Pressure,\
-	md.results.TransientSolution[2].Base,\
-	md.results.TransientSolution[2].Surface,\
-	md.results.TransientSolution[2].Thickness,\
-	md.results.TransientSolution[2].SmbMassBalance,\
-	md.results.TransientSolution[3].Vx,\
-	md.results.TransientSolution[3].Vy,\
-	md.results.TransientSolution[3].Vel,\
-	md.results.TransientSolution[3].Pressure,\
-	md.results.TransientSolution[3].Base,\
-	md.results.TransientSolution[3].Surface,\
-	md.results.TransientSolution[3].Thickness,\
-	md.results.TransientSolution[3].SmbMassBalance,\
-	]
+field_names=['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1',
+						 'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2',
+						 'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3',
+						 'Vx4','Vy4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassBalance4']
+field_tolerances=[1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,
+									1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,
+									1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,
+									1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10]
+field_values=[md.results.TransientSolution[0].Vx,
+							md.results.TransientSolution[0].Vy,
+							md.results.TransientSolution[0].Vel,
+							md.results.TransientSolution[0].Pressure,
+							md.results.TransientSolution[0].Base,
+							md.results.TransientSolution[0].Surface,
+							md.results.TransientSolution[0].Thickness,
+							md.results.TransientSolution[0].SmbMassBalance,
+							md.results.TransientSolution[1].Vx,
+							md.results.TransientSolution[1].Vy,
+							md.results.TransientSolution[1].Vel,
+							md.results.TransientSolution[1].Pressure,
+							md.results.TransientSolution[1].Base,
+							md.results.TransientSolution[1].Surface,
+							md.results.TransientSolution[1].Thickness,
+							md.results.TransientSolution[1].SmbMassBalance,
+							md.results.TransientSolution[2].Vx,
+							md.results.TransientSolution[2].Vy,
+							md.results.TransientSolution[2].Vel,
+							md.results.TransientSolution[2].Pressure,
+							md.results.TransientSolution[2].Base,
+							md.results.TransientSolution[2].Surface,
+							md.results.TransientSolution[2].Thickness,
+							md.results.TransientSolution[2].SmbMassBalance,
+							md.results.TransientSolution[3].Vx,
+							md.results.TransientSolution[3].Vy,
+							md.results.TransientSolution[3].Vel,
+							md.results.TransientSolution[3].Pressure,
+							md.results.TransientSolution[3].Base,
+							md.results.TransientSolution[3].Surface,
+							md.results.TransientSolution[3].Thickness,
+							md.results.TransientSolution[3].SmbMassBalance]
Index: /issm/trunk-jpl/test/NightlyRun/test339.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test339.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test339.py	(revision 21408)
@@ -1,5 +1,6 @@
 #Test Name: SquareSheetConstrainedSmbMeltComponents3d
-import numpy
+import numpy as np
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -7,5 +8,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',150000.)
@@ -14,5 +15,5 @@
 md.extrude(3,1.)
 md=setflowequation(md,'HO','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 
 md.timestepping.time_step=1.
@@ -21,12 +22,12 @@
 
 #Set up transient
-smb=numpy.ones((md.mesh.numberofvertices,1))*3.6
-smb=numpy.hstack((smb,smb*-1.))
+smb=np.ones((md.mesh.numberofvertices))*3.6
+smb=np.vstack((smb,smb*-1.)).T
 
-md.smb=SMBmeltcomponents();
-md.smb.accumulation=numpy.vstack((smb, [1.5,3.]));
-md.smb.evaporation=numpy.vstack((smb/2, [1.5,3.]));
-md.smb.melt=numpy.vstack((smb/2, [1.5,3.]));
-md.smb.refreeze=numpy.vstack((smb, [1.5,3.]));
+md.smb=SMBmeltcomponents()
+md.smb.accumulation=np.vstack((smb, [1.5,3.]))
+md.smb.evaporation=np.vstack((smb/2, [1.5,3.]))
+md.smb.melt=np.vstack((smb/2, [1.5,3.]))
+md.smb.refreeze=np.vstack((smb, [1.5,3.]))
 md.transient.isthermal=False
 
@@ -34,45 +35,42 @@
 
 #Fields and tolerances to track changes
-field_names=['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1', \
-	'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2', \
-	'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3', \
-	'Vx4','Vy4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassBalance4']
-field_tolerances=[\
-		1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,\
-		1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,\
-		1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,\
-		1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10]
-field_values=[\
-	md.results.TransientSolution[0].Vx,\
-	md.results.TransientSolution[0].Vy,\
-	md.results.TransientSolution[0].Vel,\
-	md.results.TransientSolution[0].Pressure,\
-	md.results.TransientSolution[0].Base,\
-	md.results.TransientSolution[0].Surface,\
-	md.results.TransientSolution[0].Thickness,\
-	md.results.TransientSolution[0].SmbMassBalance,\
-	md.results.TransientSolution[1].Vx,\
-	md.results.TransientSolution[1].Vy,\
-	md.results.TransientSolution[1].Vel,\
-	md.results.TransientSolution[1].Pressure,\
-	md.results.TransientSolution[1].Base,\
-	md.results.TransientSolution[1].Surface,\
-	md.results.TransientSolution[1].Thickness,\
-	md.results.TransientSolution[1].SmbMassBalance,\
-	md.results.TransientSolution[2].Vx,\
-	md.results.TransientSolution[2].Vy,\
-	md.results.TransientSolution[2].Vel,\
-	md.results.TransientSolution[2].Pressure,\
-	md.results.TransientSolution[2].Base,\
-	md.results.TransientSolution[2].Surface,\
-	md.results.TransientSolution[2].Thickness,\
-	md.results.TransientSolution[2].SmbMassBalance,\
-	md.results.TransientSolution[3].Vx,\
-	md.results.TransientSolution[3].Vy,\
-	md.results.TransientSolution[3].Vel,\
-	md.results.TransientSolution[3].Pressure,\
-	md.results.TransientSolution[3].Base,\
-	md.results.TransientSolution[3].Surface,\
-	md.results.TransientSolution[3].Thickness,\
-	md.results.TransientSolution[3].SmbMassBalance,\
-	]
+field_names=['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1',
+						 'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2',
+						 'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3',
+						 'Vx4','Vy4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassBalance4']
+field_tolerances=[1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,
+									1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,
+									1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,
+									1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10]
+field_values=[md.results.TransientSolution[0].Vx,
+							md.results.TransientSolution[0].Vy,
+							md.results.TransientSolution[0].Vel,
+							md.results.TransientSolution[0].Pressure,
+							md.results.TransientSolution[0].Base,
+							md.results.TransientSolution[0].Surface,
+							md.results.TransientSolution[0].Thickness,
+							md.results.TransientSolution[0].SmbMassBalance,
+							md.results.TransientSolution[1].Vx,
+							md.results.TransientSolution[1].Vy,
+							md.results.TransientSolution[1].Vel,
+							md.results.TransientSolution[1].Pressure,
+							md.results.TransientSolution[1].Base,
+							md.results.TransientSolution[1].Surface,
+							md.results.TransientSolution[1].Thickness,
+							md.results.TransientSolution[1].SmbMassBalance,
+							md.results.TransientSolution[2].Vx,
+							md.results.TransientSolution[2].Vy,
+							md.results.TransientSolution[2].Vel,
+							md.results.TransientSolution[2].Pressure,
+							md.results.TransientSolution[2].Base,
+							md.results.TransientSolution[2].Surface,
+							md.results.TransientSolution[2].Thickness,
+							md.results.TransientSolution[2].SmbMassBalance,
+							md.results.TransientSolution[3].Vx,
+							md.results.TransientSolution[3].Vy,
+							md.results.TransientSolution[3].Vel,
+							md.results.TransientSolution[3].Pressure,
+							md.results.TransientSolution[3].Base,
+							md.results.TransientSolution[3].Surface,
+							md.results.TransientSolution[3].Thickness,
+							md.results.TransientSolution[3].SmbMassBalance]
Index: /issm/trunk-jpl/test/NightlyRun/test341.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test341.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test341.py	(revision 21408)
@@ -1,5 +1,6 @@
 #Test Name: SquareSheetConstrainedCMm1qn3DragHO
-import numpy
+import numpy as np
 from model import *
+from socket import gethostname
 from m1qn3inversion import *
 from triangle import *
@@ -8,28 +9,28 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
 
-md=triangle(model(),'../Exp/Square.exp',200000.);
-md=setmask(md,'','');
-md=parameterize(md,'../Par/SquareSheetConstrained.py');
+
+md=triangle(model(),'../Exp/Square.exp',200000.)
+md=setmask(md,'','')
+md=parameterize(md,'../Par/SquareSheetConstrained.py')
 md.extrude(3,1.)
-md=setflowequation(md,'HO','all');
+md=setflowequation(md,'HO','all')
 
 #control parameters
-md.inversion=m1qn3inversion(md.inversion);
-md.inversion.iscontrol=1;
+md.inversion=m1qn3inversion(md.inversion)
+md.inversion.iscontrol=1
 md.inversion.control_parameters=['FrictionCoefficient']
-md.inversion.min_parameters=1.*numpy.ones((md.mesh.numberofvertices,1))
-md.inversion.max_parameters=200.*numpy.ones((md.mesh.numberofvertices,1))
+md.inversion.min_parameters=1.*np.ones((md.mesh.numberofvertices))
+md.inversion.max_parameters=200.*np.ones((md.mesh.numberofvertices))
 md.inversion.maxsteps=2
 md.inversion.maxiter=6
 md.inversion.cost_functions=[102,501]
-md.inversion.cost_functions_coefficients=numpy.ones((md.mesh.numberofvertices,2))
+md.inversion.cost_functions_coefficients=np.ones((md.mesh.numberofvertices,2))
 md.inversion.cost_functions_coefficients[:,1]=2.*10**-7
-md.inversion.vx_obs=md.initialization.vx;
-md.inversion.vy_obs=md.initialization.vy;
+md.inversion.vx_obs=md.initialization.vx
+md.inversion.vy_obs=md.initialization.vy
 
-md.cluster=generic('name',oshostname(),'np',3);
-md=solve(md,'Stressbalance');
+md.cluster=generic('name',gethostname(),'np',3)
+md=solve(md,'Stressbalance')
 
 #Fields and tolerances to track changes
Index: /issm/trunk-jpl/test/NightlyRun/test401.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test401.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test401.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: SquareSheetShelfStressSSA2d
-import numpy
+import numpy as np
 from model import *
-from MatlabFuncs import *
+from socket import gethostname
+
 from triangle import *
 from setmask import *
@@ -13,5 +14,5 @@
 md=parameterize(md,'../Par/SquareSheetShelf.py')
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Stressbalance')
 
Index: /issm/trunk-jpl/test/NightlyRun/test402.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test402.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test402.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: SquareSheetShelfStressSSA3d
-import numpy
+import numpy as np
 from model import *
-from MatlabFuncs import *
+from socket import gethostname
+
 from triangle import *
 from setmask import *
@@ -14,5 +15,5 @@
 md.extrude(4,1.)
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Stressbalance')
 
Index: /issm/trunk-jpl/test/NightlyRun/test403.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test403.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test403.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: SquareSheetShelfStressHO
-import numpy
+import numpy as np
 from model import *
-from MatlabFuncs import *
+from socket import gethostname
+
 from triangle import *
 from setmask import *
@@ -14,5 +15,5 @@
 md.extrude(5,1.)
 md=setflowequation(md,'HO','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Stressbalance')
 
Index: /issm/trunk-jpl/test/NightlyRun/test404.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test404.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test404.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: SquareSheetShelfStressFS
-import numpy
+import numpy as np
 from model import *
-from MatlabFuncs import *
+from socket import gethostname
+
 from triangle import *
 from setmask import *
@@ -14,5 +15,5 @@
 md.extrude(3,1.)
 md=setflowequation(md,'FS','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Stressbalance')
 
Index: /issm/trunk-jpl/test/NightlyRun/test405.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test405.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test405.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: SquareSheetShelfStressMHOPenalties
-import numpy
+import numpy as np
 from model import *
-from MatlabFuncs import *
+from socket import gethostname
+
 from triangle import *
 from setmask import *
@@ -14,5 +15,5 @@
 md.extrude(5,1.)
 md=setflowequation(md,'SSA','../Exp/SquareHalfRight.exp','fill','HO','coupling','penalties')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Stressbalance')
 
Index: /issm/trunk-jpl/test/NightlyRun/test406.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test406.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test406.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: SquareSheetShelfTherStea
-import numpy
+import numpy as np
 from model import *
-from MatlabFuncs import *
+from socket import gethostname
+
 from triangle import *
 from setmask import *
@@ -14,5 +15,5 @@
 md.extrude(4,1.)
 md=setflowequation(md,'HO','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md.timestepping.time_step=0.
 md=solve(md,'Thermal')
Index: /issm/trunk-jpl/test/NightlyRun/test407.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test407.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test407.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: SquareSheetShelfTherTran
-import numpy
+import numpy as np
 from model import *
-from MatlabFuncs import *
+from socket import gethostname
+
 from triangle import *
 from setmask import *
@@ -14,5 +15,5 @@
 md.extrude(4,1.)
 md=setflowequation(md,'HO','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md.transient.isstressbalance=False
 md.transient.ismasstransport=False
Index: /issm/trunk-jpl/test/NightlyRun/test408.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test408.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test408.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: SquareSheetShelfTranSSA3d
-import numpy
+import numpy as np
 from model import *
-from MatlabFuncs import *
+from socket import gethostname
+
 from triangle import *
 from setmask import *
@@ -15,5 +16,5 @@
 md=setflowequation(md,'SSA','all')
 md.transient.isthermal=False
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md.transient.requested_outputs=['default','GroundedArea','FloatingArea','TotalFloatingBmb','TotalGroundedBmb','TotalSmb']
 md=solve(md,'Transient')
Index: /issm/trunk-jpl/test/NightlyRun/test409.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test409.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test409.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: SquareSheetShelfTranMHOPenalties
-import numpy
+import numpy as np
 from model import *
-from MatlabFuncs import *
+from socket import gethostname
+
 from triangle import *
 from setmask import *
@@ -14,6 +15,6 @@
 md.extrude(3,1.)
 md=setflowequation(md,'SSA','../Exp/SquareHalfRight.exp','fill','HO','coupling','penalties')
-md.cluster=generic('name',oshostname(),'np',3)
-md.transient.requested_outputs=['default','GroundedArea'];
+md.cluster=generic('name',gethostname(),'np',3)
+md.transient.requested_outputs=['default','GroundedArea']
 md=solve(md,'Transient')
 
Index: /issm/trunk-jpl/test/NightlyRun/test410.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test410.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test410.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: SquareSheetShelfSteaSSA3d
-import numpy
+import numpy as np
 from model import *
-from MatlabFuncs import *
+from socket import gethostname
+
 from triangle import *
 from setmask import *
@@ -14,5 +15,5 @@
 md.extrude(3,2.)
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md.timestepping.time_step=0
 md=solve(md,'Steadystate')
Index: /issm/trunk-jpl/test/NightlyRun/test411.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test411.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test411.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: SquareSheetShelfSteaHO
-import numpy
+import numpy as np
 from model import *
-from MatlabFuncs import *
+from socket import gethostname
+
 from triangle import *
 from setmask import *
@@ -14,5 +15,5 @@
 md.extrude(3,2.)
 md=setflowequation(md,'HO','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md.timestepping.time_step=0.
 md=solve(md,'Steadystate')
Index: /issm/trunk-jpl/test/NightlyRun/test415.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test415.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test415.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: SquareSheetShelfCMDragSteaSSA3d
-import numpy
+import numpy as np
 from model import *
-from MatlabFuncs import *
+from socket import gethostname
+
 from triangle import *
 from setmask import *
@@ -18,18 +19,18 @@
 md.inversion.iscontrol=1
 md.inversion.control_parameters=['FrictionCoefficient']
-md.inversion.min_parameters=1.*numpy.ones((md.mesh.numberofvertices,1))
-md.inversion.max_parameters=200.*numpy.ones((md.mesh.numberofvertices,1))
+md.inversion.min_parameters=1.*np.ones((md.mesh.numberofvertices))
+md.inversion.max_parameters=200.*np.ones((md.mesh.numberofvertices))
 md.inversion.nsteps=2
 md.inversion.cost_functions=[103,501]
-md.inversion.cost_functions_coefficients=numpy.ones((md.mesh.numberofvertices,2))
+md.inversion.cost_functions_coefficients=np.ones((md.mesh.numberofvertices,2))
 md.inversion.cost_functions_coefficients[:,1]=2.*10**-7
-md.inversion.gradient_scaling=3.*numpy.ones((md.inversion.nsteps,1))
-md.inversion.maxiter_per_step=2*numpy.ones((md.inversion.nsteps,1))
-md.inversion.step_threshold=0.3*numpy.ones((md.inversion.nsteps,1))
+md.inversion.gradient_scaling=3.*np.ones((md.inversion.nsteps))
+md.inversion.maxiter_per_step=2*np.ones((md.inversion.nsteps))
+md.inversion.step_threshold=0.3*np.ones((md.inversion.nsteps))
 md.timestepping.time_step=0.
 md.inversion.vx_obs=md.initialization.vx
 md.inversion.vy_obs=md.initialization.vy
 
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Steadystate')
 
Index: /issm/trunk-jpl/test/NightlyRun/test416.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test416.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test416.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: SquareSheetShelfCMDragSteaHO
-import numpy
+import numpy as np
 from model import *
-from MatlabFuncs import *
+from socket import gethostname
+
 from triangle import *
 from setmask import *
@@ -18,18 +19,18 @@
 md.inversion.iscontrol=1
 md.inversion.control_parameters=['FrictionCoefficient']
-md.inversion.min_parameters=1.*numpy.ones((md.mesh.numberofvertices,1))
-md.inversion.max_parameters=200.*numpy.ones((md.mesh.numberofvertices,1))
+md.inversion.min_parameters=1.*np.ones((md.mesh.numberofvertices))
+md.inversion.max_parameters=200.*np.ones((md.mesh.numberofvertices))
 md.inversion.nsteps=2
 md.inversion.cost_functions=[102,501]
-md.inversion.cost_functions_coefficients=numpy.ones((md.mesh.numberofvertices,2))
+md.inversion.cost_functions_coefficients=np.ones((md.mesh.numberofvertices,2))
 md.inversion.cost_functions_coefficients[:,1]=2.*10**-7
-md.inversion.gradient_scaling=3.*numpy.ones((md.inversion.nsteps,1))
-md.inversion.maxiter_per_step=2*numpy.ones((md.inversion.nsteps,1))
-md.inversion.step_threshold=0.3*numpy.ones((md.inversion.nsteps,1))
+md.inversion.gradient_scaling=3.*np.ones((md.inversion.nsteps))
+md.inversion.maxiter_per_step=2*np.ones((md.inversion.nsteps))
+md.inversion.step_threshold=0.3*np.ones((md.inversion.nsteps))
 md.timestepping.time_step=0.
 md.inversion.vx_obs=md.initialization.vx
 md.inversion.vy_obs=md.initialization.vy
 
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Steadystate')
 
Index: /issm/trunk-jpl/test/NightlyRun/test419.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test419.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test419.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: SquareSheetShelfStressSSAHOTiling
-import numpy
+import numpy as np
 from model import *
-from MatlabFuncs import *
+from socket import gethostname
+
 from triangle import *
 from setmask import *
@@ -14,5 +15,5 @@
 md.extrude(5,1.)
 md=setflowequation(md,'SSA','../Exp/SquareHalfRight.exp','fill','HO')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Stressbalance')
 
Index: /issm/trunk-jpl/test/NightlyRun/test421.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test421.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test421.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: SquareSheetShelfStressHOFS3dTiling
-import numpy
+import numpy as np
 from model import *
-from MatlabFuncs import *
+from socket import gethostname
+
 from triangle import *
 from setmask import *
@@ -14,5 +15,5 @@
 md.extrude(5,1.)
 md=setflowequation(md,'FS','../Exp/SquareHalfRight.exp','fill','HO')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Stressbalance')
 
Index: /issm/trunk-jpl/test/NightlyRun/test422.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test422.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test422.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: SquareSheetShelfStressSSAFS3dTiling
-import numpy
+import numpy as np
 from model import *
-from MatlabFuncs import *
+from socket import gethostname
+
 from triangle import *
 from setmask import *
@@ -14,5 +15,5 @@
 md.extrude(5,1.)
 md=setflowequation(md,'FS','../Exp/SquareHalfRight.exp','fill','SSA')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md.stressbalance.reltol=0.4
 md=solve(md,'Stressbalance')
Index: /issm/trunk-jpl/test/NightlyRun/test423.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test423.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test423.py	(revision 21408)
@@ -1,5 +1,6 @@
 #Test Name: RoundSheetShelfGLMigrationSSA2d
-import numpy
+import numpy as np
 from model import *
+from socket import gethostname
 from roundmesh import *
 from setmask import *
@@ -7,5 +8,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 radius=1.e6
@@ -14,18 +15,18 @@
 md=roundmesh(model(),radius,50000.)
 #fix center node to 0,0
-rad=numpy.sqrt(md.mesh.x**2+md.mesh.y**2)
-pos=numpy.argmin(rad)
+rad=np.sqrt(md.mesh.x**2+md.mesh.y**2)
+pos=np.argmin(rad)
 md.mesh.x[pos]=0.
 md.mesh.y[pos]=0.    #the closest node to the center is changed to be exactly at the center
-xelem=numpy.mean(md.mesh.x[md.mesh.elements.astype(int)-1],axis=1)
-yelem=numpy.mean(md.mesh.y[md.mesh.elements.astype(int)-1],axis=1)
-rad=numpy.sqrt(xelem**2+yelem**2)
-flags=numpy.zeros(md.mesh.numberofelements)
-pos=numpy.nonzero(rad>=(radius-shelfextent))
+xelem=np.mean(md.mesh.x[md.mesh.elements.astype(int)-1],axis=1)
+yelem=np.mean(md.mesh.y[md.mesh.elements.astype(int)-1],axis=1)
+rad=np.sqrt(xelem**2+yelem**2)
+flags=np.zeros(md.mesh.numberofelements)
+pos=np.nonzero(rad>=(radius-shelfextent))
 flags[pos]=1
 md=setmask(md,flags,'') 
 md=parameterize(md,'../Par/RoundSheetShelf.py')
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 
 md.transient.isthermal=False
Index: /issm/trunk-jpl/test/NightlyRun/test424.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test424.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test424.py	(revision 21408)
@@ -1,6 +1,5 @@
 #Test Name: SquareSheetShelfGroundingLine2dAggressive
-import numpy
 from model import *
-from MatlabFuncs import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -15,6 +14,6 @@
 md.initialization.vx[:]=0.
 md.initialization.vy[:]=0.
-md.geometry.base=-700.-abs(md.mesh.y.reshape(-1,1)-500000.)/1000.
-md.geometry.bed =-700.-abs(md.mesh.y.reshape(-1,1)-500000.)/1000.
+md.geometry.base=-700.-abs(md.mesh.y-500000.)/1000.
+md.geometry.bed =-700.-abs(md.mesh.y-500000.)/1000.
 md.geometry.thickness[:]=1000.
 md.geometry.surface=md.geometry.base+md.geometry.thickness
@@ -25,32 +24,30 @@
 md.transient.requested_outputs=['IceVolume','IceVolumeAboveFloatation']
 
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Transient')
 
 #Fields and tolerances to track changes
-field_names     =['Bed1','Surface1','Thickness1','Floatingice1','IceVolume1','IceVolumeAboveFloatation1',\
-	'Bed2','Surface2','Thickness2','Floatingice2','IceVolume2','IceVolumeAboveFloatation2',\
-	'Bed3','Surface3','Thickness3','Floatingice3','IceVolume3','IceVolumeAboveFloatation3']
-field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
-	1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
-	1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]
-field_values=[\
-	md.results.TransientSolution[0].Base,\
-	md.results.TransientSolution[0].Surface,\
-	md.results.TransientSolution[0].Thickness,\
-	md.results.TransientSolution[0].MaskGroundediceLevelset,\
-	md.results.TransientSolution[0].IceVolume,\
-	md.results.TransientSolution[0].IceVolumeAboveFloatation,\
-	md.results.TransientSolution[1].Base,\
-	md.results.TransientSolution[1].Surface,\
-	md.results.TransientSolution[1].Thickness,\
-	md.results.TransientSolution[1].MaskGroundediceLevelset,\
-	md.results.TransientSolution[1].IceVolume,\
-	md.results.TransientSolution[1].IceVolumeAboveFloatation,\
-	md.results.TransientSolution[2].Base,\
-	md.results.TransientSolution[2].Surface,\
-	md.results.TransientSolution[2].Thickness,\
-	md.results.TransientSolution[2].MaskGroundediceLevelset,\
-	md.results.TransientSolution[2].IceVolume,\
-	md.results.TransientSolution[2].IceVolumeAboveFloatation,\
-	]
+field_names     =['Bed1','Surface1','Thickness1','Floatingice1','IceVolume1','IceVolumeAboveFloatation1',
+									'Bed2','Surface2','Thickness2','Floatingice2','IceVolume2','IceVolumeAboveFloatation2',
+									'Bed3','Surface3','Thickness3','Floatingice3','IceVolume3','IceVolumeAboveFloatation3']
+field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,
+									1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,
+									1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]
+field_values=[md.results.TransientSolution[0].Base,
+							md.results.TransientSolution[0].Surface,
+							md.results.TransientSolution[0].Thickness,
+							md.results.TransientSolution[0].MaskGroundediceLevelset,
+							md.results.TransientSolution[0].IceVolume,
+							md.results.TransientSolution[0].IceVolumeAboveFloatation,
+							md.results.TransientSolution[1].Base,
+							md.results.TransientSolution[1].Surface,
+							md.results.TransientSolution[1].Thickness,
+							md.results.TransientSolution[1].MaskGroundediceLevelset,
+							md.results.TransientSolution[1].IceVolume,
+							md.results.TransientSolution[1].IceVolumeAboveFloatation,
+							md.results.TransientSolution[2].Base,
+							md.results.TransientSolution[2].Surface,
+							md.results.TransientSolution[2].Thickness,
+							md.results.TransientSolution[2].MaskGroundediceLevelset,
+							md.results.TransientSolution[2].IceVolume,
+							md.results.TransientSolution[2].IceVolumeAboveFloatation]
Index: /issm/trunk-jpl/test/NightlyRun/test425.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test425.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test425.py	(revision 21408)
@@ -1,6 +1,5 @@
 #Test Name: SquareSheetShelfGroundingLine2dSoft
-import numpy
 from model import *
-from MatlabFuncs import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -15,6 +14,6 @@
 md.initialization.vx[:]=0.
 md.initialization.vy[:]=0.
-md.geometry.base=-700.-abs(md.mesh.y.reshape(-1,1)-500000.)/1000.
-md.geometry.bed =-700.-abs(md.mesh.y.reshape(-1,1)-500000.)/1000.
+md.geometry.base=-700.-abs(md.mesh.y-500000.)/1000.
+md.geometry.bed =-700.-abs(md.mesh.y-500000.)/1000.
 md.geometry.thickness[:]=1300.
 md.geometry.surface=md.geometry.base+md.geometry.thickness
@@ -24,26 +23,24 @@
 md.groundingline.migration='SoftMigration'
 
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Transient')
 
 #Fields and tolerances to track changes
-field_names     =['Bed1','Surface1','Thickness1','Floatingice1',\
-	'Bed2','Surface2','Thickness2','Floatingice2',\
-	'Bed3','Surface3','Thickness3','Floatingice3']
-field_tolerances=[1e-13,1e-13,1e-13,1e-13,\
-	1e-13,1e-13,1e-13,1e-13,\
-	1e-13,1e-13,1e-13,1e-13]
-field_values=[\
-	md.results.TransientSolution[0].Base,\
-	md.results.TransientSolution[0].Surface,\
-	md.results.TransientSolution[0].Thickness,\
-	md.results.TransientSolution[0].MaskGroundediceLevelset,\
-	md.results.TransientSolution[1].Base,\
-	md.results.TransientSolution[1].Surface,\
-	md.results.TransientSolution[1].Thickness,\
-	md.results.TransientSolution[1].MaskGroundediceLevelset,\
-	md.results.TransientSolution[2].Base,\
-	md.results.TransientSolution[2].Surface,\
-	md.results.TransientSolution[2].Thickness,\
-	md.results.TransientSolution[2].MaskGroundediceLevelset,\
-	]
+field_names     =['Bed1','Surface1','Thickness1','Floatingice1',
+									'Bed2','Surface2','Thickness2','Floatingice2',
+									'Bed3','Surface3','Thickness3','Floatingice3']
+field_tolerances=[1e-13,1e-13,1e-13,1e-13,
+									1e-13,1e-13,1e-13,1e-13,
+									1e-13,1e-13,1e-13,1e-13]
+field_values=[md.results.TransientSolution[0].Base,
+							md.results.TransientSolution[0].Surface,
+							md.results.TransientSolution[0].Thickness,
+							md.results.TransientSolution[0].MaskGroundediceLevelset,
+							md.results.TransientSolution[1].Base,
+							md.results.TransientSolution[1].Surface,
+							md.results.TransientSolution[1].Thickness,
+							md.results.TransientSolution[1].MaskGroundediceLevelset,
+							md.results.TransientSolution[2].Base,
+							md.results.TransientSolution[2].Surface,
+							md.results.TransientSolution[2].Thickness,
+							md.results.TransientSolution[2].MaskGroundediceLevelset]
Index: /issm/trunk-jpl/test/NightlyRun/test426.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test426.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test426.py	(revision 21408)
@@ -1,6 +1,5 @@
 #Test Name: SquareSheetShelfGroundingLine3dAggressive
-import numpy
 from model import *
-from MatlabFuncs import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -14,46 +13,44 @@
 md.initialization.vx[:]=0.
 md.initialization.vy[:]=0.
-md.geometry.base=-700.-abs(md.mesh.y.reshape(-1,1)-500000.)/1000.
-md.geometry.bed =-700.-abs(md.mesh.y.reshape(-1,1)-500000.)/1000.
+md.geometry.base=-700.-abs(md.mesh.y-500000.)/1000.
+md.geometry.bed =-700.-abs(md.mesh.y-500000.)/1000.
 md.geometry.thickness[:]=1000.
 md.geometry.surface=md.geometry.base+md.geometry.thickness
 md.smb.mass_balance[:]=100.
-md.extrude(3,1.);
-md=setflowequation(md,'SSA','all');
+md.extrude(3,1.)
+md=setflowequation(md,'SSA','all')
 md.transient.isstressbalance=False
 md.transient.isgroundingline=True
 md.groundingline.migration='AggressiveMigration'
 md.transient.requested_outputs=['IceVolume','IceVolumeAboveFloatation']
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 
 md=solve(md,'Transient')
 
 #Fields and tolerances to track changes
-field_names     =['Bed1','Surface1','Thickness1','Floatingice1','IceVolume1','IceVolumeAboveFloatation1',\
-	'Bed2','Surface2','Thickness2','Floatingice2','IceVolume2','IceVolumeAboveFloatation2',\
-	'Bed3','Surface3','Thickness3','Floatingice3','IceVolume3','IceVolumeAboveFloatation3',]
+field_names     =['Bed1','Surface1','Thickness1','Floatingice1','IceVolume1','IceVolumeAboveFloatation1',
+									'Bed2','Surface2','Thickness2','Floatingice2','IceVolume2','IceVolumeAboveFloatation2',
+									'Bed3','Surface3','Thickness3','Floatingice3','IceVolume3','IceVolumeAboveFloatation3',]
 
-field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
-	1e-11,1e-10,1e-11,3e-11,2e-12,5e-12,\
-	1e-10,1e-10,1e-10,5e-11,2e-12,5e-12]
+field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,
+									1e-11,1e-10,1e-11,3e-11,2e-12,5e-12,
+									1e-10,1e-10,1e-10,5e-11,2e-12,5e-12]
 
-field_values=[\
-	md.results.TransientSolution[0].Base,\
-	md.results.TransientSolution[0].Surface,\
-	md.results.TransientSolution[0].Thickness,\
-	md.results.TransientSolution[0].MaskGroundediceLevelset,\
-	md.results.TransientSolution[0].IceVolume,\
-	md.results.TransientSolution[0].IceVolumeAboveFloatation,\
-	md.results.TransientSolution[1].Base,\
-	md.results.TransientSolution[1].Surface,\
-	md.results.TransientSolution[1].Thickness,\
-	md.results.TransientSolution[1].MaskGroundediceLevelset,\
-	md.results.TransientSolution[1].IceVolume,\
-	md.results.TransientSolution[1].IceVolumeAboveFloatation,\
-	md.results.TransientSolution[2].Base,\
-	md.results.TransientSolution[2].Surface,\
-	md.results.TransientSolution[2].Thickness,\
-	md.results.TransientSolution[2].MaskGroundediceLevelset,\
-	md.results.TransientSolution[2].IceVolume,\
-	md.results.TransientSolution[2].IceVolumeAboveFloatation,\
-	]
+field_values=[md.results.TransientSolution[0].Base,
+							md.results.TransientSolution[0].Surface,
+							md.results.TransientSolution[0].Thickness,
+							md.results.TransientSolution[0].MaskGroundediceLevelset,
+							md.results.TransientSolution[0].IceVolume,
+							md.results.TransientSolution[0].IceVolumeAboveFloatation,
+							md.results.TransientSolution[1].Base,
+							md.results.TransientSolution[1].Surface,
+							md.results.TransientSolution[1].Thickness,
+							md.results.TransientSolution[1].MaskGroundediceLevelset,
+							md.results.TransientSolution[1].IceVolume,
+							md.results.TransientSolution[1].IceVolumeAboveFloatation,
+							md.results.TransientSolution[2].Base,
+							md.results.TransientSolution[2].Surface,
+							md.results.TransientSolution[2].Thickness,
+							md.results.TransientSolution[2].MaskGroundediceLevelset,
+							md.results.TransientSolution[2].IceVolume,
+							md.results.TransientSolution[2].IceVolumeAboveFloatation]
Index: /issm/trunk-jpl/test/NightlyRun/test427.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test427.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test427.py	(revision 21408)
@@ -1,7 +1,6 @@
 #Test Name: SquareSheetShelfGroundingLine3dSoft
-import numpy
 from model import *
-from MatlabFuncs import *
-from triangle import *
+from socket import gethostname
+
 from setmask import *
 from parameterize import *
@@ -14,6 +13,6 @@
 md.initialization.vx[:]=0.
 md.initialization.vy[:]=0.
-md.geometry.base=-700.-abs(md.mesh.y.reshape(-1,1)-500000.)/1000.
-md.geometry.bed =-700.-abs(md.mesh.y.reshape(-1,1)-500000.)/1000.
+md.geometry.base=-700.-abs(md.mesh.y-500000.)/1000.
+md.geometry.bed =-700.-abs(md.mesh.y-500000.)/1000.
 md.geometry.thickness[:]=1300
 md.geometry.surface=md.geometry.base+md.geometry.thickness
@@ -25,26 +24,24 @@
 md.transient.isgroundingline=True
 md.groundingline.migration='SoftMigration'
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Transient')
 
 #Fields and tolerances to track changes
-field_names     =['Bed1','Surface1','Thickness1','Floatingice1',\
-	'Bed2','Surface2','Thickness2','Floatingice2',\
-	'Bed3','Surface3','Thickness3','Floatingice3']
-field_tolerances=[1e-13,1e-13,1e-13,1e-13,\
-	5e-12,3e-12,7e-12,2e-11,\
-	1e-10,5e-11,1e-10,7e-10]
-field_values=[\
-	md.results.TransientSolution[0].Base,\
-	md.results.TransientSolution[0].Surface,\
-	md.results.TransientSolution[0].Thickness,\
-	md.results.TransientSolution[0].MaskGroundediceLevelset,\
-	md.results.TransientSolution[1].Base,\
-	md.results.TransientSolution[1].Surface,\
-	md.results.TransientSolution[1].Thickness,\
-	md.results.TransientSolution[1].MaskGroundediceLevelset,\
-	md.results.TransientSolution[2].Base,\
-	md.results.TransientSolution[2].Surface,\
-	md.results.TransientSolution[2].Thickness,\
-	md.results.TransientSolution[2].MaskGroundediceLevelset,\
-	]
+field_names     =['Bed1','Surface1','Thickness1','Floatingice1',
+									'Bed2','Surface2','Thickness2','Floatingice2',
+									'Bed3','Surface3','Thickness3','Floatingice3']
+field_tolerances=[1e-13,1e-13,1e-13,1e-13,
+									5e-12,3e-12,7e-12,2e-11,
+									1e-10,5e-11,1e-10,7e-10]
+field_values=[md.results.TransientSolution[0].Base,
+							md.results.TransientSolution[0].Surface,
+							md.results.TransientSolution[0].Thickness,
+							md.results.TransientSolution[0].MaskGroundediceLevelset,
+							md.results.TransientSolution[1].Base,
+							md.results.TransientSolution[1].Surface,
+							md.results.TransientSolution[1].Thickness,
+							md.results.TransientSolution[1].MaskGroundediceLevelset,
+							md.results.TransientSolution[2].Base,
+							md.results.TransientSolution[2].Surface,
+							md.results.TransientSolution[2].Thickness,
+							md.results.TransientSolution[2].MaskGroundediceLevelset]
Index: /issm/trunk-jpl/test/NightlyRun/test428.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test428.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test428.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: SquareSheetShelfStressSSA2dNewton
-import numpy
+import numpy as np
 from model import *
-from MatlabFuncs import *
+from socket import gethostname
+
 from triangle import *
 from setmask import *
@@ -15,5 +16,5 @@
 md.stressbalance.isnewton=1
 md.stressbalance.restol=0.0001
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Stressbalance')
 
Index: /issm/trunk-jpl/test/NightlyRun/test429.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test429.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test429.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: SquareSheetShelfStressHONewton
-import numpy
+import numpy as np
 from model import *
-from MatlabFuncs import *
+from socket import gethostname
+
 from triangle import *
 from setmask import *
@@ -16,5 +17,5 @@
 md.stressbalance.isnewton=1
 md.stressbalance.restol=0.0001
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Stressbalance')
 
Index: /issm/trunk-jpl/test/NightlyRun/test431.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test431.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test431.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: SquareSheetShelfSteaEnthalpySSA3d
-import numpy
+import numpy as np
 from model import *
-from MatlabFuncs import *
+from socket import gethostname
+
 from triangle import *
 from setmask import *
@@ -14,10 +15,10 @@
 md.extrude(3,2.)
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md.timestepping.time_step=0.
 md.thermal.isenthalpy=1
 md.thermal.isdynamicbasalspc=1
-md.initialization.waterfraction=numpy.zeros((md.mesh.numberofvertices,1))
-md.initialization.watercolumn=numpy.zeros((md.mesh.numberofvertices,1))
+md.initialization.waterfraction=np.zeros((md.mesh.numberofvertices))
+md.initialization.watercolumn=np.zeros((md.mesh.numberofvertices))
 md=solve(md,'Steadystate')
 
Index: /issm/trunk-jpl/test/NightlyRun/test432.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test432.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test432.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: SquareSheetShelfSteaEnthalpyHO
-import numpy
+import numpy as np
 from model import *
-from MatlabFuncs import *
+from socket import gethostname
+
 from triangle import *
 from setmask import *
@@ -14,9 +15,9 @@
 md.extrude(3,2.)
 md=setflowequation(md,'HO','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md.timestepping.time_step=0.
 md.thermal.isenthalpy=1
-md.initialization.waterfraction=numpy.zeros((md.mesh.numberofvertices,1))
-md.initialization.watercolumn=numpy.zeros((md.mesh.numberofvertices,1))
+md.initialization.waterfraction=np.zeros((md.mesh.numberofvertices))
+md.initialization.watercolumn=np.zeros((md.mesh.numberofvertices))
 md=solve(md,'Steadystate')
 
Index: /issm/trunk-jpl/test/NightlyRun/test433.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test433.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test433.py	(revision 21408)
@@ -1,5 +1,6 @@
 #Test Name: RoundSheetShelfGLMigrationSSA3d
-import numpy
+import numpy as np
 from model import *
+from socket import gethostname
 from roundmesh import *
 from setmask import *
@@ -7,5 +8,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 radius=1.e6
@@ -14,13 +15,13 @@
 md=roundmesh(model(),radius,50000.)
 #fix center node to 0,0
-rad=numpy.sqrt(md.mesh.x**2+md.mesh.y**2)
-pos=numpy.argmin(rad)
+rad=np.sqrt(md.mesh.x**2+md.mesh.y**2)
+pos=np.argmin(rad)
 md.mesh.x[pos]=0.
 md.mesh.y[pos]=0.    #the closest node to the center is changed to be exactly at the center
-xelem=numpy.mean(md.mesh.x[md.mesh.elements.astype(int)-1],axis=1)
-yelem=numpy.mean(md.mesh.y[md.mesh.elements.astype(int)-1],axis=1)
-rad=numpy.sqrt(xelem**2+yelem**2)
-flags=numpy.zeros(md.mesh.numberofelements)
-pos=numpy.nonzero(rad>=(radius-shelfextent))
+xelem=np.mean(md.mesh.x[md.mesh.elements.astype(int)-1],axis=1)
+yelem=np.mean(md.mesh.y[md.mesh.elements.astype(int)-1],axis=1)
+rad=np.sqrt(xelem**2+yelem**2)
+flags=np.zeros(md.mesh.numberofelements)
+pos=np.nonzero(rad>=(radius-shelfextent))
 flags[pos]=1
 md=setmask(md,flags,'') 
@@ -28,5 +29,5 @@
 md=setflowequation(md,'SSA','all')
 md.extrude(3,1.)
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 
 md.transient.isthermal=False
Index: /issm/trunk-jpl/test/NightlyRun/test434.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test434.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test434.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: SquareSheetShelfL1L2
-import numpy
+import numpy as np
 from model import *
-from MatlabFuncs import *
+from socket import gethostname
+
 from triangle import *
 from setmask import *
@@ -14,5 +15,5 @@
 md.extrude(4,1.)
 md=setflowequation(md,'L1L2','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Stressbalance')
 
Index: /issm/trunk-jpl/test/NightlyRun/test450.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test450.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test450.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: SquareSheetShelfStressSSAHigherOrder
-import numpy
+import numpy as np
 from model import *
-from MatlabFuncs import *
+from socket import gethostname
+
 from triangle import *
 from setmask import *
@@ -13,5 +14,5 @@
 md=parameterize(md,'../Par/SquareSheetShelf.py')
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 
 field_names=[]
Index: /issm/trunk-jpl/test/NightlyRun/test455.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test455.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test455.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: SquareSheetShelfStressHOHigherOrder
-import numpy
+import numpy as np
 from model import *
-from MatlabFuncs import *
+from socket import gethostname
+
 from triangle import *
 from setmask import *
@@ -14,5 +15,5 @@
 md.extrude(5,1.)
 md=setflowequation(md,'HO','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 
 field_names=[]
Index: /issm/trunk-jpl/test/NightlyRun/test501.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test501.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test501.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: PigStressSSA2d
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Pig.exp',20000.)
@@ -12,5 +13,5 @@
 md=parameterize(md,'../Par/Pig.py')
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Stressbalance')
 
Index: /issm/trunk-jpl/test/NightlyRun/test502.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test502.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test502.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: PigStressHO
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Pig.exp',20000.)
@@ -13,5 +14,5 @@
 md.extrude(3,0.9)
 md=setflowequation(md,'HO','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Stressbalance')
 
Index: /issm/trunk-jpl/test/NightlyRun/test503.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test503.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test503.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: PigStressFS
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Pig.exp',20000.)
@@ -13,5 +14,5 @@
 md.extrude(3,0.9)
 md=setflowequation(md,'FS','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Stressbalance')
 
Index: /issm/trunk-jpl/test/NightlyRun/test504.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test504.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test504.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: PigTranSSA2d
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Pig.exp',20000.)
@@ -12,5 +13,5 @@
 md=parameterize(md,'../Par/Pig.py')
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Transient')
 
Index: /issm/trunk-jpl/test/NightlyRun/test505.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test505.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test505.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: PigTranSSA3d
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Pig.exp',30000.)
@@ -13,5 +14,5 @@
 md.extrude(3,1.)
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Transient')
 
Index: /issm/trunk-jpl/test/NightlyRun/test506.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test506.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test506.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: PigTranHO
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Pig.exp',30000.)
@@ -13,5 +14,5 @@
 md.extrude(2,1.)
 md=setflowequation(md,'HO','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Transient')
 
Index: /issm/trunk-jpl/test/NightlyRun/test507.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test507.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test507.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: PigTranFS
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Pig.exp',30000.)
@@ -13,5 +14,5 @@
 md.extrude(2,1.)
 md=setflowequation(md,'FS','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Transient')
 
Index: /issm/trunk-jpl/test/NightlyRun/test508.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test508.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test508.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: PigSteaSSA3d
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Pig.exp',35000.)
@@ -13,5 +14,5 @@
 md.extrude(3,1.1)
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md.timestepping.time_step=0.
 md=solve(md,'Steadystate')
Index: /issm/trunk-jpl/test/NightlyRun/test509.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test509.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test509.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: PigSteaHO
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Pig.exp',30000.)
@@ -13,5 +14,5 @@
 md.extrude(3,1.)
 md=setflowequation(md,'HO','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md.timestepping.time_step=0.
 md.thermal.penalty_threshold=7
Index: /issm/trunk-jpl/test/NightlyRun/test510.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test510.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test510.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: PigSteaFS
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Pig.exp',20000.)
@@ -13,5 +14,5 @@
 md.extrude(2,1.)
 md=setflowequation(md,'FS','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md.timestepping.time_step=0.
 md=solve(md,'Steadystate')
Index: /issm/trunk-jpl/test/NightlyRun/test511.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test511.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test511.py	(revision 21408)
@@ -1,5 +1,6 @@
 #Test Name: PigCMBFS
-import numpy
+import numpy as np
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -7,5 +8,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Pig.exp',11000.)
@@ -23,16 +24,16 @@
 md.inversion.iscontrol=1
 md.inversion.control_parameters=['MaterialsRheologyBbar']
-md.inversion.min_parameters=10.**6*numpy.ones((md.mesh.numberofvertices,1))
-md.inversion.max_parameters=2.*10**9*numpy.ones((md.mesh.numberofvertices,1))
+md.inversion.min_parameters=10.**6*np.ones((md.mesh.numberofvertices))
+md.inversion.max_parameters=2.*10**9*np.ones((md.mesh.numberofvertices))
 md.inversion.nsteps=2
 md.inversion.cost_functions=[101]
-md.inversion.cost_functions_coefficients=numpy.ones((md.mesh.numberofvertices,1))
-md.inversion.gradient_scaling=10.**8*numpy.ones((md.inversion.nsteps,1))
-md.inversion.maxiter_per_step=2.*numpy.ones((md.inversion.nsteps,1))
-md.inversion.step_threshold=0.99*numpy.ones((md.inversion.nsteps,1))
+md.inversion.cost_functions_coefficients=np.ones((md.mesh.numberofvertices))
+md.inversion.gradient_scaling=10.**8*np.ones((md.inversion.nsteps))
+md.inversion.maxiter_per_step=2.*np.ones((md.inversion.nsteps))
+md.inversion.step_threshold=0.99*np.ones((md.inversion.nsteps))
 md.inversion.vx_obs=md.initialization.vx
 md.inversion.vy_obs=md.initialization.vy
 
-md.cluster=generic('name',oshostname(),'np',1)
+md.cluster=generic('name',gethostname(),'np',1)
 md=solve(md,'Stressbalance')
 
Index: /issm/trunk-jpl/test/NightlyRun/test512.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test512.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test512.py	(revision 21408)
@@ -1,5 +1,6 @@
 #Test Name: PigCMDragHO
-import numpy
+import numpy as np
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -7,5 +8,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Pig.exp',20000.)
@@ -18,17 +19,17 @@
 md.inversion.iscontrol=1
 md.inversion.control_parameters=['FrictionCoefficient']
-md.inversion.min_parameters=1.*numpy.ones((md.mesh.numberofvertices,1))
-md.inversion.max_parameters=200.*numpy.ones((md.mesh.numberofvertices,1))
+md.inversion.min_parameters=1.*np.ones((md.mesh.numberofvertices))
+md.inversion.max_parameters=200.*np.ones((md.mesh.numberofvertices))
 md.inversion.nsteps=2
 md.inversion.cost_functions=[103,501]
-md.inversion.cost_functions_coefficients=numpy.ones((md.mesh.numberofvertices,2))
+md.inversion.cost_functions_coefficients=np.ones((md.mesh.numberofvertices,2))
 md.inversion.cost_functions_coefficients[:,1]=2.*10**-7
-md.inversion.gradient_scaling=3.*numpy.ones((md.inversion.nsteps,1))
-md.inversion.maxiter_per_step=2.*numpy.ones((md.inversion.nsteps,1))
-md.inversion.step_threshold=2.99*numpy.ones((md.inversion.nsteps,1))
+md.inversion.gradient_scaling=3.*np.ones((md.inversion.nsteps))
+md.inversion.maxiter_per_step=2.*np.ones((md.inversion.nsteps))
+md.inversion.step_threshold=2.99*np.ones((md.inversion.nsteps))
 md.inversion.vx_obs=md.initialization.vx
 md.inversion.vy_obs=md.initialization.vy
 
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Stressbalance')
 
Index: /issm/trunk-jpl/test/NightlyRun/test513.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test513.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test513.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: PigCMDragSteaSSA3d
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Pig.exp',30000.)
@@ -17,13 +18,13 @@
 md.inversion.iscontrol=1
 md.inversion.control_parameters=['FrictionCoefficient']
-md.inversion.min_parameters=1.*numpy.ones((md.mesh.numberofvertices,1))
-md.inversion.max_parameters=200.*numpy.ones((md.mesh.numberofvertices,1))
+md.inversion.min_parameters=1.*np.ones((md.mesh.numberofvertices))
+md.inversion.max_parameters=200.*np.ones((md.mesh.numberofvertices))
 md.inversion.nsteps=2
 md.inversion.cost_functions=[103,501]
-md.inversion.cost_functions_coefficients=numpy.ones((md.mesh.numberofvertices,2))
+md.inversion.cost_functions_coefficients=np.ones((md.mesh.numberofvertices,2))
 md.inversion.cost_functions_coefficients[:,1]=2.*10**-7
-md.inversion.gradient_scaling=3.*numpy.ones((md.inversion.nsteps,1))
-md.inversion.maxiter_per_step=2.*numpy.ones((md.inversion.nsteps,1))
-md.inversion.step_threshold=0.99*numpy.ones((md.inversion.nsteps,1))
+md.inversion.gradient_scaling=3.*np.ones((md.inversion.nsteps))
+md.inversion.maxiter_per_step=2.*np.ones((md.inversion.nsteps))
+md.inversion.step_threshold=0.99*np.ones((md.inversion.nsteps))
 md.inversion.vx_obs=md.initialization.vx
 md.inversion.vy_obs=md.initialization.vy
@@ -31,5 +32,5 @@
 
 md.thermal.penalty_lock=5
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Steadystate')
 
Index: /issm/trunk-jpl/test/NightlyRun/test514.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test514.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test514.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: PigBamgMesh
-import numpy
+import numpy as np
 import copy
 from model import *
+from socket import gethostname
 from bamg import *
 from setmask import *
@@ -8,8 +9,8 @@
 from ComputeHessian import *
 from ComputeMetric import *
-from MatlabFuncs import *
+
 
 #Simple mesh 1
-hVertices=10000.*numpy.ones((27,1))
+hVertices=10000.*np.ones((27))
 hVertices[0:5]=1000.
 md=bamg(model(),'domain','../Exp/Pig.exp','hmax',20000.,'hVertices',hVertices,'gradation',3.,'geometricalmetric',1)
@@ -38,6 +39,6 @@
 
 #refine existing mesh 3
-hVertices=float('nan')*numpy.ones((md.mesh.numberofvertices,1))
-hVertices[numpy.nonzero(md.mesh.vertexonboundary)]=500.
+hVertices=float('nan')*np.ones((md.mesh.numberofvertices))
+hVertices[np.nonzero(md.mesh.vertexonboundary)]=500.
 md2=bamg(copy.deepcopy(md),'metric',md.miscellaneous.dummy,'hmin',1000.,'hmax',20000.,'gradation',3.,'geometricalmetric',1,'anisomax',1.,'hVertices',hVertices)
 x5=md2.mesh.x
@@ -45,10 +46,10 @@
 
 #refine existing mesh 4
-md2=bamg(copy.deepcopy(md),'field',md.inversion.vy_obs,'hmin',1000.,'hmax',20000.,'gradation',3.,'geometricalmetric',1,'Hessiantype',0,'err',numpy.array([[1.]]))
+md2=bamg(copy.deepcopy(md),'field',md.inversion.vy_obs,'hmin',1000.,'hmax',20000.,'gradation',3.,'geometricalmetric',1,'Hessiantype',0,'err',np.array([[1.]]))
 x6=md2.mesh.x
 y6=md2.mesh.y
 
 #refine existing mesh 5
-md2=bamg(copy.deepcopy(md),'field',numpy.hstack((md.inversion.vy_obs,md.geometry.thickness)),'hmin',1000.,'hmax',20000.,'gradation',3.,'geometricalmetric',1,'Hessiantype',1,'err',numpy.array([[10.,100.]])) 
+md2=bamg(copy.deepcopy(md),'field',np.hstack((md.inversion.vy_obs,md.geometry.thickness)),'hmin',1000.,'hmax',20000.,'gradation',3.,'geometricalmetric',1,'Hessiantype',1,'err',np.array([[10.,100.]])) 
 x7=md2.mesh.x
 y7=md2.mesh.y
Index: /issm/trunk-jpl/test/NightlyRun/test515.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test515.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test515.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: PigTherTranSUPG
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Pig.exp',30000.)
@@ -14,5 +15,5 @@
 md=setflowequation(md,'HO','all')
 md.thermal.stabilization=2
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md.transient.isstressbalance=False
 md.transient.ismasstransport=False
Index: /issm/trunk-jpl/test/NightlyRun/test516.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test516.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test516.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: PigTherSteaSUPG
-import numpy
+import numpy as np
 from model import *
-from MatlabFuncs import *
+from socket import gethostname
+
 from triangle import *
 from setmask import *
@@ -15,5 +16,5 @@
 md=setflowequation(md,'HO','all')
 md.thermal.stabilization=2
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md.timestepping.time_step=0
 md.thermal.penalty_threshold=40
Index: /issm/trunk-jpl/test/NightlyRun/test530.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test530.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test530.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: PigBalVel1
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Pig.exp',20000.)
@@ -12,5 +13,5 @@
 md=parameterize(md,'../Par/Pig.py')
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Balancevelocity')
 
Index: /issm/trunk-jpl/test/NightlyRun/test531.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test531.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test531.py	(revision 21408)
@@ -1,4 +1,5 @@
 #Test Name: PigBalVel2
 from model import *
+from socket import gethostname
 from triangle import *
 from setmask import *
@@ -6,5 +7,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Pig.exp',20000.)
@@ -14,5 +15,5 @@
 md.initialization.vy[:]=0.
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Balancevelocity')
 
Index: /issm/trunk-jpl/test/NightlyRun/test601.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test601.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test601.py	(revision 21408)
@@ -1,5 +1,6 @@
 #Test Name: 79NorthMasstransp2d
 from model import *
-from MatlabFuncs import *
+from socket import gethostname
+
 from triangle import *
 from setmask import *
@@ -12,5 +13,5 @@
 md=parameterize(md,'../Par/79North.py')
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Masstransport')
 
Index: /issm/trunk-jpl/test/NightlyRun/test602.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test602.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test602.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: 79NorthMasstransp2dDG
-import numpy
+import numpy as np
 from model import *
-from MatlabFuncs import *
+from socket import gethostname
+
 from triangle import *
 from meshconvert import *
@@ -17,5 +18,5 @@
 md.masstransport.stabilization=3
 md.masstransport.spcthickness=md.geometry.thickness
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Masstransport')
 
Index: /issm/trunk-jpl/test/NightlyRun/test603.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test603.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test603.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: 79NorthMasstransp3d
-import numpy
+import numpy as np
 from model import *
-from MatlabFuncs import *
+from socket import gethostname
+
 from triangle import *
 from setmask import *
@@ -14,5 +15,5 @@
 md.extrude(6,1.)
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Masstransport')
 
Index: /issm/trunk-jpl/test/NightlyRun/test604.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test604.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test604.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: 79NorthSurfSlop2d
-import numpy
+import numpy as np
 from model import *
-from MatlabFuncs import *
+from socket import gethostname
+
 from triangle import *
 from setmask import *
@@ -13,5 +14,5 @@
 md=parameterize(md,'../Par/79North.py')
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'SurfaceSlope')
 
Index: /issm/trunk-jpl/test/NightlyRun/test605.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test605.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test605.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: 79NorthSurfSlop3d
-import numpy
+import numpy as np
 from model import *
-from MatlabFuncs import *
+from socket import gethostname
+
 from triangle import *
 from setmask import *
@@ -14,5 +15,5 @@
 md.extrude(5,1.5)
 md=setflowequation(md,'HO','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'SurfaceSlope')
 
Index: /issm/trunk-jpl/test/NightlyRun/test606.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test606.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test606.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: 79NorthBedSlop2d
-import numpy
+import numpy as np
 from model import *
-from MatlabFuncs import *
+from socket import gethostname
+
 from triangle import *
 from setmask import *
@@ -13,5 +14,5 @@
 md=parameterize(md,'../Par/79North.py')
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'BedSlope')
 
Index: /issm/trunk-jpl/test/NightlyRun/test607.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test607.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test607.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: 79NorthBedSlop3d
-import numpy
+import numpy as np
 from model import *
-from MatlabFuncs import *
+from socket import gethostname
+
 from triangle import *
 from setmask import *
@@ -14,5 +15,5 @@
 md.extrude(2,1.)
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'BedSlope')
 
Index: /issm/trunk-jpl/test/NightlyRun/test608.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test608.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test608.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: 79NorthBalThic2d
-import numpy
+import numpy as np
 from model import *
-from MatlabFuncs import *
+from socket import gethostname
+
 from triangle import *
 from setmask import *
@@ -13,5 +14,5 @@
 md=parameterize(md,'../Par/79North.py')
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Balancethickness')
 
Index: /issm/trunk-jpl/test/NightlyRun/test611.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test611.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test611.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: 79NorthCMBalThic2dCG
-import numpy
+import numpy as np
 from model import *
-from MatlabFuncs import *
+from socket import gethostname
+
 from triangle import *
 from setmask import *
@@ -20,13 +21,13 @@
 md.inversion.control_parameters=['BalancethicknessThickeningRate']
 md.inversion.thickness_obs=md.geometry.thickness
-md.inversion.min_parameters=-50.*numpy.ones((md.mesh.numberofvertices,1))
-md.inversion.max_parameters=50.*numpy.ones((md.mesh.numberofvertices,1))
+md.inversion.min_parameters=-50.*np.ones((md.mesh.numberofvertices))
+md.inversion.max_parameters=50.*np.ones((md.mesh.numberofvertices))
 md.inversion.cost_functions=[201]
-md.inversion.cost_functions_coefficients=numpy.ones((md.mesh.numberofvertices,1))
-md.inversion.gradient_scaling=10./md.constants.yts*numpy.ones((md.inversion.nsteps,1))
-md.inversion.maxiter_per_step=4*numpy.ones((md.inversion.nsteps,1))
-md.inversion.step_threshold=0.99*numpy.ones((md.inversion.nsteps,1))
+md.inversion.cost_functions_coefficients=np.ones((md.mesh.numberofvertices))
+md.inversion.gradient_scaling=10./md.constants.yts*np.ones((md.inversion.nsteps))
+md.inversion.maxiter_per_step=4*np.ones((md.inversion.nsteps))
+md.inversion.step_threshold=0.99*np.ones((md.inversion.nsteps))
 
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Balancethickness')
 
Index: /issm/trunk-jpl/test/NightlyRun/test613.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test613.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test613.py	(revision 21408)
@@ -1,6 +1,7 @@
 #Test Name: 79NorthCMBalThicVxVy
-import numpy
+import numpy as np
 import copy
 from model import *
+from socket import gethostname
 from triangle import *
 from meshconvert import *
@@ -9,5 +10,5 @@
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/79North.exp',10000.)
@@ -19,5 +20,5 @@
 #Ice sheet only
 md=md.extract(md.mask.groundedice_levelset>0.)
-pos=numpy.nonzero(md.mesh.vertexonboundary)
+pos=np.nonzero(md.mesh.vertexonboundary)
 md.balancethickness.spcthickness[pos]=md.geometry.thickness[pos]
 
@@ -28,14 +29,14 @@
 md.inversion.control_parameters=['Vx','Vy']
 md.balancethickness.stabilization=1
-md.inversion.gradient_scaling=numpy.hstack((10./md.constants.yts*numpy.ones((md.inversion.nsteps,1)),10./md.constants.yts*numpy.ones((md.inversion.nsteps,1))))
-md.inversion.min_parameters=numpy.hstack((-2000.*numpy.ones((md.mesh.numberofvertices,1)),-2000.*numpy.ones((md.mesh.numberofvertices,1))))
-md.inversion.max_parameters=numpy.hstack((+2000.*numpy.ones((md.mesh.numberofvertices,1)),+2000.*numpy.ones((md.mesh.numberofvertices,1))))
+md.inversion.gradient_scaling=np.vstack((10./md.constants.yts*np.ones((md.inversion.nsteps)),10./md.constants.yts*np.ones((md.inversion.nsteps)))).T
+md.inversion.min_parameters=np.vstack((-2000.*np.ones((md.mesh.numberofvertices)),-2000.*np.ones((md.mesh.numberofvertices)))).T
+md.inversion.max_parameters=np.vstack((+2000.*np.ones((md.mesh.numberofvertices)),+2000.*np.ones((md.mesh.numberofvertices)))).T
 md.inversion.cost_functions=[201]
-md.inversion.cost_functions_coefficients=numpy.ones((md.mesh.numberofvertices,1))
-md.inversion.maxiter_per_step=4*numpy.ones((md.inversion.nsteps,1))
-md.inversion.step_threshold=0.99*numpy.ones((md.inversion.nsteps,1))
+md.inversion.cost_functions_coefficients=np.ones((md.mesh.numberofvertices))
+md.inversion.maxiter_per_step=4*np.ones((md.inversion.nsteps))
+md.inversion.step_threshold=0.99*np.ones((md.inversion.nsteps))
 
 md.verbose.control=1
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 md=solve(md,'Balancethickness')
 
@@ -43,10 +44,8 @@
 field_names     =['Gradient1','Gradient2','Misfits','Vx','Vy','Thickness']
 field_tolerances=[1e-12,1e-12,1e-12,1e-12,1e-12,1e-12]
-field_values=[\
-	md.results.BalancethicknessSolution.Gradient1,\
-	md.results.BalancethicknessSolution.Gradient2,\
-	md.results.BalancethicknessSolution.J,\
-	md.results.BalancethicknessSolution.Vx,\
-	md.results.BalancethicknessSolution.Vy,\
-	md.results.BalancethicknessSolution.Thickness,\
-]
+field_values=[md.results.BalancethicknessSolution.Gradient1,
+							md.results.BalancethicknessSolution.Gradient2,
+							md.results.BalancethicknessSolution.J,
+							md.results.BalancethicknessSolution.Vx,
+							md.results.BalancethicknessSolution.Vy,
+							md.results.BalancethicknessSolution.Thickness]
Index: /issm/trunk-jpl/test/NightlyRun/test801.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test801.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test801.py	(revision 21408)
@@ -1,11 +1,11 @@
 #Test Name: ValleyGlacierLevelsetSSA2d
 from model import *
+from socket import gethostname
 from triangle import *
-from squaremesh import *
 from setmask import *
 from parameterize import *
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',50000)
@@ -13,5 +13,5 @@
 md=parameterize(md,'../Par/ValleyGlacierShelf.py')
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 
 #Transient
@@ -27,31 +27,29 @@
 
 #Fields and tolerances to track changes
-field_names     =['Vx1','Vy1','Vel1','Pressure1','Thickness1','Surface1','MaskIceLevelset1',\
-		'Vx2','Vy2','Vel2','Pressure2','Thickness2','Surface2','MaskIceLevelset2',\
-		'Vx3','Vy3','Vel3','Pressure3','Thickness3','Surface3','MaskIceLevelset3']
-field_tolerances=[1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,\
-		1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,\
-		1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12]
-field_values=[\
-	md.results.TransientSolution[0].Vx,\
-	md.results.TransientSolution[0].Vy,\
-	md.results.TransientSolution[0].Vel,\
-	md.results.TransientSolution[0].Pressure,\
-	md.results.TransientSolution[0].Thickness,\
-	md.results.TransientSolution[0].Surface,\
-	md.results.TransientSolution[0].MaskIceLevelset,\
-	md.results.TransientSolution[1].Vx,\
-	md.results.TransientSolution[1].Vy,\
-	md.results.TransientSolution[1].Vel,\
-	md.results.TransientSolution[1].Pressure,\
-	md.results.TransientSolution[1].Thickness,\
-	md.results.TransientSolution[1].Surface,\
-	md.results.TransientSolution[1].MaskIceLevelset,\
-	md.results.TransientSolution[2].Vx,\
-	md.results.TransientSolution[2].Vy,\
-	md.results.TransientSolution[2].Vel,\
-	md.results.TransientSolution[2].Pressure,\
-	md.results.TransientSolution[2].Thickness,\
-	md.results.TransientSolution[2].Surface,\
-	md.results.TransientSolution[2].MaskIceLevelset,\
-	]
+field_names     =['Vx1','Vy1','Vel1','Pressure1','Thickness1','Surface1','MaskIceLevelset1',
+									'Vx2','Vy2','Vel2','Pressure2','Thickness2','Surface2','MaskIceLevelset2',
+									'Vx3','Vy3','Vel3','Pressure3','Thickness3','Surface3','MaskIceLevelset3']
+field_tolerances=[1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,
+									1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,
+									1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12]
+field_values=[md.results.TransientSolution[0].Vx,
+							md.results.TransientSolution[0].Vy,
+							md.results.TransientSolution[0].Vel,
+							md.results.TransientSolution[0].Pressure,
+							md.results.TransientSolution[0].Thickness,
+							md.results.TransientSolution[0].Surface,
+							md.results.TransientSolution[0].MaskIceLevelset,
+							md.results.TransientSolution[1].Vx,
+							md.results.TransientSolution[1].Vy,
+							md.results.TransientSolution[1].Vel,
+							md.results.TransientSolution[1].Pressure,
+							md.results.TransientSolution[1].Thickness,
+							md.results.TransientSolution[1].Surface,
+							md.results.TransientSolution[1].MaskIceLevelset,
+							md.results.TransientSolution[2].Vx,
+							md.results.TransientSolution[2].Vy,
+							md.results.TransientSolution[2].Vel,
+							md.results.TransientSolution[2].Pressure,
+							md.results.TransientSolution[2].Thickness,
+							md.results.TransientSolution[2].Surface,
+							md.results.TransientSolution[2].MaskIceLevelset]
Index: /issm/trunk-jpl/test/NightlyRun/test802.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test802.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test802.py	(revision 21408)
@@ -1,11 +1,11 @@
 #Test Name: ValleyGlacierLevelsetThermalSSA3d
 from model import *
+from socket import gethostname
 from triangle import *
-from squaremesh import *
 from setmask import *
 from parameterize import *
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',50000)
@@ -14,8 +14,8 @@
 md.extrude(3,2.)
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 
 #Thermal model
-pos_surf=numpy.nonzero(md.mesh.vertexonsurface)[0]
+pos_surf=np.nonzero(md.mesh.vertexonsurface)[0]
 md.thermal.spctemperature[pos_surf]=md.initialization.temperature[pos_surf]
 
@@ -32,34 +32,32 @@
 
 #Fields and tolerances to track changes
-field_names     =['Vx1','Vy1','Vel1','Pressure1','Thickness1','Surface1','MaskIceLevelset1','Temperature1',\
-		'Vx2','Vy2','Vel2','Pressure2','Thickness2','Surface2','MaskIceLevelset2','Temperature2',\
-		'Vx3','Vy3','Vel3','Pressure3','Thickness3','Surface3','MaskIceLevelset3','Temperature3']
-field_tolerances=[1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,\
-		1e-9,1e-9,1e-10,1e-10,1e-10,1e-10,1e-10,1e-9,\
-		1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10]
-field_values=[\
-	md.results.TransientSolution[0].Vx,\
-	md.results.TransientSolution[0].Vy,\
-	md.results.TransientSolution[0].Vel,\
-	md.results.TransientSolution[0].Pressure,\
-	md.results.TransientSolution[0].Thickness,\
-	md.results.TransientSolution[0].Surface,\
-	md.results.TransientSolution[0].MaskIceLevelset,\
-	md.results.TransientSolution[0].Temperature,\
-	md.results.TransientSolution[1].Vx,\
-	md.results.TransientSolution[1].Vy,\
-	md.results.TransientSolution[1].Vel,\
-	md.results.TransientSolution[1].Pressure,\
-	md.results.TransientSolution[1].Thickness,\
-	md.results.TransientSolution[1].Surface,\
-	md.results.TransientSolution[1].MaskIceLevelset,\
-	md.results.TransientSolution[1].Temperature,\
-	md.results.TransientSolution[2].Vx,\
-	md.results.TransientSolution[2].Vy,\
-	md.results.TransientSolution[2].Vel,\
-	md.results.TransientSolution[2].Pressure,\
-	md.results.TransientSolution[2].Thickness,\
-	md.results.TransientSolution[2].Surface,\
-	md.results.TransientSolution[2].MaskIceLevelset,\
-	md.results.TransientSolution[2].Temperature,\
-	]
+field_names     =['Vx1','Vy1','Vel1','Pressure1','Thickness1','Surface1','MaskIceLevelset1','Temperature1',
+									'Vx2','Vy2','Vel2','Pressure2','Thickness2','Surface2','MaskIceLevelset2','Temperature2',
+									'Vx3','Vy3','Vel3','Pressure3','Thickness3','Surface3','MaskIceLevelset3','Temperature3']
+field_tolerances=[1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,
+									1e-9,1e-9,1e-10,1e-10,1e-10,1e-10,1e-10,1e-9,
+									1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10]
+field_values=[md.results.TransientSolution[0].Vx,
+							md.results.TransientSolution[0].Vy,
+							md.results.TransientSolution[0].Vel,
+							md.results.TransientSolution[0].Pressure,
+							md.results.TransientSolution[0].Thickness,
+							md.results.TransientSolution[0].Surface,
+							md.results.TransientSolution[0].MaskIceLevelset,
+							md.results.TransientSolution[0].Temperature,
+							md.results.TransientSolution[1].Vx,
+							md.results.TransientSolution[1].Vy,
+							md.results.TransientSolution[1].Vel,
+							md.results.TransientSolution[1].Pressure,
+							md.results.TransientSolution[1].Thickness,
+							md.results.TransientSolution[1].Surface,
+							md.results.TransientSolution[1].MaskIceLevelset,
+							md.results.TransientSolution[1].Temperature,
+							md.results.TransientSolution[2].Vx,
+							md.results.TransientSolution[2].Vy,
+							md.results.TransientSolution[2].Vel,
+							md.results.TransientSolution[2].Pressure,
+							md.results.TransientSolution[2].Thickness,
+							md.results.TransientSolution[2].Surface,
+							md.results.TransientSolution[2].MaskIceLevelset,
+							md.results.TransientSolution[2].Temperature]
Index: /issm/trunk-jpl/test/NightlyRun/test803.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test803.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test803.py	(revision 21408)
@@ -1,11 +1,11 @@
 #Test Name: ValleyGlacierLevelsetEnthalpyHO3d
 from model import *
+from socket import gethostname
 from triangle import *
-from squaremesh import *
 from setmask import *
 from parameterize import *
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',50000)
@@ -14,8 +14,8 @@
 md.extrude(3,2.)
 md=setflowequation(md,'HO','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 
 #Thermal model
-pos_surf=numpy.nonzero(md.mesh.vertexonsurface)[0]
+pos_surf=np.nonzero(md.mesh.vertexonsurface)[0]
 md.thermal.spctemperature[pos_surf]=md.initialization.temperature[pos_surf]
 md.thermal.isenthalpy=True
@@ -34,37 +34,35 @@
 
 #Fields and tolerances to track changes
-field_names     =['Vx1','Vy1','Vel1','Pressure1','Thickness1','Surface1','MaskIceLevelset1','Enthalpy1','Watercolumn1',\
-		'Vx2','Vy2','Vel2','Pressure2','Thickness2','Surface2','MaskIceLevelset2','Enthalpy2','Watercolumn2',\
-		'Vx3','Vy3','Vel3','Pressure3','Thickness3','Surface3','MaskIceLevelset3','Enthalpy3','Watercolumn3']
-field_tolerances=[1e-10,1e-10,1e-10,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
-		1e-9,1e-9,1e-10,1e-10,1e-10,1e-10,1e-10,1e-9,1e-10,\
-		1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10]
-field_values=[\
-	md.results.TransientSolution[0].Vx,\
-	md.results.TransientSolution[0].Vy,\
-	md.results.TransientSolution[0].Vel,\
-	md.results.TransientSolution[0].Pressure,\
-	md.results.TransientSolution[0].Thickness,\
-	md.results.TransientSolution[0].Surface,\
-	md.results.TransientSolution[0].MaskIceLevelset,\
-	md.results.TransientSolution[0].Enthalpy,\
-	md.results.TransientSolution[0].Watercolumn,\
-	md.results.TransientSolution[1].Vx,\
-	md.results.TransientSolution[1].Vy,\
-	md.results.TransientSolution[1].Vel,\
-	md.results.TransientSolution[1].Pressure,\
-	md.results.TransientSolution[1].Thickness,\
-	md.results.TransientSolution[1].Surface,\
-	md.results.TransientSolution[1].MaskIceLevelset,\
-	md.results.TransientSolution[1].Enthalpy,\
-	md.results.TransientSolution[1].Watercolumn,\
-	md.results.TransientSolution[2].Vx,\
-	md.results.TransientSolution[2].Vy,\
-	md.results.TransientSolution[2].Vel,\
-	md.results.TransientSolution[2].Pressure,\
-	md.results.TransientSolution[2].Thickness,\
-	md.results.TransientSolution[2].Surface,\
-	md.results.TransientSolution[2].MaskIceLevelset,\
-	md.results.TransientSolution[2].Enthalpy,\
-	md.results.TransientSolution[2].Watercolumn,\
-	]
+field_names     =['Vx1','Vy1','Vel1','Pressure1','Thickness1','Surface1','MaskIceLevelset1','Enthalpy1','Watercolumn1',
+									'Vx2','Vy2','Vel2','Pressure2','Thickness2','Surface2','MaskIceLevelset2','Enthalpy2','Watercolumn2',
+									'Vx3','Vy3','Vel3','Pressure3','Thickness3','Surface3','MaskIceLevelset3','Enthalpy3','Watercolumn3']
+field_tolerances=[1e-10,1e-10,1e-10,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,
+									1e-9,1e-9,1e-10,1e-10,1e-10,1e-10,1e-10,1e-9,1e-10,
+									1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10]
+field_values=[md.results.TransientSolution[0].Vx,
+							md.results.TransientSolution[0].Vy,
+							md.results.TransientSolution[0].Vel,
+							md.results.TransientSolution[0].Pressure,
+							md.results.TransientSolution[0].Thickness,
+							md.results.TransientSolution[0].Surface,
+							md.results.TransientSolution[0].MaskIceLevelset,
+							md.results.TransientSolution[0].Enthalpy,
+							md.results.TransientSolution[0].Watercolumn,
+							md.results.TransientSolution[1].Vx,
+							md.results.TransientSolution[1].Vy,
+							md.results.TransientSolution[1].Vel,
+							md.results.TransientSolution[1].Pressure,
+							md.results.TransientSolution[1].Thickness,
+							md.results.TransientSolution[1].Surface,
+							md.results.TransientSolution[1].MaskIceLevelset,
+							md.results.TransientSolution[1].Enthalpy,
+							md.results.TransientSolution[1].Watercolumn,
+							md.results.TransientSolution[2].Vx,
+							md.results.TransientSolution[2].Vy,
+							md.results.TransientSolution[2].Vel,
+							md.results.TransientSolution[2].Pressure,
+							md.results.TransientSolution[2].Thickness,
+							md.results.TransientSolution[2].Surface,
+							md.results.TransientSolution[2].MaskIceLevelset,
+							md.results.TransientSolution[2].Enthalpy,
+							md.results.TransientSolution[2].Watercolumn]
Index: /issm/trunk-jpl/test/NightlyRun/test804.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test804.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test804.py	(revision 21408)
@@ -1,11 +1,11 @@
 #Test Name: ValleyGlacierLevelsetCalvingSIA2d
 from model import *
+from socket import gethostname
 from triangle import *
-from squaremesh import *
 from setmask import *
 from parameterize import *
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',50000)
@@ -13,5 +13,5 @@
 md=parameterize(md,'../Par/ValleyGlacierShelf.py')
 md=setflowequation(md,'SIA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 
 #Transient
@@ -22,40 +22,37 @@
 md.transient.isgroundingline=True
 md.transient.isgia=False
-md.transient.ismovingfront=True;
+md.transient.ismovingfront=True
 
-md.calving.calvingrate=1000.*numpy.ones((md.mesh.numberofvertices,1))
-md.calving.meltingrate=numpy.zeros((md.mesh.numberofvertices,1))
+md.calving.calvingrate=1000.*np.ones((md.mesh.numberofvertices))
+md.calving.meltingrate=np.zeros((md.mesh.numberofvertices))
 
 md=solve(md,'Transient')
 
 #Fields and tolerances to track changes
-field_names     =['Vx1','Vy1','Vel1','Pressure1','Thickness1','Surface1','MaskIceLevelset1',\
-		'Vx2','Vy2','Vel2','Pressure2','Thickness2','Surface2','MaskIceLevelset2',\
-		'Vx3','Vy3','Vel3','Pressure3','Thickness3','Surface3','MaskIceLevelset3']
-field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
-		2e-13,2e-13,2e-13,1e-13,1e-13,1e-13,1e-13,\
-		2e-13,2e-13,2e-13,1e-13,1e-13,1e-13,1e-13]
-field_values=[\
-	md.results.TransientSolution[0].Vx,\
-	md.results.TransientSolution[0].Vy,\
-	md.results.TransientSolution[0].Vel,\
-	md.results.TransientSolution[0].Pressure,\
-	md.results.TransientSolution[0].Thickness,\
-	md.results.TransientSolution[0].Surface,\
-	md.results.TransientSolution[0].MaskIceLevelset,\
-	md.results.TransientSolution[1].Vx,\
-	md.results.TransientSolution[1].Vy,\
-	md.results.TransientSolution[1].Vel,\
-	md.results.TransientSolution[1].Pressure,\
-	md.results.TransientSolution[1].Thickness,\
-	md.results.TransientSolution[1].Surface,\
-	md.results.TransientSolution[1].MaskIceLevelset,\
-	md.results.TransientSolution[2].Vx,\
-	md.results.TransientSolution[2].Vy,\
-	md.results.TransientSolution[2].Vel,\
-	md.results.TransientSolution[2].Pressure,\
-	md.results.TransientSolution[2].Thickness,\
-	md.results.TransientSolution[2].Surface,\
-	md.results.TransientSolution[2].MaskIceLevelset,\
-
-	]
+field_names     =['Vx1','Vy1','Vel1','Pressure1','Thickness1','Surface1','MaskIceLevelset1',
+									'Vx2','Vy2','Vel2','Pressure2','Thickness2','Surface2','MaskIceLevelset2',
+									'Vx3','Vy3','Vel3','Pressure3','Thickness3','Surface3','MaskIceLevelset3']
+field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,
+									2e-13,2e-13,2e-13,1e-13,1e-13,1e-13,1e-13,
+									2e-13,2e-13,2e-13,1e-13,1e-13,1e-13,1e-13]
+field_values=[md.results.TransientSolution[0].Vx,
+							md.results.TransientSolution[0].Vy,
+							md.results.TransientSolution[0].Vel,
+							md.results.TransientSolution[0].Pressure,
+							md.results.TransientSolution[0].Thickness,
+							md.results.TransientSolution[0].Surface,
+							md.results.TransientSolution[0].MaskIceLevelset,
+							md.results.TransientSolution[1].Vx,
+							md.results.TransientSolution[1].Vy,
+							md.results.TransientSolution[1].Vel,
+							md.results.TransientSolution[1].Pressure,
+							md.results.TransientSolution[1].Thickness,
+							md.results.TransientSolution[1].Surface,
+							md.results.TransientSolution[1].MaskIceLevelset,
+							md.results.TransientSolution[2].Vx,
+							md.results.TransientSolution[2].Vy,
+							md.results.TransientSolution[2].Vel,
+							md.results.TransientSolution[2].Pressure,
+							md.results.TransientSolution[2].Thickness,
+							md.results.TransientSolution[2].Surface,
+							md.results.TransientSolution[2].MaskIceLevelset]
Index: /issm/trunk-jpl/test/NightlyRun/test805.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test805.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test805.py	(revision 21408)
@@ -1,11 +1,11 @@
 #Test Name: ValleyGlacierLevelsetEnthCalvingHO3d
 from model import *
+from socket import gethostname
 from triangle import *
-from squaremesh import *
 from setmask import *
 from parameterize import *
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
+
 
 md=triangle(model(),'../Exp/Square.exp',50000)
@@ -14,8 +14,8 @@
 md.extrude(3,2.)
 md=setflowequation(md,'HO','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 
 #Thermal model
-pos_surf=numpy.nonzero(md.mesh.vertexonsurface)[0]
+pos_surf=np.nonzero(md.mesh.vertexonsurface)[0]
 md.thermal.spctemperature[pos_surf]=md.initialization.temperature[pos_surf]
 md.thermal.isenthalpy=True
@@ -29,45 +29,43 @@
 md.transient.isgroundingline=True
 md.transient.isgia=False
-md.transient.ismovingfront=True;
+md.transient.ismovingfront=True
 
-md.calving.calvingrate=1000.*numpy.ones((md.mesh.numberofvertices,1))
-md.calving.meltingrate=numpy.zeros((md.mesh.numberofvertices,1))
+md.calving.calvingrate=1000.*np.ones((md.mesh.numberofvertices))
+md.calving.meltingrate=np.zeros((md.mesh.numberofvertices))
 
 md=solve(md,'Transient')
 
 #Fields and tolerances to track changes
-field_names     =['Vx1','Vy1','Vel1','Pressure1','Thickness1','Surface1','MaskIceLevelset1','Enthalpy1','Watercolumn1',\
-		'Vx2','Vy2','Vel2','Pressure2','Thickness2','Surface2','MaskIceLevelset2','Enthalpy2','Watercolumn2',\
-		'Vx3','Vy3','Vel3','Pressure3','Thickness3','Surface3','MaskIceLevelset3','Enthalpy3','Watercolumn3']
-field_tolerances=[1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,\
-		1e-9,1e-9,1e-10,1e-10,1e-10,1e-10,1e-10,1e-9,1e-10,\
-		1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10]
-field_values=[\
-	md.results.TransientSolution[0].Vx,\
-	md.results.TransientSolution[0].Vy,\
-	md.results.TransientSolution[0].Vel,\
-	md.results.TransientSolution[0].Pressure,\
-	md.results.TransientSolution[0].Thickness,\
-	md.results.TransientSolution[0].Surface,\
-	md.results.TransientSolution[0].MaskIceLevelset,\
-	md.results.TransientSolution[0].Enthalpy,\
-	md.results.TransientSolution[0].Watercolumn,\
-	md.results.TransientSolution[1].Vx,\
-	md.results.TransientSolution[1].Vy,\
-	md.results.TransientSolution[1].Vel,\
-	md.results.TransientSolution[1].Pressure,\
-	md.results.TransientSolution[1].Thickness,\
-	md.results.TransientSolution[1].Surface,\
-	md.results.TransientSolution[1].MaskIceLevelset,\
-	md.results.TransientSolution[1].Enthalpy,\
-	md.results.TransientSolution[1].Watercolumn,\
-	md.results.TransientSolution[2].Vx,\
-	md.results.TransientSolution[2].Vy,\
-	md.results.TransientSolution[2].Vel,\
-	md.results.TransientSolution[2].Pressure,\
-	md.results.TransientSolution[2].Thickness,\
-	md.results.TransientSolution[2].Surface,\
-	md.results.TransientSolution[2].MaskIceLevelset,\
-	md.results.TransientSolution[2].Enthalpy,\
-	md.results.TransientSolution[2].Watercolumn,\
-	]
+field_names     =['Vx1','Vy1','Vel1','Pressure1','Thickness1','Surface1','MaskIceLevelset1','Enthalpy1','Watercolumn1',
+									'Vx2','Vy2','Vel2','Pressure2','Thickness2','Surface2','MaskIceLevelset2','Enthalpy2','Watercolumn2',
+									'Vx3','Vy3','Vel3','Pressure3','Thickness3','Surface3','MaskIceLevelset3','Enthalpy3','Watercolumn3']
+field_tolerances=[1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,
+									1e-9,1e-9,1e-10,1e-10,1e-10,1e-10,1e-10,1e-9,1e-10,
+									1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10]
+field_values=[md.results.TransientSolution[0].Vx,
+							md.results.TransientSolution[0].Vy,
+							md.results.TransientSolution[0].Vel,
+							md.results.TransientSolution[0].Pressure,
+							md.results.TransientSolution[0].Thickness,
+							md.results.TransientSolution[0].Surface,
+							md.results.TransientSolution[0].MaskIceLevelset,
+							md.results.TransientSolution[0].Enthalpy,
+							md.results.TransientSolution[0].Watercolumn,
+							md.results.TransientSolution[1].Vx,
+							md.results.TransientSolution[1].Vy,
+							md.results.TransientSolution[1].Vel,
+							md.results.TransientSolution[1].Pressure,
+							md.results.TransientSolution[1].Thickness,
+							md.results.TransientSolution[1].Surface,
+							md.results.TransientSolution[1].MaskIceLevelset,
+							md.results.TransientSolution[1].Enthalpy,
+							md.results.TransientSolution[1].Watercolumn,
+							md.results.TransientSolution[2].Vx,
+							md.results.TransientSolution[2].Vy,
+							md.results.TransientSolution[2].Vel,
+							md.results.TransientSolution[2].Pressure,
+							md.results.TransientSolution[2].Thickness,
+							md.results.TransientSolution[2].Surface,
+							md.results.TransientSolution[2].MaskIceLevelset,
+							md.results.TransientSolution[2].Enthalpy,
+							md.results.TransientSolution[2].Watercolumn]
Index: /issm/trunk-jpl/test/NightlyRun/test806.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test806.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test806.py	(revision 21408)
@@ -1,12 +1,12 @@
 #Test Name: SquareShelfLevelsetCalvingSSA2dLevermann
 from model import *
+from socket import gethostname
 from triangle import *
-from squaremesh import *
 from setmask import *
 from parameterize import *
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
-import numpy
+
+import numpy as np
 
 md=triangle(model(),'../Exp/Square.exp',50000.)
@@ -14,5 +14,5 @@
 md=parameterize(md,'../Par/SquareShelf.py')
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 
 x = md.mesh.x
@@ -21,5 +21,5 @@
 Lx = (xmax-xmin)
 alpha = 2./3.
-md.mask.ice_levelset = numpy.float_((x - alpha*Lx)>0) - numpy.float_((x - alpha*Lx)<0)
+md.mask.ice_levelset = np.float_((x - alpha*Lx)>0) - np.float_((x - alpha*Lx)<0)
 
 md.timestepping.time_step=10
@@ -33,10 +33,10 @@
 md.transient.isgroundingline=False
 md.transient.isgia=False
-md.transient.ismovingfront=True;
+md.transient.ismovingfront=True
 
 md.calving=calvinglevermann()
-md.calving.coeff=4.89e13*numpy.ones((md.mesh.numberofvertices,1))
-md.calving.meltingrate=numpy.zeros((md.mesh.numberofvertices,1))
-md.levelset.spclevelset=numpy.float('NaN')*numpy.ones((md.mesh.numberofvertices,1))
+md.calving.coeff=4.89e13*np.ones((md.mesh.numberofvertices))
+md.calving.meltingrate=np.zeros((md.mesh.numberofvertices))
+md.levelset.spclevelset=np.float('NaN')*np.ones((md.mesh.numberofvertices))
 
 md.transient.requested_outputs=['default','StrainRateparallel','StrainRateperpendicular','Calvingratex','Calvingratey','CalvingCalvingrate']
@@ -45,41 +45,38 @@
 
 #Fields and tolerances to track changes
-field_names     =['Vx1','Vy1','Vel1','Pressure1','Thickness1','Surface1','MaskIceLevelset1','StrainRateparallel1','StrainRateperpendicular1','CalvingCalvingrate1',\
-		'Vx2','Vy2','Vel2','Pressure2','Thickness2','Surface2','MaskIceLevelset2','StrainRateparallel2','StrainRateperpendicular2','CalvingCalvingrate2',\
-		'Vx3','Vy3','Vel3','Pressure3','Thickness3','Surface3','MaskIceLevelset3','StrainRateparallel3','StrainRateperpendicular3','CalvingCalvingrate3']
-field_tolerances=[1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,\
-		2e-11,2e-11,2e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,\
-		2e-11,2e-11,2e-11,1e-11,1e-11,1e-11,1e-11,5e-11,5e-11,1e-11]
-field_values=[\
-	md.results.TransientSolution[0].Vx,\
-	md.results.TransientSolution[0].Vy,\
-	md.results.TransientSolution[0].Vel,\
-	md.results.TransientSolution[0].Pressure,\
-	md.results.TransientSolution[0].Thickness,\
-	md.results.TransientSolution[0].Surface,\
-	md.results.TransientSolution[0].MaskIceLevelset,\
-	md.results.TransientSolution[0].StrainRateparallel,\
-	md.results.TransientSolution[0].StrainRateperpendicular,\
-	md.results.TransientSolution[0].CalvingCalvingrate,\
-	md.results.TransientSolution[1].Vx,\
-	md.results.TransientSolution[1].Vy,\
-	md.results.TransientSolution[1].Vel,\
-	md.results.TransientSolution[1].Pressure,\
-	md.results.TransientSolution[1].Thickness,\
-	md.results.TransientSolution[1].Surface,\
-	md.results.TransientSolution[1].MaskIceLevelset,\
-	md.results.TransientSolution[1].StrainRateparallel,\
-	md.results.TransientSolution[1].StrainRateperpendicular,\
-	md.results.TransientSolution[1].CalvingCalvingrate,\
-	md.results.TransientSolution[2].Vx,\
-	md.results.TransientSolution[2].Vy,\
-	md.results.TransientSolution[2].Vel,\
-	md.results.TransientSolution[2].Pressure,\
-	md.results.TransientSolution[2].Thickness,\
-	md.results.TransientSolution[2].Surface,\
-	md.results.TransientSolution[2].MaskIceLevelset,\
-	md.results.TransientSolution[2].StrainRateparallel,\
-	md.results.TransientSolution[2].StrainRateperpendicular,\
-	md.results.TransientSolution[2].CalvingCalvingrate,\
-
-	]
+field_names     =['Vx1','Vy1','Vel1','Pressure1','Thickness1','Surface1','MaskIceLevelset1','StrainRateparallel1','StrainRateperpendicular1','CalvingCalvingrate1',
+									'Vx2','Vy2','Vel2','Pressure2','Thickness2','Surface2','MaskIceLevelset2','StrainRateparallel2','StrainRateperpendicular2','CalvingCalvingrate2',
+									'Vx3','Vy3','Vel3','Pressure3','Thickness3','Surface3','MaskIceLevelset3','StrainRateparallel3','StrainRateperpendicular3','CalvingCalvingrate3']
+field_tolerances=[1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,
+									2e-11,2e-11,2e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,
+									2e-11,2e-11,2e-11,1e-11,1e-11,1e-11,1e-11,5e-11,5e-11,1e-11]
+field_values=[md.results.TransientSolution[0].Vx,
+							md.results.TransientSolution[0].Vy,
+							md.results.TransientSolution[0].Vel,
+							md.results.TransientSolution[0].Pressure,
+							md.results.TransientSolution[0].Thickness,
+							md.results.TransientSolution[0].Surface,
+							md.results.TransientSolution[0].MaskIceLevelset,
+							md.results.TransientSolution[0].StrainRateparallel,
+							md.results.TransientSolution[0].StrainRateperpendicular,
+							md.results.TransientSolution[0].CalvingCalvingrate,
+							md.results.TransientSolution[1].Vx,
+							md.results.TransientSolution[1].Vy,
+							md.results.TransientSolution[1].Vel,
+							md.results.TransientSolution[1].Pressure,
+							md.results.TransientSolution[1].Thickness,
+							md.results.TransientSolution[1].Surface,
+							md.results.TransientSolution[1].MaskIceLevelset,
+							md.results.TransientSolution[1].StrainRateparallel,
+							md.results.TransientSolution[1].StrainRateperpendicular,
+							md.results.TransientSolution[1].CalvingCalvingrate,
+							md.results.TransientSolution[2].Vx,
+							md.results.TransientSolution[2].Vy,
+							md.results.TransientSolution[2].Vel,
+							md.results.TransientSolution[2].Pressure,
+							md.results.TransientSolution[2].Thickness,
+							md.results.TransientSolution[2].Surface,
+							md.results.TransientSolution[2].MaskIceLevelset,
+							md.results.TransientSolution[2].StrainRateparallel,
+							md.results.TransientSolution[2].StrainRateperpendicular,
+							md.results.TransientSolution[2].CalvingCalvingrate]
Index: /issm/trunk-jpl/test/NightlyRun/test807.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test807.py	(revision 21407)
+++ /issm/trunk-jpl/test/NightlyRun/test807.py	(revision 21408)
@@ -1,12 +1,12 @@
 #Test Name: SquareShelfLevelsetMeltingSSA2d
 from model import *
+from socket import gethostname
 from triangle import *
-from squaremesh import *
 from setmask import *
 from parameterize import *
 from setflowequation import *
 from solve import *
-from MatlabFuncs import *
-import numpy
+
+import numpy as np
 
 md=triangle(model(),'../Exp/Square.exp',50000.)
@@ -14,5 +14,5 @@
 md=parameterize(md,'../Par/SquareShelf.py')
 md=setflowequation(md,'SSA','all')
-md.cluster=generic('name',oshostname(),'np',3)
+md.cluster=generic('name',gethostname(),'np',3)
 
 x = md.mesh.x
@@ -21,5 +21,5 @@
 Lx = (xmax-xmin)
 alpha = 2./3.
-md.mask.ice_levelset = numpy.float_((x - alpha*Lx)>0) - numpy.float_((x - alpha*Lx)<0)
+md.mask.ice_levelset = np.float_((x - alpha*Lx)>0) - np.float_((x - alpha*Lx)<0)
 
 md.timestepping.time_step=10
@@ -33,41 +33,38 @@
 md.transient.isgroundingline=False
 md.transient.isgia=False
-md.transient.ismovingfront=True;
+md.transient.ismovingfront=True
 
-md.calving.calvingrate=numpy.zeros((md.mesh.numberofvertices,1))
-md.calving.meltingrate=10000*numpy.ones((md.mesh.numberofvertices,1))
-md.levelset.spclevelset=numpy.float('NaN')*numpy.ones((md.mesh.numberofvertices,1))
+md.calving.calvingrate=np.zeros((md.mesh.numberofvertices))
+md.calving.meltingrate=10000*np.ones((md.mesh.numberofvertices))
+md.levelset.spclevelset=np.float('NaN')*np.ones((md.mesh.numberofvertices))
 
 md=solve(md,'Transient')
 
 #Fields and tolerances to track changes
-field_names     =['Vx1','Vy1','Vel1','Pressure1','Thickness1','Surface1','MaskIceLevelset1',\
-		'Vx2','Vy2','Vel2','Pressure2','Thickness2','Surface2','MaskIceLevelset2',\
-		'Vx3','Vy3','Vel3','Pressure3','Thickness3','Surface3','MaskIceLevelset3']
-field_tolerances=[1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,\
-		2e-11,2e-11,2e-11,1e-11,1e-11,1e-11,5e-11,\
-		2e-11,2e-11,2e-11,1e-11,1e-11,1e-11,5e-11]
-field_values=[\
-	md.results.TransientSolution[0].Vx,\
-	md.results.TransientSolution[0].Vy,\
-	md.results.TransientSolution[0].Vel,\
-	md.results.TransientSolution[0].Pressure,\
-	md.results.TransientSolution[0].Thickness,\
-	md.results.TransientSolution[0].Surface,\
-	md.results.TransientSolution[0].MaskIceLevelset,\
-	md.results.TransientSolution[1].Vx,\
-	md.results.TransientSolution[1].Vy,\
-	md.results.TransientSolution[1].Vel,\
-	md.results.TransientSolution[1].Pressure,\
-	md.results.TransientSolution[1].Thickness,\
-	md.results.TransientSolution[1].Surface,\
-	md.results.TransientSolution[1].MaskIceLevelset,\
-	md.results.TransientSolution[2].Vx,\
-	md.results.TransientSolution[2].Vy,\
-	md.results.TransientSolution[2].Vel,\
-	md.results.TransientSolution[2].Pressure,\
-	md.results.TransientSolution[2].Thickness,\
-	md.results.TransientSolution[2].Surface,\
-	md.results.TransientSolution[2].MaskIceLevelset,\
-
-	]
+field_names     =['Vx1','Vy1','Vel1','Pressure1','Thickness1','Surface1','MaskIceLevelset1',
+									'Vx2','Vy2','Vel2','Pressure2','Thickness2','Surface2','MaskIceLevelset2',
+									'Vx3','Vy3','Vel3','Pressure3','Thickness3','Surface3','MaskIceLevelset3']
+field_tolerances=[1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,
+									2e-11,2e-11,2e-11,1e-11,1e-11,1e-11,5e-11,
+									2e-11,2e-11,2e-11,1e-11,1e-11,1e-11,5e-11]
+field_values=[md.results.TransientSolution[0].Vx,
+							md.results.TransientSolution[0].Vy,
+							md.results.TransientSolution[0].Vel,
+							md.results.TransientSolution[0].Pressure,
+							md.results.TransientSolution[0].Thickness,
+							md.results.TransientSolution[0].Surface,
+							md.results.TransientSolution[0].MaskIceLevelset,
+							md.results.TransientSolution[1].Vx,
+							md.results.TransientSolution[1].Vy,
+							md.results.TransientSolution[1].Vel,
+							md.results.TransientSolution[1].Pressure,
+							md.results.TransientSolution[1].Thickness,
+							md.results.TransientSolution[1].Surface,
+							md.results.TransientSolution[1].MaskIceLevelset,
+							md.results.TransientSolution[2].Vx,
+							md.results.TransientSolution[2].Vy,
+							md.results.TransientSolution[2].Vel,
+							md.results.TransientSolution[2].Pressure,
+							md.results.TransientSolution[2].Thickness,
+							md.results.TransientSolution[2].Surface,
+							md.results.TransientSolution[2].MaskIceLevelset]
