Index: /issm/trunk-jpl/src/c/analyses/LevelsetAnalysis.cpp
===================================================================
--- /issm/trunk-jpl/src/c/analyses/LevelsetAnalysis.cpp	(revision 23825)
+++ /issm/trunk-jpl/src/c/analyses/LevelsetAnalysis.cpp	(revision 23826)
@@ -699,5 +699,5 @@
 	IssmDouble  rho_ice,rho_water;
 	IssmDouble  bed,water_depth;
-	IssmDouble  levelset;
+	IssmDouble  levelset,grounded_ls;
 
 	femmodel->parameters->FindParam(&calvinglaw,CalvingLawEnum);
@@ -715,4 +715,5 @@
 			Gauss*   gauss    = element->NewGauss();
 			Input*   H_input  = element->GetInput(ThicknessEnum); _assert_(H_input);
+			Input*   gr_input = element->GetInput(MaskGroundediceLevelsetEnum); _assert_(gr_input);
 
 			/*Potentially constrain nodes of this element*/
@@ -723,5 +724,6 @@
 
 				H_input->GetInputValue(&thickness,gauss);
-				if(thickness<min_thickness){
+				gr_input->GetInputValue(&grounded_ls,gauss);
+				if(thickness<min_thickness && grounded_ls<0.){
 					node->ApplyConstraint(0,+1.);
 				}
