Index: /issm/trunk-jpl/src/m/classes/calvingparameterization.m
===================================================================
--- /issm/trunk-jpl/src/m/classes/calvingparameterization.m	(revision 27459)
+++ /issm/trunk-jpl/src/m/classes/calvingparameterization.m	(revision 27460)
@@ -41,5 +41,5 @@
 			self.min_thickness = 0.;
 
-			%parameters for the spatial temporal seperation 
+			%Parameters for the spatial temporal separation
 			%The coefficient follows: gamma= f(x)
 			% 0 - f(x) = y_{o} + \alpha (x+x_{o})
@@ -48,13 +48,13 @@
 			% the amplifier
 			self.theta = 0;
-			% the slope alpha 
+			% the slope alpha
 			self.alpha = 0;
-			% offset in x-axis 
+			% offset in x-axis
 			self.xoffset = 0;
-			% offset in y-axis 
+			% offset in y-axis
 			self.yoffset = 0;
 			% velocity thresholds to reduce calving rate
-			vel_upperbound = 6000; % m/a
-			vel_lowerbound = 0; % m/a
+			self.vel_upperbound = 6000; % m/a
+			self.vel_lowerbound = 0; % m/a
 		end % }}}
 		function md = checkconsistency(self,md,solution,analyses) % {{{
Index: /issm/trunk-jpl/src/m/classes/calvingparameterization.py
===================================================================
--- /issm/trunk-jpl/src/m/classes/calvingparameterization.py	(revision 27459)
+++ /issm/trunk-jpl/src/m/classes/calvingparameterization.py	(revision 27460)
@@ -12,13 +12,14 @@
     """
 
-    def __init__(self):  # {{{
-        self.stress_threshold_groundedice = 0
-        self.stress_threshold_floatingice = 0
+    def __init__(self, *args):  # {{{
         self.min_thickness = 0
         self.use_param = 0
-        self.scale_theta = 0
-        self.amp_alpha = 0
-        self.midp = 0
-        self.nonlinearlaw = 0
+        self.theta = 0
+        self.alpha = 0
+        self.xoffset = 0
+        self.yoffset = 0
+        self.vel_upperbound = 0
+        self.vel_threshold = 0
+        self.vel_lowerbound = 0
 
         nargs = len(args)
@@ -33,8 +34,14 @@
 
     def __repr__(self):  # {{{
-        s = '   Calving VonMises parameters:\n'
-        s += '{}\n'.format(fielddisplay(self, 'stress_threshold_groundedice', 'sigma_max applied to grounded ice only [Pa]'))
-        s += '{}\n'.format(fielddisplay(self, 'stress_threshold_floatingice', 'sigma_max applied to floating ice only [Pa]'))
+        s = '   Calving test parameters:\n'
         s += '{}\n'.format(fielddisplay(self, 'min_thickness', 'minimum thickness below which no ice is allowed [m]'))
+        s += '{}\n'.format(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), 5 - linear(truncated vel)'))
+        s += '{}\n'.format(fielddisplay(self, 'theta', 'the amplifier'))
+        s += '{}\n'.format(fielddisplay(self, 'alpha', 'the slope'))
+        s += '{}\n'.format(fielddisplay(self, 'xoffset', 'offset in x-axis'))
+        s += '{}\n'.format(fielddisplay(self, 'yoffset', 'offset in y-axis'))
+        s += '{}\n'.format(fielddisplay(self, 'vel_lowerbound', 'lowerbound of ice velocity to reduce the calving rate [m/a]'))
+        s += '{}\n'.format(fielddisplay(self, 'vel_threshold', 'threshold of ice velocity to reduce the calving rate [m/a]'))
+        s += '{}\n'.format(fielddisplay(self, 'vel_upperbound', 'upperbound of ice velocity to reduce the calving rate [m/a]'))
         return s
     # }}}
@@ -45,10 +52,28 @@
 
     def setdefaultparameters(self):  # {{{
-        # Default sigma max
-        self.stress_threshold_groundedice = 1e6
-        self.stress_threshold_floatingice = 150e3
+        # For now we turn this off by setting the threshold to 0
+        self.min_thickness = 0.
 
-        # Turn off min_thickness by default
-        self.min_thickness = 0.
+        # Parameters for the spatial temporal separation
+        # The coefficient follows: gamma= f(x)
+        # 0 - f(x) = y_{o} + \alpha (x+x_{o})
+        # 1 - f(x)=y_{o}-\frac{\theta}{2}\tanh(\alpha(x+x_{o}))
+        self.use_param = 0
+
+        # The amplifier
+        self.theta = 0
+
+        # The slope alpha
+        self.alpha = 0
+
+        # Offset in x-axis
+        self.xoffset
+
+        # Offset in y-axis
+        self.yoffset
+
+        # Velocity thresholds to reduce calving rate
+        self.vel_upperbound = 6000 # m/a
+        self.vel_lowerbound = 0 # m/a
         return self
     # }}}
@@ -56,10 +81,16 @@
     def checkconsistency(self, md, solution, analyses):  # {{{
         # Early return
-        if solution == 'TransientSolution' or not md.transient.ismovingfront:
+        if not solution == 'TransientSolution' or not md.transient.ismovingfront:
             return
 
-        md = checkfield(md, 'fieldname', 'calving.stress_threshold_groundedice', '>', 0, 'nan', 1, 'Inf', 1, 'size', 'universal')
-        md = checkfield(md, 'fieldname', 'calving.stress_threshold_floatingice', '>', 0, 'nan', 1, 'Inf', 1, 'size', 'universal')
-        md = checkfield(md, 'fieldname', 'calving.min_thickness', '>=', 0, 'NaN', 1, 'Inf', 1, 'numel', [1])
+        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, 3, 4, 5])
+        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_lowerbound', '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_upperbound', 'NaN', 1, 'Inf', 1, 'numel', 1)
 
         return md
@@ -68,7 +99,13 @@
     def marshall(self, prefix, md, fid):  # {{{
         yts = md.constants.yts
-        WriteData(fid, prefix, 'name', 'md.calving.law', 'data', 2, 'format', 'Integer')
-        WriteData(fid, prefix, 'object', self, 'fieldname', 'stress_threshold_groundedice', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', yts )
-        WriteData(fid, prefix, 'object', self, 'fieldname', 'stress_threshold_floatingice', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', yts)
+        WriteData(fid, prefix, 'name', 'md.calving.law', 'data', 9, 'format', 'Integer')
         WriteData(fid, prefix, 'object', self, 'fieldname', 'min_thickness', 'format', 'Double')
+        WriteData(fid, prefix, 'object', self, 'fieldname', 'use_param', 'format', 'Integer')
+        WriteData(fid, prefix, 'object', self, 'fieldname', 'theta', 'format', 'Double')
+        WriteData(fid, prefix, 'object', self, 'fieldname', 'alpha', 'format', 'Double')
+        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_lowerbound', 'format', 'Double', 'scale', 1. / yts)
+        WriteData(fid, prefix, 'object', self, 'fieldname', 'vel_threshold','format', 'Double', 'scale', 1. / yts)
+        WriteData(fid, prefix, 'object', self, 'fieldname', 'vel_upperbound', 'format', 'Double', 'scale', 1. / yts)
     # }}}
