Index: /issm/trunk-jpl/src/c/classes/Elements/Penta.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/Penta.cpp	(revision 15962)
+++ /issm/trunk-jpl/src/c/classes/Elements/Penta.cpp	(revision 15963)
@@ -11322,5 +11322,5 @@
 void  Penta::PotentialUngrounding(Vector<IssmDouble>* potential_ungrounding){
 
-	IssmDouble  h[NUMVERTICES],r[NUMVERTICES];
+	IssmDouble  h[NUMVERTICES],r[NUMVERTICES],gl[NUMVERTICES];
 	IssmDouble  bed_hydro;
 	IssmDouble  rho_water,rho_ice,density;
@@ -11332,9 +11332,10 @@
 	GetInputListOnVertices(&h[0],ThicknessEnum);
 	GetInputListOnVertices(&r[0],BathymetryEnum);
+	GetInputListOnVertices(&gl[0],MaskGroundediceLevelsetEnum);
 
 	/*go through vertices, and figure out which ones are on the ice sheet, and want to unground: */
 	for(int i=0;i<NUMVERTICES;i++){
 		/*Find if grounded vertices want to start floating*/
-		if (!nodes[i]->IsFloating()){
+		if (gl[i]>0.){
 			bed_hydro=-density*h[i];
 			if(bed_hydro>r[i]){
Index: /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp	(revision 15962)
+++ /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp	(revision 15963)
@@ -7425,5 +7425,5 @@
 void  Tria::PotentialUngrounding(Vector<IssmDouble>* potential_ungrounding){
 
-	IssmDouble  h[NUMVERTICES],r[NUMVERTICES];
+	IssmDouble  h[NUMVERTICES],r[NUMVERTICES],gl[NUMVERTICES];
 	IssmDouble  bed_hydro;
 	IssmDouble  rho_water,rho_ice,density;
@@ -7435,9 +7435,10 @@
 	GetInputListOnVertices(&h[0],ThicknessEnum);
 	GetInputListOnVertices(&r[0],BathymetryEnum);
+	GetInputListOnVertices(&gl[0],MaskGroundediceLevelsetEnum);
 
 	/*go through vertices, and figure out which ones are grounded and want to unground: */
 	for(int i=0;i<NUMVERTICES;i++){
 		/*Find if grounded vertices want to start floating*/
-		if (!nodes[i]->IsFloating()){
+		if (gl[i]>0.){
 			bed_hydro=-density*h[i];
 			if(bed_hydro>r[i]){
