Index: /issm/trunk-jpl/src/m/classes/SMBpdd.m
===================================================================
--- /issm/trunk-jpl/src/m/classes/SMBpdd.m	(revision 18983)
+++ /issm/trunk-jpl/src/m/classes/SMBpdd.m	(revision 18984)
@@ -11,9 +11,9 @@
 		s0p                       = 0;
 		s0t                       = 0;
-                rlaps                     = 0;
-                rlapslgm                  = 0;                
-                Pfac                      = NaN;
-                Tdiff                     = NaN;
-                sealev                    = NaN;
+		rlaps                     = 0;
+		rlapslgm                  = 0;                
+		Pfac                      = NaN;
+		Tdiff                     = NaN;
+		sealev                    = NaN;
 		isdelta18o                = 0;
 		ismungsm                  = 0;
@@ -75,25 +75,25 @@
 				md = checkfield(md,'fieldname','surfaceforcings.rlapslgm','>=',0,'numel',1);
 				if(obj.isdelta18o==0 & obj.ismungsm==0)
-                                    md = checkfield(md,'fieldname','surfaceforcings.monthlytemperatures','forcing',1,'NaN',1);
-                                    md = checkfield(md,'fieldname','surfaceforcings.precipitation','forcing',1,'NaN',1);
-                                elseif(obj.isdelta18o==1) 
-                                    md = checkfield(md,'fieldname','surfaceforcings.delta18o','NaN',1);
-                                    md = checkfield(md,'fieldname','surfaceforcings.delta18o_surface','NaN',1);
-                                    md = checkfield(md,'fieldname','surfaceforcings.temperatures_presentday','size',[md.mesh.numberofvertices+1 12],'NaN',1);
-                                    md = checkfield(md,'fieldname','surfaceforcings.temperatures_lgm','size',[md.mesh.numberofvertices+1 12],'NaN',1);
-                                    md = checkfield(md,'fieldname','surfaceforcings.precipitations_presentday','size',[md.mesh.numberofvertices+1 12],'NaN',1);
-                                    md = checkfield(md,'fieldname','surfaceforcings.precipitations_lgm','size',[md.mesh.numberofvertices+1 12],'NaN',1);                                       
-                                    md = checkfield(md,'fieldname','surfaceforcings.Tdiff','NaN',1);
-                                    md = checkfield(md,'fieldname','surfaceforcings.sealev','NaN',1);
-                                elseif(obj.ismungsm==1) 
-                                    md = checkfield(md,'fieldname','surfaceforcings.temperatures_presentday','size',[md.mesh.numberofvertices+1 12],'NaN',1);
-                                    md = checkfield(md,'fieldname','surfaceforcings.temperatures_lgm','size',[md.mesh.numberofvertices+1 12],'NaN',1);
-                                    md = checkfield(md,'fieldname','surfaceforcings.precipitations_presentday','size',[md.mesh.numberofvertices+1 12],'NaN',1);
-                                    md = checkfield(md,'fieldname','surfaceforcings.precipitations_lgm','size',[md.mesh.numberofvertices+1 12],'NaN',1);                                       
-                                    md = checkfield(md,'fieldname','surfaceforcings.Pfac','NaN',1,'size',[2,NaN]);
-                                    md = checkfield(md,'fieldname','surfaceforcings.Tdiff','NaN',1);
-                                    md = checkfield(md,'fieldname','surfaceforcings.sealev','NaN',1);
+					md = checkfield(md,'fieldname','surfaceforcings.monthlytemperatures','forcing',1,'NaN',1);
+					md = checkfield(md,'fieldname','surfaceforcings.precipitation','forcing',1,'NaN',1);
+				elseif(obj.isdelta18o==1) 
+					md = checkfield(md,'fieldname','surfaceforcings.delta18o','NaN',1);
+					md = checkfield(md,'fieldname','surfaceforcings.delta18o_surface','NaN',1);
+					md = checkfield(md,'fieldname','surfaceforcings.temperatures_presentday','size',[md.mesh.numberofvertices+1 12],'NaN',1);
+					md = checkfield(md,'fieldname','surfaceforcings.temperatures_lgm','size',[md.mesh.numberofvertices+1 12],'NaN',1);
+					md = checkfield(md,'fieldname','surfaceforcings.precipitations_presentday','size',[md.mesh.numberofvertices+1 12],'NaN',1);
+					md = checkfield(md,'fieldname','surfaceforcings.precipitations_lgm','size',[md.mesh.numberofvertices+1 12],'NaN',1);                                       
+					md = checkfield(md,'fieldname','surfaceforcings.Tdiff','NaN',1);
+					md = checkfield(md,'fieldname','surfaceforcings.sealev','NaN',1);
+				elseif(obj.ismungsm==1) 
+					md = checkfield(md,'fieldname','surfaceforcings.temperatures_presentday','size',[md.mesh.numberofvertices+1 12],'NaN',1);
+					md = checkfield(md,'fieldname','surfaceforcings.temperatures_lgm','size',[md.mesh.numberofvertices+1 12],'NaN',1);
+					md = checkfield(md,'fieldname','surfaceforcings.precipitations_presentday','size',[md.mesh.numberofvertices+1 12],'NaN',1);
+					md = checkfield(md,'fieldname','surfaceforcings.precipitations_lgm','size',[md.mesh.numberofvertices+1 12],'NaN',1);                                       
+					md = checkfield(md,'fieldname','surfaceforcings.Pfac','NaN',1,'size',[2,NaN]);
+					md = checkfield(md,'fieldname','surfaceforcings.Tdiff','NaN',1);
+					md = checkfield(md,'fieldname','surfaceforcings.sealev','NaN',1);
 				end
