Index: /issm/trunk-jpl/src/m/exp/expdisp.py
===================================================================
--- /issm/trunk-jpl/src/m/exp/expdisp.py	(revision 19421)
+++ /issm/trunk-jpl/src/m/exp/expdisp.py	(revision 19421)
@@ -0,0 +1,27 @@
+from expread import expread
+import numpy as npy
+
+def expdisp(domainoutline,ax,linestyle='--k',linewidth=1,unitmultiplier=1.):
+    '''
+    plot the contents of a domain outline file
+
+    This routine reads in a domain outline file and plots all of the x,y contours
+
+    'ax' is a handle to the current plot axes, onto which the contours are to be drawn
+
+    Usage:
+        expdisp(domainoutline,ax)
+
+    Example:
+        expdisp('domain.exp',plt.gca(),linestyle='--k',linewidth=2,unitmultiplier=1.e3)
+    '''
+
+    domain=expread(domainoutline)
+
+    for i in xrange(len(domain)):
+        if domain[i]['nods']==1:
+            ax.plot(domain[i]['x']*unitmultiplier,domain[i]['y']*unitmultiplier,'o',mec='k',mfc='r',ms=10)
+        else:
+            x=domain[i]['x'].tolist() # since expread returns a string representation of the arrays
+            y=domain[i]['y'].tolist()
+            ax.plot(x*unitmultiplier,y*unitmultiplier,linestyle,linewidth=linewidth)
Index: /issm/trunk-jpl/src/m/exp/expwrite.py
===================================================================
--- /issm/trunk-jpl/src/m/exp/expwrite.py	(revision 19420)
+++ /issm/trunk-jpl/src/m/exp/expwrite.py	(revision 19421)
@@ -3,7 +3,7 @@
 def expwrite(contours,filename):
 	"""
-	EXPWRITE - write an Argus file from a structure given in input
+	EXPWRITE - write an Argus file from a dictionary given in input
 
-	   This routine writes an Argus file from a list of dict's containing the fields:
+	   This routine writes an Argus file from a dict containing the fields:
 	   x and y of the coordinates of the points.
 	   The first argument is the list containing the points coordinates 
@@ -20,23 +20,26 @@
 
 	fid=open(filename,'w')
-	for contour in contours:
-		if numpy.size(contour['x'])!=numpy.size(contour['y']):
+	for x,y in zip(contours['x'],contours['y']):
+		#if numpy.size(contour['x'])!=numpy.size(contour['y']):
+		if len(x)!=len(y):
 			raise RuntimeError("contours x and y coordinates must be of identical size")
-   
-		if 'name' in contour:
+		if 'name' in contours:
 			fid.write("%s%s\n" % ('## Name:',contour['name']))
 		else:
 			fid.write("%s%s\n" % ('## Name:',filename))
    
-		#Add density if it's not there
-		if 'density' not in contour:
-			contour['density']=1
+		#Add density if it's not there FIXME what is this ever used for?
+		#if 'density' not in contours:
+		#	contours['density']=1
+		density=1
 
 		fid.write("%s\n" % '## Icon:0')
 		fid.write("%s\n" % '# Points Count Value')
-		fid.write("%i %f\n" % (numpy.size(contour['x']),contour['density']))
+		#fid.write("%i %f\n" % (numpy.size(contour['x']),contour['density']))
+		fid.write("%i %f\n" % (numpy.size(x),density))
 		fid.write("%s\n" % '# X pos Y pos')
-		for x,y in zip(contour['x'],contour['y']):
-			fid.write("%10.10f %10.10f\n" % (x,y))
+		#for x,y in zip(contour['x'],contour['y']):
+		for xi,yi in zip(x,y):
+			fid.write("%10.10f %10.10f\n" % (xi,yi))
 		fid.write("\n")
 
