Index: /issm/trunk-jpl/src/c/classes/Elements/Penta.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/Penta.cpp	(revision 23892)
+++ /issm/trunk-jpl/src/c/classes/Elements/Penta.cpp	(revision 23893)
@@ -189,5 +189,5 @@
 	IssmDouble  lambda1,lambda2,ex,ey,vx,vy,vel;
 	IssmDouble  B,sigma_max,sigma_max_floating,sigma_max_grounded,n;
-	IssmDouble  epse_2,groundedice,bed;
+	IssmDouble  epse_2,groundedice,bed,sealevel;
 	IssmDouble  sigma_vm[NUMVERTICES];
 
@@ -209,4 +209,5 @@
 	Input* smax_fl_input = inputs->GetInput(CalvingStressThresholdFloatingiceEnum); _assert_(smax_fl_input);
 	Input* smax_gr_input = inputs->GetInput(CalvingStressThresholdGroundediceEnum); _assert_(smax_gr_input);
+	Input* sl_input  = inputs->GetInput(SealevelEnum); _assert_(sl_input);
 
 	/* Start looping on the number of vertices: */
@@ -225,4 +226,5 @@
 		smax_gr_input->GetInputValue(&sigma_max_grounded,gauss);
 		vel=sqrt(vx*vx+vy*vy)+1.e-14;
+		sl_input->GetInputValue(&sealevel,gauss);
 
 		/*Compute strain rate and viscosity: */
@@ -249,5 +251,5 @@
 
 		/*Assign values*/
-		if(bed>0.){
+		if(bed>sealevel){
 			calvingratex[iv]=0.;
 			calvingratey[iv]=0.;
Index: /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp	(revision 23892)
+++ /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp	(revision 23893)
@@ -244,5 +244,6 @@
 	IssmDouble  sigma_vm[NUMVERTICES];
 	IssmDouble  B,sigma_max,sigma_max_floating,sigma_max_grounded,n;
-	IssmDouble  epse_2,groundedice,bed;
+	IssmDouble  epse_2,groundedice,bed,sealevel;		// added sealevel
+	
 
 	/* Get node coordinates and dof list: */
@@ -258,4 +259,7 @@
 	Input* smax_gr_input = inputs->GetInput(CalvingStressThresholdGroundediceEnum); _assert_(smax_gr_input);
 	Input* n_input  = inputs->GetInput(MaterialsRheologyNEnum); _assert_(n_input);
+	Input* sl_input  = inputs->GetInput(SealevelEnum); _assert_(sl_input);
+	
+
 
 	/* Start looping on the number of vertices: */
@@ -270,8 +274,9 @@
 		vy_input->GetInputValue(&vy,gauss);
 		gr_input->GetInputValue(&groundedice,gauss);
-		bs_input->GetInputValue(&bed,gauss);
+		bs_input->GetInputValue(&bed,gauss);	
 		smax_fl_input->GetInputValue(&sigma_max_floating,gauss);
 		smax_gr_input->GetInputValue(&sigma_max_grounded,gauss);
 		vel=sqrt(vx*vx+vy*vy)+1.e-14;
+		sl_input->GetInputValue(&sealevel,gauss);
 
 		/*Compute strain rate and viscosity: */
@@ -301,7 +306,6 @@
 		else
 		 sigma_max = sigma_max_grounded;
-
 		/*Assign values*/
-		if(bed>0.){
+		if(bed>sealevel){		// Changed 0. to sealevel
 			calvingratex[iv]=0.;
 			calvingratey[iv]=0.;
@@ -312,4 +316,5 @@
 		}
 		calvingrate[iv] =sqrt(calvingratex[iv]*calvingratex[iv] + calvingratey[iv]*calvingratey[iv]);
+	
 	}
 