-                        end
+			end
 		end % }}}
 		function disp(obj) % {{{
@@ -144,8 +144,8 @@
 			WriteData(fid,'object',obj,'class','surfaceforcings','fieldname','rlapslgm','format','Double');
 
-                        if(obj.isdelta18o==0 & obj.ismungsm==0)
-                            %WriteData(fid,'object',obj,'class','surfaceforcings','fieldname','monthlytemperatures','format','DoubleMat','mattype',1);
-                            WriteData(fid,'object',obj,'class','surfaceforcings','fieldname','monthlytemperatures','format','DoubleMat','mattype',1,'forcinglength',md.mesh.numberofvertices+1);
-                            WriteData(fid,'object',obj,'class','surfaceforcings','fieldname','precipitation','format','DoubleMat','mattype',1,'scale',1./yts,'forcinglength',md.mesh.numberofvertices+1);
+			if(obj.isdelta18o==0 & obj.ismungsm==0)
+				%WriteData(fid,'object',obj,'class','surfaceforcings','fieldname','monthlytemperatures','format','DoubleMat','mattype',1);
+				WriteData(fid,'object',obj,'class','surfaceforcings','fieldname','monthlytemperatures','format','DoubleMat','mattype',1,'forcinglength',md.mesh.numberofvertices+1);
+				WriteData(fid,'object',obj,'class','surfaceforcings','fieldname','precipitation','format','DoubleMat','mattype',1,'scale',1./yts,'forcinglength',md.mesh.numberofvertices+1);
 			elseif obj.isdelta18o
 				WriteData(fid,'object',obj,'class','surfaceforcings','fieldname','temperatures_presentday','format','DoubleMat','mattype',1);
@@ -155,6 +155,6 @@
 				WriteData(fid,'object',obj,'class','surfaceforcings','fieldname','delta18o_surface','format','DoubleMat','mattype',1);
 				WriteData(fid,'object',obj,'class','surfaceforcings','fieldname','delta18o','format','DoubleMat','mattype',1);
-                                WriteData(fid,'object',obj,'class','surfaceforcings','fieldname','Tdiff','format','DoubleMat','mattype',1);
-                                WriteData(fid,'object',obj,'class','surfaceforcings','fieldname','sealev','format','DoubleMat','mattype',1);
+				WriteData(fid,'object',obj,'class','surfaceforcings','fieldname','Tdiff','format','DoubleMat','mattype',1);
+				WriteData(fid,'object',obj,'class','surfaceforcings','fieldname','sealev','format','DoubleMat','mattype',1);
 			elseif obj.ismungsm
 				WriteData(fid,'object',obj,'class','surfaceforcings','fieldname','temperatures_presentday','format','DoubleMat','mattype',1);
@@ -162,7 +162,7 @@
 				WriteData(fid,'object',obj,'class','surfaceforcings','fieldname','precipitations_presentday','format','DoubleMat','mattype',1);
 				WriteData(fid,'object',obj,'class','surfaceforcings','fieldname','precipitations_lgm','format','DoubleMat','mattype',1);
-                                WriteData(fid,'object',obj,'class','surfaceforcings','fieldname','Pfac','format','DoubleMat','mattype',1);
-                                WriteData(fid,'object',obj,'class','surfaceforcings','fieldname','Tdiff','format','DoubleMat','mattype',1);
-                                WriteData(fid,'object',obj,'class','surfaceforcings','fieldname','sealev','format','DoubleMat','mattype',1);
+				WriteData(fid,'object',obj,'class','surfaceforcings','fieldname','Pfac','format','DoubleMat','mattype',1);
+				WriteData(fid,'object',obj,'class','surfaceforcings','fieldname','Tdiff','format','DoubleMat','mattype',1);
+				WriteData(fid,'object',obj,'class','surfaceforcings','fieldname','sealev','format','DoubleMat','mattype',1);
 			end
 		end % }}}
