Index: /issm/trunk-jpl/src/c/classes/Elements/Penta.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/Penta.cpp	(revision 15972)
+++ /issm/trunk-jpl/src/c/classes/Elements/Penta.cpp	(revision 15973)
@@ -11190,4 +11190,5 @@
 
 	int        i,migration_style;
+	bool       oldfloating;
 	bool       floatingelement = false;
 	bool       groundedelement = false;
@@ -11209,7 +11210,8 @@
 	GetInputListOnVertices(&r[0],BathymetryEnum);
 	GetInputListOnVertices(&phi[0],MaskGroundediceLevelsetEnum);
-	rho_water = matpar->GetRhoWater();
-	rho_ice   = matpar->GetRhoIce();
-	density   = rho_ice/rho_water;
+	rho_water   = matpar->GetRhoWater();
+	rho_ice     = matpar->GetRhoIce();
+	density     = rho_ice/rho_water;
+	oldfloating = this->IsFloating(); //figure out if the element is floating before starting to change everything
 
 	/*go through vertices, and update inputs, considering them to be PentaVertex type: */
@@ -11282,5 +11284,5 @@
 
    /*Add basal melting rate if element just ungrounded*/
-	if(!this->IsFloating() && floatingelement==true){
+	if(!oldfloating && floatingelement==true){
 		for(i=0;i<NUMVERTICES;i++)melting[i]=gl_melting_rate/yts;
 		this->inputs->AddInput(new PentaInput(BasalforcingsMeltingRateEnum,&melting[0],P1Enum));
Index: /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp	(revision 15972)
+++ /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp	(revision 15973)
@@ -7303,4 +7303,5 @@
 
 	int        i,migration_style;
+	bool       oldfloating;
 	bool       floatingelement = false;
 	bool       groundedelement = false;
@@ -7320,7 +7321,8 @@
 	GetInputListOnVertices(&r[0],BathymetryEnum);
 	GetInputListOnVertices(&phi[0],MaskGroundediceLevelsetEnum);
-	rho_water = matpar->GetRhoWater();
-	rho_ice   = matpar->GetRhoIce();
-	density   = rho_ice/rho_water;
+	rho_water   = matpar->GetRhoWater();
+	rho_ice     = matpar->GetRhoIce();
+	density     = rho_ice/rho_water;
+	oldfloating = this->IsFloating(); //figure out if element is floating before we start to change everything
 
 	/*go through vertices, and update inputs, considering them to be TriaVertex type: */
@@ -7393,5 +7395,5 @@
 
    /*Add basal melting rate if element just ungrounded*/
-	if(!this->IsFloating() && floatingelement==true){
+	if(!oldfloating && floatingelement==true){
 		for(i=0;i<NUMVERTICES;i++)melting[i]=gl_melting_rate/yts;
 		this->inputs->AddInput(new TriaInput(BasalforcingsMeltingRateEnum,&melting[0],P1Enum));
