Index: /issm/trunk-jpl/src/m/contrib/paraview/exportVTK.py
===================================================================
--- /issm/trunk-jpl/src/m/contrib/paraview/exportVTK.py	(revision 18839)
+++ /issm/trunk-jpl/src/m/contrib/paraview/exportVTK.py	(revision 18840)
@@ -71,6 +71,6 @@
 		for solution in solnames:
 			#looking for multiple time steps
-			if (len(res_struct.__dict__[solution])>num_of_timesteps):
-				num_of_timesteps=len(res_struct.__dict__[solution])
+			if (numpy.size(res_struct.__dict__[solution])>num_of_timesteps):
+				num_of_timesteps=numpy.size(res_struct.__dict__[solution])
 				num_of_timesteps=int(num_of_timesteps/out_freq)+1
 	else:
@@ -113,26 +113,33 @@
 			for sol in solnames:
 				#dealing with results on different timesteps
-				if(len(res_struct.__dict__[sol])>timestep):
+				if(numpy.size(res_struct.__dict__[sol])>timestep):
 					timestep = step
 				else:
-					timestep = len(res_struct.__dict__[sol])
+					timestep = numpy.size(res_struct.__dict__[sol])
 				
 				#getting the  fields in the solution
-				fieldnames=dict.keys(res_struct.__dict__[sol].__getitem__(timestep*out_freq-1).__dict__)
-			
+				if(numpy.size(res_struct.__dict__[sol])>1):
+					fieldnames=dict.keys(res_struct.__dict__[sol].__getitem__(timestep*out_freq-1).__dict__)
+				else:
+					fieldnames=dict.keys(res_struct.__dict__[sol].__dict__)
 				#check which field is a real result and print
 				for field in fieldnames:
-					if ((numpy.size(res_struct.__dict__[sol].__getitem__(timestep*out_freq-1).__dict__[field]))==num_of_points):
+					if(numpy.size(res_struct.__dict__[sol])>1):
+						fieldstruct=res_struct.__dict__[sol].__getitem__(timestep*out_freq-1).__dict__[field]
+					else:
+						fieldstruct=res_struct.__dict__[sol].__dict__[field]
+
+					if ((numpy.size(fieldstruct))==num_of_points):
 						fid.write('SCALARS %s float 1 \n' % field)
 						fid.write('LOOKUP_TABLE default\n')
 						for node in range(0,num_of_points):
 							#paraview does not like NaN, replacing
-							if numpy.isnan(res_struct.__dict__[sol].__getitem__(timestep*out_freq-1).__dict__[field][node]):
+							if numpy.isnan(fieldstruct[node]):
 								fid.write('%e\n' % -9999.9999)
 							#also checking for verry small value that mess up
-							elif (abs(res_struct.__dict__[sol].__getitem__(timestep*out_freq-1).__dict__[field][node])<1.0e-20):
+							elif (abs(fieldstruct[node])<1.0e-20):
 								fid.write('%e\n' % 0.0)
 							else:
-								fid.write('%e\n' % res_struct.__dict__[sol].__getitem__(timestep*out_freq-1).__dict__[field][node])
+								fid.write('%e\n' % fieldstruct[node])
 					
 		#loop on arguments, if something other than result is asked, do
