Index: /issm/trunk-jpl/src/c/analyses/LevelsetAnalysis.cpp
===================================================================
--- /issm/trunk-jpl/src/c/analyses/LevelsetAnalysis.cpp	(revision 27225)
+++ /issm/trunk-jpl/src/c/analyses/LevelsetAnalysis.cpp	(revision 27226)
@@ -225,5 +225,6 @@
 			parameters->AddObject(iomodel->CopyConstantObject("md.calving.xoffset",CalvingXoffsetEnum));
 			parameters->AddObject(iomodel->CopyConstantObject("md.calving.yoffset",CalvingYoffsetEnum));
-			parameters->AddObject(iomodel->CopyConstantObject("md.calving.vel_threshold",CalvingVelThresholdEnum));
+			parameters->AddObject(iomodel->CopyConstantObject("md.calving.vel_lowerbound",CalvingVelLowerboundEnum));
+			parameters->AddObject(iomodel->CopyConstantObject("md.calving.vel_upperbound",CalvingVelUpperboundEnum));
 			break;
 		default:
Index: /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp	(revision 27225)
+++ /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp	(revision 27226)
@@ -844,5 +844,6 @@
 	IssmDouble  arate, rho_ice, rho_water, thickness;
 	int			use_parameter=-1;
-	IssmDouble  gamma, theta, alpha, xoffset, yoffset, vel_threshold, vrate;
+	IssmDouble  gamma, theta, alpha, xoffset, yoffset;
+	IssmDouble  vel_lower, vel_upper, vrate, truncateVrate;
 
 	/* Get node coordinates and dof list: */
@@ -870,5 +871,6 @@
 	this->FindParam(&xoffset, CalvingXoffsetEnum);
 	this->FindParam(&yoffset, CalvingYoffsetEnum);
-	this->FindParam(&vel_threshold, CalvingVelThresholdEnum);
+	this->FindParam(&vel_lower, CalvingVelLowerboundEnum);
+	this->FindParam(&vel_upper, CalvingVelUpperboundEnum);
 
 	/* Start looping on the number of vertices: */
@@ -889,5 +891,5 @@
 		arate_input->GetInputValue(&arate,gauss);
 		vrate = 1.0;
-		if (vel < vel_threshold) vrate = vel / vel_threshold;
+		if (vel < vel_upper) vrate = vel / vel_upper;
 
 		/*Compute strain rate and viscosity: */
@@ -920,4 +922,14 @@
 				gamma = yoffset -  0.5*theta*tanh(alpha*(-thickness+xoffset));
 				break;
+			case 3:
+				/* 3 tanh(normal vel): f(x)=y_{o}-\frac{\theta}{2}\tanh(\alpha(x+x_{o})) */
+				_error_("The normalized velocity is not supported yet!");
+				gamma = yoffset -  0.5*theta*tanh(alpha*(vel+xoffset));
+				break;
+			case 4:
+				/* 4 tanh(truncated 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;
+				gamma = 0.5*theta*(tanh(alpha*xoffset) - tanh(alpha*(truncateVrate+xoffset)));
+				break;
 			case -1:
 				/* nothing, just the arate*/
@@ -934,7 +946,11 @@
 
 		/*-------------------------------------------*/
-		calvingrate[iv] = arate*gamma*vrate;
-	}
-
+		if (use_parameter < 3) {
+			calvingrate[iv] = arate*gamma*vrate;
+		} 
+		else {
+			calvingrate[iv] = arate*gamma;
+		}
+	}
 	/*Add input*/
 	this->AddInput(CalvingCalvingrateEnum,&calvingrate[0],P1DGEnum);
Index: /issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h
===================================================================
--- /issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h	(revision 27225)
+++ /issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h	(revision 27226)
@@ -116,5 +116,6 @@
 	CalvingXoffsetEnum,
 	CalvingYoffsetEnum,
-	CalvingVelThresholdEnum,
+	CalvingVelLowerboundEnum,
+	CalvingVelUpperboundEnum,
 	ConfigurationTypeEnum,
 	ConstantsGEnum,
Index: /issm/trunk-jpl/src/m/classes/calvingparameterization.m
===================================================================
--- /issm/trunk-jpl/src/m/classes/calvingparameterization.m	(revision 27225)
+++ /issm/trunk-jpl/src/m/classes/calvingparameterization.m	(revision 27226)
@@ -12,5 +12,6 @@
 		xoffset = 0;
 		yoffset = 0;
-		vel_threshold = 6000;
+		vel_upperbound = 6000;
+		vel_lowerbound = 0;
 	end
 	methods
@@ -52,6 +53,7 @@
 			% offset in y-axis 
 			self.yoffset = 0;