Index: /issm/trunk-jpl/src/m/classes/SMBpdd.py
===================================================================
--- /issm/trunk-jpl/src/m/classes/SMBpdd.py	(revision 18983)
+++ /issm/trunk-jpl/src/m/classes/SMBpdd.py	(revision 18984)
@@ -114,5 +114,5 @@
 			md = checkfield(md,'fieldname','surfaceforcings.rlapslgm','>=',0,'numel',[1])
 
-			if not (self.isdelta18o and self.ismungsm):
+			if (self.isdelta18o==0 and self.ismungsm==0):
 				md = checkfield(md,'fieldname','surfaceforcings.monthlytemperatures','NaN',1)
 				md = checkfield(md,'fieldname','surfaceforcings.precipitation','NaN',1)
@@ -151,5 +151,5 @@
 		WriteData(fid,'object',self,'class','surfaceforcings','fieldname','rlapslgm','format','Double')
 
-		if not (self.isdelta18o and self.ismungsm):
+		if (self.isdelta18o==0 and self.ismungsm==0):
 			WriteData(fid,'object',self,'class','surfaceforcings','fieldname','monthlytemperatures','format','DoubleMat','mattype',1)
 			WriteData(fid,'object',self,'class','surfaceforcings','fieldname','precipitation','format','DoubleMat','mattype',1,'scale',1./yts,'forcinglength',md.mesh.numberofvertices+1)
Index: /issm/trunk-jpl/test/NightlyRun/test237.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test237.py	(revision 18983)
+++ /issm/trunk-jpl/test/NightlyRun/test237.py	(revision 18984)
@@ -57,11 +57,11 @@
 
 # Interpolation factors
-md.surfaceforcings.Pfac[1,1:md.timestepping.final_time]=0.5;
-md.surfaceforcings.Tdiff[1,1:md.timestepping.final_time]=0.5;
-md.surfaceforcings.sealev[1,1:md.timestepping.final_time]=0.5;
+md.surfaceforcings.Pfac=0.5*numpy.ones((2,md.timestepping.final_time))
+md.surfaceforcings.Tdiff=0.5*numpy.ones((2,md.timestepping.final_time))
+md.surfaceforcings.sealev=0.5*numpy.ones((2,md.timestepping.final_time))
 # Year of each data point
-md.surfaceforcings.Pfac[2,1:md.timestepping.final_time]=1:1:md.timestepping.final_time;
-md.surfaceforcings.Tdiff[2,1:md.timestepping.final_time]=1:1:md.timestepping.final_time;
-md.surfaceforcings.sealev[2,1:md.timestepping.final_time]=1:1:md.timestepping.final_time;
+md.surfaceforcings.Pfac[1,1:md.timestepping.final_time]=numpy.arange(1.,md.timestepping.final_time)
+md.surfaceforcings.Tdiff[1,1:md.timestepping.final_time]=numpy.arange(1.,md.timestepping.final_time)
+md.surfaceforcings.sealev[1,1:md.timestepping.final_time]=numpy.arange(1.,md.timestepping.final_time)
 
 # time steps and resolution
