Index: /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp	(revision 27252)
+++ /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp	(revision 27253)
@@ -845,5 +845,5 @@
 	int			use_parameter=-1;
 	IssmDouble  gamma, theta, alpha, xoffset, yoffset;
-	IssmDouble  vel_lower, vel_upper, vel_threshold, vrate, truncateVrate;
+	IssmDouble  vel_lower, vel_upper, vel_threshold, vrate, truncateVrate, vel_max;
 
 	/* Get node coordinates and dof list: */
@@ -874,4 +874,5 @@
 	this->FindParam(&vel_upper, CalvingVelUpperboundEnum);
 	this->FindParam(&vel_threshold, CalvingVelThresholdEnum);
+	this->FindParam(&vel_max, CalvingVelMaxEnum);
 
 	/* Start looping on the number of vertices: */
@@ -891,6 +892,14 @@
 		sl_input->GetInputValue(&sealevel,gauss);
 		arate_input->GetInputValue(&arate,gauss);
+		/* reduce the arate by a factor depends on a fixed velocity threshold */
 		vrate = 1.0;
 		if (vel < vel_threshold) vrate = vel / vel_threshold;
+		/* parameter used in the calving law: real time max vel, or predefined vel range*/
+		if (vel_upper <= vel_lower) {
+			truncateVrate = vel / vel_max;
+		}
+		else {
+			truncateVrate = (min(vel_upper, max(vel_lower, vel))-vel_lower) / (vel_upper - vel_lower);
+		}
 
 		/*Compute strain rate and viscosity: */
@@ -925,10 +934,8 @@
 			case 3:
 				/* 3 tanh(normal vel): f(x)=y_{o}-\frac{\theta}{2}\tanh(\alpha(x+x_{o})) */
-				truncateVrate = (min(vel_upper, max(vel_lower, vel))-vel_lower) / (vel_upper - vel_lower);
 				gamma = yoffset -  0.5*theta*tanh(alpha*(truncateVrate+xoffset));
 				break;
 			case 4:
 				/* 4 tanh(normal vel), cross (0,0): f(x)=y_{o}-\frac{\theta}{2}\tanh(\alpha(x+x_{o})) */
-				truncateVrate = (min(vel_upper, max(vel_lower, vel))-vel_lower) / (vel_upper - vel_lower);
 				gamma = 0.5*theta*(tanh(alpha*xoffset) - tanh(alpha*(truncateVrate+xoffset)));
 				break;
Index: /issm/trunk-jpl/src/c/cores/movingfront_core.cpp
===================================================================
--- /issm/trunk-jpl/src/c/cores/movingfront_core.cpp	(revision 27252)
+++ /issm/trunk-jpl/src/c/cores/movingfront_core.cpp	(revision 27253)
@@ -54,5 +54,5 @@
 	/* compute the maximal velocity over the whole domain */
 	femmodel->MaxVelx(&maxVel);
-	femmodel->parameters->SetParam(maxVel, CalvingVelThresholdEnum);
+	femmodel->parameters->SetParam(maxVel, CalvingVelMaxEnum);
 
 	/* start the work from here */
Index: /issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h
===================================================================
--- /issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h	(revision 27252)
+++ /issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h	(revision 27253)
@@ -119,4 +119,5 @@
 	CalvingYoffsetEnum,
 	CalvingVelLowerboundEnum,
+	CalvingVelMaxEnum,
 	CalvingVelThresholdEnum,
 	CalvingVelUpperboundEnum,
