Index: ../trunk-jpl/test/NightlyRun/test237.py
===================================================================
--- ../trunk-jpl/test/NightlyRun/test237.py	(revision 18983)
+++ ../trunk-jpl/test/NightlyRun/test237.py	(revision 18984)
@@ -56,13 +56,13 @@
     md.surfaceforcings.precipitations_lgm[md.mesh.numberofvertices,imonth]=((float(imonth)+1.)/12.)
 
 # 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
 md.timestepping.time_step=20.
Index: ../trunk-jpl/src/m/classes/SMBpdd.py
===================================================================
--- ../trunk-jpl/src/m/classes/SMBpdd.py	(revision 18983)
+++ ../trunk-jpl/src/m/classes/SMBpdd.py	(revision 18984)
@@ -113,7 +113,7 @@
 			md = checkfield(md,'fieldname','surfaceforcings.rlaps','>=',0,'numel',[1])
 			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)
 			elif self.isdelta18o:
@@ -150,7 +150,7 @@
 		WriteData(fid,'object',self,'class','surfaceforcings','fieldname','rlaps','format','Double')
 		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)
 		elif self.isdelta18o:
Index: ../trunk-jpl/src/m/classes/SMBpdd.m
===================================================================
--- ../trunk-jpl/src/m/classes/SMBpdd.m	(revision 18983)
+++ ../trunk-jpl/src/m/classes/SMBpdd.m	(revision 18984)
@@ -10,11 +10,11 @@
 		desfac                    = 0;
 		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;
 		delta18o                  = NaN;
@@ -74,27 +74,27 @@
 				md = checkfield(md,'fieldname','surfaceforcings.rlaps','>=',0,'numel',1);
 				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) % {{{
 			disp(sprintf('   surface forcings parameters:'));
@@ -143,10 +143,10 @@
 			WriteData(fid,'object',obj,'class','surfaceforcings','fieldname','rlaps','format','Double');
 			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);
 				WriteData(fid,'object',obj,'class','surfaceforcings','fieldname','temperatures_lgm','format','DoubleMat','mattype',1);
@@ -154,16 +154,16 @@
 				WriteData(fid,'object',obj,'class','surfaceforcings','fieldname','precipitations_lgm','format','DoubleMat','mattype',1);
 				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);
 				WriteData(fid,'object',obj,'class','surfaceforcings','fieldname','temperatures_lgm','format','DoubleMat','mattype',1);
 				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 % }}}
 	end