-			% velocity threshold to reduce calving rate
-			vel_threshold = 6000; % m/a
+			% velocity thresholds to reduce calving rate
+			vel_upperbound = 6000; % m/a
+			vel_lowerbound = 0; % m/a
 		end % }}}
 		function md = checkconsistency(self,md,solution,analyses) % {{{
@@ -60,20 +62,22 @@
 
 			md = checkfield(md,'fieldname','calving.min_thickness','>=',0,'NaN',1,'Inf',1,'numel',1);
-			md = checkfield(md,'fieldname','calving.use_param','values',[-1, 0, 1, 2]);
+			md = checkfield(md,'fieldname','calving.use_param','values',[-1, 0, 1, 2, 3, 4]);
 			md = checkfield(md,'fieldname','calving.theta','NaN',1,'Inf',1,'numel',1);
 			md = checkfield(md,'fieldname','calving.alpha','NaN',1,'Inf',1,'numel',1);
 			md = checkfield(md,'fieldname','calving.xoffset','NaN',1,'Inf',1,'numel',1);
 			md = checkfield(md,'fieldname','calving.yoffset','NaN',1,'Inf',1,'numel',1);
-			md = checkfield(md,'fieldname','calving.vel_threshold','NaN',1,'Inf',1,'numel',1);
+			md = checkfield(md,'fieldname','calving.vel_lowerbound','NaN',1,'Inf',1,'numel',1);
+			md = checkfield(md,'fieldname','calving.vel_upperbound','NaN',1,'Inf',1,'numel',1);
 		end % }}}
 		function disp(self) % {{{
 			disp(sprintf('   Calving test parameters:'));
 			fielddisplay(self,'min_thickness','minimum thickness below which no ice is allowed [m]');
-			fielddisplay(self,'use_param','-1 - just use frontal ablation rate, 0 - f(x) = y_{o} + \alpha (x+x_{o}), 1 - f(x)=y_{o}-\frac{\theta}{2}\tanh(\alpha(x+x_{o})), 2 - tanh(thickness)');
+			fielddisplay(self,'use_param','-1 - just use frontal ablation rate, 0 - f(x) = y_{o} + \alpha (x+x_{o}), 1 - f(x)=y_{o}-\frac{\theta}{2}\tanh(\alpha(x+x_{o})), 2 - tanh(thickness), 3 - tanh(normalized vel), 4 - tanh(truncated vel)');
 			fielddisplay(self,'theta','the amplifier');
 			fielddisplay(self,'alpha','the slope');
 			fielddisplay(self,'xoffset','offset in x-axis');
 			fielddisplay(self,'yoffset','offset in y-axis');
-			fielddisplay(self,'vel_threshold','threshold of ice velocity to reduce the calving rate');
+			fielddisplay(self,'vel_lowerbound','lowerbound of ice velocity to reduce the calving rate [m/a]');
+			fielddisplay(self,'vel_upperbound','upperbound of ice velocity to reduce the calving rate [m/a]');
 		end % }}}
 		function marshall(self,prefix,md,fid) % {{{
@@ -86,5 +90,6 @@
 			WriteData(fid,prefix,'object',self,'fieldname','xoffset','format','Double');
 			WriteData(fid,prefix,'object',self,'fieldname','yoffset','format','Double');
-			WriteData(fid,prefix,'object',self,'fieldname','vel_threshold','format','Double','scale', 1./yts);
+			WriteData(fid,prefix,'object',self,'fieldname','vel_lowerbound','format','Double','scale', 1./yts);
+			WriteData(fid,prefix,'object',self,'fieldname','vel_upperbound','format','Double','scale', 1./yts);
 		end % }}}
 	end
Index: /issm/trunk-jpl/src/m/classes/initialization.m
===================================================================
--- /issm/trunk-jpl/src/m/classes/initialization.m	(revision 27225)
+++ /issm/trunk-jpl/src/m/classes/initialization.m	(revision 27226)
@@ -150,6 +150,6 @@
 			yts=md.constants.yts;
 
-			WriteData(fid,prefix,'object',self,'fieldname','vx','format','DoubleMat','mattype',1,'scale',1./yts);
-			WriteData(fid,prefix,'object',self,'fieldname','vy','format','DoubleMat','mattype',1,'scale',1./yts);
+			WriteData(fid,prefix,'object',self,'fieldname','vx','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts);
+			WriteData(fid,prefix,'object',self,'fieldname','vy','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts);
 			WriteData(fid,prefix,'object',self,'fieldname','vz','format','DoubleMat','mattype',1,'scale',1./yts);
 			WriteData(fid,prefix,'object',self,'fieldname','pressure','format','DoubleMat','mattype',1);
Index: /issm/trunk-jpl/src/m/parameterization/setflowequation.m
===================================================================
--- /issm/trunk-jpl/src/m/parameterization/setflowequation.m	(revision 27225)
+++ /issm/trunk-jpl/src/m/parameterization/setflowequation.m	(revision 27226)
@@ -55,5 +55,5 @@
 %check that each element has at least one flag
 if any(SIAflag+SSAflag+HOflag+L1L2flag+MOLHOflag+FSflag==0),
-	error('elements type not assigned, supported models are ''SIA'',''SSA'',''HO'' and ''FS''')
+	error('elements type not assigned, supported models are ''SIA'',''SSA'',''HO'',''MOLHO'' and ''FS''')
 end
 
