Index: /issm/branches/trunk-larour-NatGeoScience2016/src/m/mesh/modelmerge2d.m
===================================================================
--- /issm/branches/trunk-larour-NatGeoScience2016/src/m/mesh/modelmerge2d.m	(revision 22888)
+++ /issm/branches/trunk-larour-NatGeoScience2016/src/m/mesh/modelmerge2d.m	(revision 22889)
@@ -121,5 +121,17 @@
 		bound2=zeros(md.mesh.numberofvertices,1); bound2(md.mesh.extractedvertices{2})=md2.mesh.vertexonboundary;
 		boundary=bound1 & bound2;
+		
+		%identify corners between both basins
+		ends=[];
+		for i=1:length(pos),
+			v=pos(i); [indi,indj]=find(md.mesh.elements==v); 
+			conn=unique(md.mesh.elements(indi,:));
+			if (sum(boundary(conn))==2),
+				ends(end+1)=v;
+			end
+		end
+		boundary(ends)=0; %exclude these ends from the boundary that is going to become neumann.
 		pos=find(boundary); md.stressbalance.spcvx(pos)=NaN; md.stressbalance.spcvy(pos)=NaN; md.stressbalance.spcvz(pos)=NaN;
+
 	end
 
