Index: /issm/trunk-jpl/src/m/classes/clusters/vilje.py
===================================================================
--- /issm/trunk-jpl/src/m/classes/clusters/vilje.py	(revision 21567)
+++ /issm/trunk-jpl/src/m/classes/clusters/vilje.py	(revision 21568)
@@ -117,8 +117,7 @@
                 fid.close()
 
-                # }}}
+		# }}}
 	def UploadQueueJob(self,modelname,dirname,filelist):
 		# {{{
-
 		#compress the files into one zip.
 		compressstring='tar -zcf %s.tar.gz ' % dirname
Index: /issm/trunk-jpl/src/m/contrib/defleurian/paraview/exportVTK.py
===================================================================
--- /issm/trunk-jpl/src/m/contrib/defleurian/paraview/exportVTK.py	(revision 21567)
+++ /issm/trunk-jpl/src/m/contrib/defleurian/paraview/exportVTK.py	(revision 21568)
@@ -40,5 +40,5 @@
 		os.mkdir(filename)
 
-	#get the element related variables
+	# {{{ get the element related variables
 	if 'z' in dict.keys(model.mesh.__dict__):
 		points=np.column_stack((model.mesh.x,model.mesh.y,model.mesh.z))
@@ -51,6 +51,6 @@
 	num_of_elt=np.shape(model.mesh.elements)[0]
 	point_per_elt=np.shape(model.mesh.elements)[1]
-		
-	#Select the type of element function of the number of nodes per elements
+	# }}}
+	# {{{ Select the type of element function of the number of nodes per elements
 	if point_per_elt==3:
 		celltype=5 #triangles
@@ -59,6 +59,6 @@
 	else:
 		error('Your Element definition is not taken into account \n')
-
-	#this is the result structure
+	# }}}
+	# {{{ this is the result structure
 	res_struct=model.results
 	if (len(res_struct.__dict__)>0):
@@ -75,5 +75,6 @@
 	else:
 		num_of_timesteps=1
-
+	# }}}
+	# {{{ write header and mesh
 	for step in range(0,num_of_timesteps):
 		timestep=step
@@ -107,6 +108,6 @@
 
 		fid.write('POINT_DATA %s \n' %str(num_of_points))
-	
-		#loop over the different solution structures
+		# }}}
+		# {{{ loop over the different solution structures
 		if 'solnames' in locals():
 			for sol in solnames:
@@ -141,22 +142,60 @@
 							else:
 								fid.write('%e\n' % fieldstruct[node])
-					
-		#loop on arguments, if something other than result is asked, do
-		#it now
+		# }}}
+		# {{{ loop on arguments, if something other than result is asked, do it now
 		for other in args:
 			other_struct=model.__dict__[other]
 			othernames=(dict.keys(other_struct.__dict__))
 			for field in othernames:
-				if ((np.size(other_struct.__dict__[field]))==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 np.isnan(other_struct.__dict__[field][node]):
-							fid.write('%e\n' % -9999.9999)
-						#also checking for verry small value that mess up
-						elif (abs(other_struct.__dict__[field][node])<1.0e-20):
-							fid.write('%e\n' % 0.0)
+				if np.ndim(other_struct.__dict__[field])==1:
+					if np.size(other_struct.__dict__[field])==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 np.isnan(other_struct.__dict__[field][node]):
+								fid.write('%e\n' % -9999.9999)
+							#also checking for verry small value that mess up
+							elif (abs(other_struct.__dict__[field][node])<1.0e-20):
+								fid.write('%e\n' % 0.0)
+							else:
+								fid.write('%e\n' % other_struct.__dict__[field][node])
+				elif np.ndim(other_struct.__dict__[field])==2:
+					#deal with forcings
+					if np.shape(other_struct.__dict__[field])[0]==num_of_points+1:
+						current_time=res_struct.__dict__[sol].__getitem__(timestep).__dict__['time']/model.__dict__['constants'].__dict__['yts']
+						times=other_struct.__dict__[field][-1,:]
+						if np.any(times==current_time):
+							time_loc=np.where(times==current_time)
+							current_force=other_struct.__dict__[field][:-1,time_loc]
 						else:
-							fid.write('%e\n' % other_struct.__dict__[field][node])
+							precede_time_loc=np.where(times<current_time)[0][-1]
+							follow_time_loc=np.where(times>current_time)[0][0]
+							time_scaling=(current_time-times[precede_time_loc])/(times[follow_time_loc]-times[precede_time_loc])
+							current_force=other_struct.__dict__[field][:-1,precede_time_loc]+(other_struct.__dict__[field][:-1,follow_time_loc]-other_struct.__dict__[field][:-1,precede_time_loc])*time_scaling
+						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 np.isnan(current_force[node]):
+								fid.write('%e\n' % -9999.9999)
+							#also checking for verry small value that mess up
+							elif (abs(current_force[node])<1.0e-20):
+								fid.write('%e\n' % 0.0)
+							else:
+								fid.write('%e\n' % current_force[node])
+					# reloaded variable are generally of dim 2
+					elif np.shape(other_struct.__dict__[field])[0]==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 np.isnan(other_struct.__dict__[field][node]):
+									fid.write('%e\n' % -9999.9999)
+								#also checking for verry small value that mess up
+								elif (abs(other_struct.__dict__[field][node])<1.0e-20):
+									fid.write('%e\n' % 0.0)
+								else:
+									fid.write('%e\n' % other_struct.__dict__[field][node])
+		# }}}
 	fid.close();
Index: /issm/trunk-jpl/src/m/io/loadvars.py
===================================================================
--- /issm/trunk-jpl/src/m/io/loadvars.py	(revision 21567)
+++ /issm/trunk-jpl/src/m/io/loadvars.py	(revision 21568)
@@ -106,5 +106,5 @@
 					Tree=nvdict['md'].__dict__[classtree[mod][0]].__dict__[classtree[mod][1]]
 			else:
-                                curclass=NCFile.groups[classtree[mod][0]]
+				curclass=NCFile.groups[classtree[mod][0]]
 				nvdict['md'].__dict__[mod] = getattr(classtype[mod][1],classtype[mod][0])()
 				Tree=nvdict['md'].__dict__[classtree[mod][0]]
