Index: /issm/trunk-jpl/src/m/coordsystems/gmtmask.m
===================================================================
--- /issm/trunk-jpl/src/m/coordsystems/gmtmask.m	(revision 21941)
+++ /issm/trunk-jpl/src/m/coordsystems/gmtmask.m	(revision 21942)
@@ -31,7 +31,7 @@
 	%First, write our lat,long file for gmt:
 	nv=length(lat);
-	filename = ['all_vertices-' num2str(feature('GetPid')) '.txt']
-	dlmwrite(filename,[long lat (1:nv)'],'delimiter','\t','precision',10);
-
+	filename_all = ['all_vertices-' num2str(feature('GetPid')) '.txt']; 
+	filename_oce = ['oce_vertices-' num2str(feature('GetPid')) '.txt']; 
+	dlmwrite(filename_all,[long lat (1:nv)'],'delimiter','\t','precision',10);
 
 	%Avoid bypassing of the ld library path by Matlab (:()
@@ -42,5 +42,5 @@
 
 	%figure out which vertices are on the ocean, which one on the continent:
-	[status,result] = system(['gmt gmtselect ./' filename ' -h0 -Df -R0/360/-90/90  -A0 -JQ180/200 -Nk/s/s/k/s > ./oce_vertices.txt']);
+	[status,result] = system(['gmt gmtselect ./' filename_all ' -h0 -Df -R0/360/-90/90  -A0 -JQ180/200 -Nk/s/s/k/s > ./' filename_oce]);
 	if status~=0,
 		error(result);
@@ -52,5 +52,5 @@
 	end
 	%read the con_vertices.txt file and flag our mesh vertices on the continent
-	fid=fopen('./oce_vertices.txt','r');
+	fid=fopen(['./' filename_oce],'r');
 	line=fgets(fid); 
 	line=fgets(fid);
@@ -66,4 +66,4 @@
 	mask(oce_vertices)=1;
 	
-	system(['rm -rf ./' filename ' ./oce_vertices.txt ./gmt.history']);
+	system(['rm -rf ./' filename_all ' ./' filename_oce ' ./gmt.history']);
 	if ~recursive, disp(sprintf('gmtmask: done')); end;
