Index: /issm/trunk-jpl/src/m/exp/expread.m
===================================================================
--- /issm/trunk-jpl/src/m/exp/expread.m	(revision 13331)
+++ /issm/trunk-jpl/src/m/exp/expread.m	(revision 13332)
@@ -11,5 +11,5 @@
 %   Usage:
 %      Struct=expread(filename)
-%  
+%
 %   Example:
 %      Struct=expread('domainoutline.exp')
@@ -33,7 +33,7 @@
 
 	%update number of profiles
-   count=count+1;
+	count=count+1;
 
-   %Get file name
+	%Get file name
 	A=fscanf(fid,'%s %s',2);
 	if ~strncmp(A,'##Name:',7), break; end
@@ -52,8 +52,8 @@
 	if ~strncmp(A,'#Points',7), break; end
 
-	%Get number of nods and density
-   A=fscanf(fid,'%f %f',[1 2]);
-   Struct(count).nods=A(1);
-   Struct(count).density=A(2);
+	%Get number of nodes and density
+	A=fscanf(fid,'%f %f',[1 2]);
+	Struct(count).nods=A(1);
+	Struct(count).density=A(2);
 
 	%Get Info
Index: /issm/trunk-jpl/src/m/exp/expread.py
===================================================================
--- /issm/trunk-jpl/src/m/exp/expread.py	(revision 13332)
+++ /issm/trunk-jpl/src/m/exp/expread.py	(revision 13332)
@@ -0,0 +1,101 @@
+import os.path
+import numpy
+from MatlabFuncs import *
+
+def expread(filename):
+	"""
+	EXPREAD - read a file exp and build a Structure
+
+	   This routine reads a file .exp and build a Structure containing the 
+	   fields x and y corresponding to the coordinates, one for the filename of
+	   the exp file, for the density, for the nodes, and a field closed to 
+	   indicate if the domain is closed. 
+	   The first argument is the .exp file to be read and the second one (optional) 
+	   indicate if the last point shall be read (1 to read it, 0 not to).
+
+	   Usage:
+	      Struct=expread(filename)
+
+	   Example:
+	      Struct=expread('domainoutline.exp')
+	      Struct=expread('domainoutline.exp')
+
+	   See also EXPDOC, EXPWRITEASVERTICES
+	"""
+
+	#some checks
+	if not os.path.exists(filename):
+		raise OSError("expread error message: file '%s' not found!" % filename)
+
+	#initialize number of profile
+	Structs=[]
+
+	#open file
+	fid=open(filename,'r')
+
+	#loop over the number of profiles
+	while True:
+
+		#update number of profiles
+		Struct={}
+
+		#Get file name
+		A=fid.readline().split(None,1)
+		if not A:
+			break
+		A=A[0]+A[1]
+		if not strncmp(A,'##Name:',7):
+			break
+		if len(A)>7: 
+			Struct['name']=A[7:-1]
+		else:
+			Struct['name']=''
+
+		#Get Icon
+		A=fid.readline().split(None,1)
+		A=A[0]+A[1]
+		if not strncmp(A,'##Icon:',6):
+			break
+
+		#Get Info
+		A=fid.readline().split(None,3)
+		A=A[0]+A[1]+A[2]+A[3]
+		if not strncmp(A,'#Points',7):
+			break
+
+		#Get number of nodes and density
+		A=fid.readline().split()
+		Struct['nods']   =float(A[0])
+		Struct['density']=float(A[1])
+
+		#Get Info
+		A=fid.readline().split(None,4)
+		A=A[0]+A[1]+A[2]+A[3]+A[4]
+		if not strncmp(A,'#XposYpos',9):
+			break
+
+		#Get Coordinates
+		Struct['x']=numpy.empty(Struct['nods'])
+		Struct['y']=numpy.empty(Struct['nods'])
+		for i in xrange(int(Struct['nods'])):
+			A=fid.readline().split()
+			Struct['x'][i]=float(A[0])
+			Struct['y'][i]=float(A[1])
+
+#		if(Struct['nods']~=length(Struct['x']))error(['Profile ' num2str ' reports incorrect length']); end;
+
+		#Check if closed
+		if (Struct['nods'] > 1) and \
+		   (Struct['x'][-1] == Struct['x'][0]) and \
+		   (Struct['y'][-1] == Struct['y'][0]):
+			Struct['closed']=True
+		else:
+			Struct['closed']=False
+
+		Structs.append(Struct)
+
+	#close file
+	fid.close()
+
+	return Structs
+
