Index: /issm/trunk-jpl/src/m/boundaryconditions/SetIceShelfBC.py
===================================================================
--- /issm/trunk-jpl/src/m/boundaryconditions/SetIceShelfBC.py	(revision 15806)
+++ /issm/trunk-jpl/src/m/boundaryconditions/SetIceShelfBC.py	(revision 15807)
@@ -47,9 +47,12 @@
 	else:
 		numbernodesfront=4
-	values=md.mask.icelevelset[md.mesh.segments[:,0:-1]]
-	segmentsfront=1-values
-	segments=(numpy.sum(segmentsfront,axis=1)!=numbernodesfront).astype(int)
-	#Find all nodes for these segments and spc them
-	pos=md.mesh.segments[segments,0:-1]
+	if any(md.mask.icelevelset<=0):
+		values=md.mask.icelevelset[md.mesh.segments[:,0:-1]]
+		segmentsfront=1-values
+		segments=(numpy.sum(segmentsfront,axis=1)!=numbernodesfront).astype(int)
+		#Find all nodes for these segments and spc them
+		pos=md.mesh.segments[segments,0:-1]
+	else:
+		pos=numpy.nonzero(md.mesh.vertexonboundary)[0]
 	md.stressbalance.spcvx[pos[:]]=0
 	md.stressbalance.spcvy[pos[:]]=0
Index: /issm/trunk-jpl/src/m/boundaryconditions/SetMarineIceSheetBC.py
===================================================================
--- /issm/trunk-jpl/src/m/boundaryconditions/SetMarineIceSheetBC.py	(revision 15806)
+++ /issm/trunk-jpl/src/m/boundaryconditions/SetMarineIceSheetBC.py	(revision 15807)
@@ -55,9 +55,12 @@
 	else:
 		numbernodesfront=4
-	values=md.mask.icelevelset[md.mesh.segments[:,0:-1]]
-	segmentsfront=1-values
-	segments=(numpy.sum(segmentsfront,axis=1)!=numbernodesfront).astype(int)
-	#Find all nodes for these segments and spc them
-	pos=md.mesh.segments[segments,0:-1]
+	if any(md.mask.icelevelset<=0):
+		values=md.mask.icelevelset[md.mesh.segments[:,0:-1]]
+		segmentsfront=1-values
+		segments=(numpy.sum(segmentsfront,axis=1)!=numbernodesfront).astype(int)
+		#Find all nodes for these segments and spc them
+		pos=md.mesh.segments[segments,0:-1]
+	else:
+		pos=numpy.nonzero(md.mesh.vertexonboundary)[0]
 	md.stressbalance.spcvx[pos[:]]=0
 	md.stressbalance.spcvy[pos[:]]=0
