Index: issm/trunk-jpl/src/m/classes/SMBpdd.py
===================================================================
--- issm/trunk-jpl/src/m/classes/SMBpdd.py	(revision 24793)
+++ issm/trunk-jpl/src/m/classes/SMBpdd.py	(revision 25374)
@@ -34,4 +34,6 @@
         self.precipitations_presentday = float('NaN')
         self.precipitations_lgm = float('NaN')
+        self.pddfac_snow = float('NaN')
+        self.pddfac_ice = float('NaN')
         self.steps_per_step = 1
         self.averaging = 0
@@ -47,4 +49,5 @@
         string = "%s\n%s" % (string, fielddisplay(self, 'isdelta18o', 'is temperature and precipitation delta18o parametrisation activated (0 or 1, default is 0)'))
         string = "%s\n%s" % (string, fielddisplay(self, 'ismungsm', 'is temperature and precipitation mungsm parametrisation activated (0 or 1, default is 0)'))
+        string = "%s\n%s" % (string, fielddisplay(self, 'issetpddfac', 'is user passing in defined pdd factors (0 or 1, default is 0)'))
         string = "%s\n%s" % (string, fielddisplay(self, 'desfac', 'desertification elevation factor (between 0 and 1, default is 0.5) [m]'))
         string = "%s\n%s" % (string, fielddisplay(self, 's0p', 'should be set to elevation from precip source (between 0 and a few 1000s m, default is 0) [m]'))
@@ -73,5 +76,5 @@
                 string = "%s\n%s" % (string, fielddisplay(self, 'Tdiff', 'time interpolation parameter for temperature, 1D(year), required if mungsm is activated'))
                 string = "%s\n%s" % (string, fielddisplay(self, 'sealev', 'sea level [m], 1D(year), required if mungsm is activated'))
-
+                
         string = "%s\n%s" % (string, fielddisplay(self, 'steps_per_step', 'number of smb steps per time step'))
         string = "%s\n%s" % (string, fielddisplay(self, 'averaging', 'averaging methods from short to long steps'))
@@ -101,5 +104,9 @@
             self.precipitations_presentday = project3d(md, 'vector', self.precipitations_presentday, 'type', 'node')
             self.precipitations_lgm = project3d(md, 'vector', self.precipitations_lgm, 'type', 'node')
-
+       
+        if self.issetpddfac:
+            self.pddfac_snow = project3d(md, 'vector', self.pddfac_snow, 'type', 'node')
+        if self.issetpddfac:
+            self.pddfac_ice = project3d(md, 'vector', self.pddfac_ice, 'type', 'node')
         self.s0p = project3d(md, 'vector', self.s0p, 'type', 'node')
         self.s0t = project3d(md, 'vector', self.s0t, 'type', 'node')
@@ -130,4 +137,5 @@
         self.rlaps = 6.5
         self.rlapslgm = 6.5
+        self.issetpddfac = 0
 
         return self
@@ -164,4 +172,8 @@
                 md = checkfield(md, 'fieldname', 'smb.sealev', 'NaN', 1, 'Inf', 1, 'size', [2, np.nan], 'singletimeseries', 1)
 
+            if self.issetpddfac:
+                md = checkfield(md, 'fieldname', 'smb.pddfac_snow', '>=', 0, 'NaN', 1, 'Inf', 1)
+                md = checkfield(md, 'fieldname', 'smb.pddfac_ice', '>=', 0, 'NaN', 1, 'Inf', 1)
+
         md = checkfield(md, 'fieldname', 'smb.steps_per_step', '>=', 1, 'numel', [1])
         md = checkfield(md, 'fieldname', 'smb.averaging', 'numel', [1], 'values', [0, 1, 2])
@@ -206,4 +218,8 @@
             WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'Tdiff', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', 2, 'yts', md.constants.yts)
             WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'sealev', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', 2, 'yts', md.constants.yts)
+       
+        if self.issetpddfac:
+            WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'pddfac_snow', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', md.constants.yts)
+            WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'pddfac_ice', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', md.constants.yts)
 
         #process requested outputs
