Index: issm/trunk-jpl/src/m/classes/frictionwaterlayer.py
===================================================================
--- issm/trunk-jpl/src/m/classes/frictionwaterlayer.py	(revision 24213)
+++ issm/trunk-jpl/src/m/classes/frictionwaterlayer.py	(revision 25499)
@@ -1,21 +1,38 @@
+import numpy as np
+
+from checkfield import checkfield
+from fielddisplay import fielddisplay
 from project3d import project3d
-from fielddisplay import fielddisplay
-from checkfield import checkfield
 from WriteData import WriteData
 
 
 class frictionwaterlayer(object):
-    """
-    frictionwaterlayer class definition
+    """FRICTIONWATERLAYER class definition
 
     Usage:
         friction = frictionwaterlayer(md)
     """
+
     def __init__(self, md):  # {{{
-        self.coefficient = md.friction.coefficient
-        self.f = float('NaN')
-        self.p = md.friction.p
-        self.q = md.friction.q
-        self.water_layer = float('NaN')
+        self.coefficient = np.nan
+        self.f = np.nan
+        self.p = np.nan
+        self.q = np.nan
+        self.water_layer = np.nan
+    #}}}
+
+    def __repr__(self):  # {{{
+        s = 'Basal shear stress parameters: tau_b = coefficient^2 * Neff ^r * |u_b|^(s - 1) * u_b * 1 / f(T)\n(effective stress Neff = rho_ice * g * thickness + rho_water * g * (bed + water_layer), r = q / p and s = 1 / p)\n'
+        s = "{}\n".format(fielddisplay(self, 'coefficient', 'frictiontemp coefficient [SI]'))
+        s = "{}\n".format(fielddisplay(self, 'f', 'f variable for effective pressure'))
+        s = "{}\n".format(fielddisplay(self, 'p', 'p exponent'))
+        s = "{}\n".format(fielddisplay(self, 'q', 'q exponent'))
+        s = "{}\n".format(fielddisplay(self, 'water_layer', 'water thickness at the base of the ice (m)'))
+
+        return s
+    #}}}
+
+    def setdefaultparameters(self):  # {{{
+        return self
     #}}}
 
@@ -37,25 +54,14 @@
         self.q = project3d(md, 'vector', self.q, 'type', 'element')
         self.water_layer = project3d(md, 'vector', self.water_layer, 'type', 'node', 'layer', 1)
+
         return self
     # }}}
 
-    def __repr__(self):  # {{{
-        string = 'Basal shear stress parameters: tau_b = coefficient^2 * Neff ^r * |u_b|^(s - 1) * u_b * 1 / f(T)\n(effective stress Neff = rho_ice * g * thickness + rho_water * g * (bed + water_layer), r = q / p and s = 1 / p)'
-        string = "%s\n%s" % (string, fielddisplay(self, 'coefficient', 'frictiontemp coefficient [SI]'))
-        string = "%s\n%s" % (string, fielddisplay(self, 'f', 'f variable for effective pressure'))
-        string = "%s\n%s" % (string, fielddisplay(self, 'p', 'p exponent'))
-        string = "%s\n%s" % (string, fielddisplay(self, 'q', 'q exponent'))
-        string = "%s\n%s" % (string, fielddisplay(self, 'water_layer', 'water thickness at the base of the ice (m)'))
-
-        return string
-    #}}}
-
     def marshall(self, prefix, md, fid):  #{{{
-        yts = md.constants.yts
         WriteData(fid, prefix, 'name', 'md.friction.law', 'data', 5, 'format', 'Integer')
-        WriteData(fid, prefix, 'class', 'friction', 'object', self, 'fieldname', 'coefficient', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', yts)
+        WriteData(fid, prefix, 'class', 'friction', 'object', self, 'fieldname', 'coefficient', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', md.constants.yts)
         WriteData(fid, prefix, 'class', 'friction', 'object', self, 'fieldname', 'f', 'format', 'Double')
         WriteData(fid, prefix, 'class', 'friction', 'object', self, 'fieldname', 'p', 'format', 'DoubleMat', 'mattype', 2)
         WriteData(fid, prefix, 'class', 'friction', 'object', self, 'fieldname', 'q', 'format', 'DoubleMat', 'mattype', 2)
-        WriteData(fid, prefix, 'class', 'friction', 'object', self, 'fieldname', 'water_layer', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', yts)
+        WriteData(fid, prefix, 'class', 'friction', 'object', self, 'fieldname', 'water_layer', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', md.constants.yts)
     #}}}
