Index: issm/trunk-jpl/src/c/classes/Elements/Element.cpp
===================================================================
--- issm/trunk-jpl/src/c/classes/Elements/Element.cpp	(revision 19263)
+++ issm/trunk-jpl/src/c/classes/Elements/Element.cpp	(revision 19264)
@@ -539,4 +539,6 @@
 			input2->GetInputValue(&TemperaturesLgm[iv][month],gauss,month/12.*yts);
 			input3->GetInputValue(&PrecipitationsPresentday[iv][month],gauss,month/12.*yts);
+
+			PrecipitationsPresentday[iv][month]=PrecipitationsPresentday[iv][month]*yts;
 		}
 	}
@@ -570,5 +572,5 @@
 			default: _error_("Not implemented yet");
 		}
-		for(i=0;i<numvertices;i++) tmp[i]=monthlyprec[i][imonth];
+		for(i=0;i<numvertices;i++) tmp[i]=monthlyprec[i][imonth]/yts;
 		switch(this->ObjectEnum()){
 			case TriaEnum:  NewPrecipitationInput->AddTimeInput(new TriaInput(SurfaceforcingsPrecipitationEnum,&tmp[0],P1Enum),time_yr+imonth/12.*yts); break;
@@ -629,4 +631,7 @@
 			input3->GetInputValue(&PrecipitationsPresentday[iv][month],gauss,month/12.*yts);
 			input4->GetInputValue(&PrecipitationsLgm[iv][month],gauss,month/12.*yts);
+
+			PrecipitationsPresentday[iv][month]=PrecipitationsPresentday[iv][month]*yts;
+			PrecipitationsLgm[iv][month]=PrecipitationsLgm[iv][month]*yts;
 		}
 	}
@@ -655,5 +660,5 @@
 			default: _error_("Not implemented yet");
 		}
-		for(i=0;i<numvertices;i++) tmp[i]=monthlyprec[i][imonth];
+		for(i=0;i<numvertices;i++) tmp[i]=monthlyprec[i][imonth]/yts;
 		switch(this->ObjectEnum()){
 			case TriaEnum:  NewPrecipitationInput->AddTimeInput(new TriaInput(SurfaceforcingsPrecipitationEnum,&tmp[0],P1Enum),time_yr+imonth/12.*yts); break;
@@ -714,4 +719,6 @@
 			input->GetInputValue(&TemperaturesPresentday[iv][month],gauss,month/12.*yts);
 			input2->GetInputValue(&PrecipitationsPresentday[iv][month],gauss,month/12.*yts);
+
+			PrecipitationsPresentday[iv][month]=PrecipitationsPresentday[iv][month]*yts;
 		}
 	}
@@ -738,5 +745,5 @@
 			default: _error_("Not implemented yet");
 		}
-		for(i=0;i<numvertices;i++) tmp[i]=monthlyprec[i][imonth];
+		for(i=0;i<numvertices;i++) tmp[i]=monthlyprec[i][imonth]/yts;
 		switch(this->ObjectEnum()){
 			case TriaEnum:  NewPrecipitationInput->AddTimeInput(new TriaInput(SurfaceforcingsPrecipitationEnum,&tmp[0],P1Enum),time_yr+imonth/12.*yts); break;
@@ -1687,4 +1694,5 @@
 			monthlytemperatures[iv][month]=monthlytemperatures[iv][month]-273.15; // conversion from Kelvin to celcius for PDD module
 			input2->GetInputValue(&monthlyprec[iv][month],gauss,time_yr+month/12.*yts);
+			monthlyprec[iv][month]=monthlyprec[iv][month]*yts;
 		}
 	}
Index: issm/trunk-jpl/src/m/classes/SMBd18opdd.m
===================================================================
--- issm/trunk-jpl/src/m/classes/SMBd18opdd.m	(revision 19263)
+++ issm/trunk-jpl/src/m/classes/SMBd18opdd.m	(revision 19264)
@@ -107,7 +107,7 @@
 
 			if self.isd18opd
-				WriteData(fid,'object',self,'class','surfaceforcings','fieldname','temperatures_presentday','format','DoubleMat','mattype',1);
-				WriteData(fid,'object',self,'class','surfaceforcings','fieldname','precipitations_presentday','format','DoubleMat','mattype',1);
-				WriteData(fid,'object',self,'class','surfaceforcings','fieldname','delta18o','format','DoubleMat','mattype',3,'timeserieslength',2);
+				WriteData(fid,'object',self,'class','surfaceforcings','fieldname','temperatures_presentday','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1);
+				WriteData(fid,'object',self,'class','surfaceforcings','fieldname','precipitations_presentday','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1);
+				WriteData(fid,'object',self,'class','surfaceforcings','fieldname','delta18o','format','DoubleMat','mattype',1,'timeserieslength',2);
 				WriteData(fid,'object',self,'class','surfaceforcings','fieldname','dpermil','format','Double');
 			end
Index: issm/trunk-jpl/src/m/classes/SMBd18opdd.py
===================================================================
--- issm/trunk-jpl/src/m/classes/SMBd18opdd.py	(revision 19263)
+++ issm/trunk-jpl/src/m/classes/SMBd18opdd.py	(revision 19264)
@@ -111,6 +111,6 @@
 
 		if self.isd18opd:
-			WriteData(fid,'object',self,'class','surfaceforcings','fieldname','temperatures_presentday','format','DoubleMat','mattype',1)
-			WriteData(fid,'object',self,'class','surfaceforcings','fieldname','precipitations_presentday','format','DoubleMat','mattype',1)
+			WriteData(fid,'object',self,'class','surfaceforcings','fieldname','temperatures_presentday','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1)
+			WriteData(fid,'object',self,'class','surfaceforcings','fieldname','precipitations_presentday','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1)
 			WriteData(fid,'object',self,'class','surfaceforcings','fieldname','delta18o','format','DoubleMat','mattype',1,'timeserieslength',2)
 			WriteData(fid,'object',self,'class','surfaceforcings','fieldname','dpermil','format','DoubleMat','mattype',1)
Index: issm/trunk-jpl/src/m/classes/SMBpdd.m
===================================================================
--- issm/trunk-jpl/src/m/classes/SMBpdd.m	(revision 19263)
+++ issm/trunk-jpl/src/m/classes/SMBpdd.m	(revision 19264)
@@ -108,25 +108,25 @@
 			fielddisplay(self,'rlaps','present day lapse rate [degree/km]');
 			fielddisplay(self,'rlapslgm','LGM lapse rate [degree/km]');
-                        if(self.isdelta18o==0 & self.ismungsm==0)
-                            fielddisplay(self,'monthlytemperatures',['monthly surface temperatures [K], required if pdd is activated and delta18o not activated']);
-                            fielddisplay(self,'precipitation',['monthly surface precipitation [m/yr water eq], required if pdd is activated and delta18o or mungsm not activated']);
-                        elseif(self.isdelta18o==1)
-                            fielddisplay(self,'delta18o','delta18o [per mil], required if pdd is activated and delta18o activated');
-                            fielddisplay(self,'delta18o_surface','surface elevation of the delta18o site, required if pdd is activated and delta18o activated');
-                            fielddisplay(self,'temperatures_presentday','monthly present day surface temperatures [K], required if delta18o/mungsm is activated');
-                            fielddisplay(self,'temperatures_lgm','monthly LGM surface temperatures [K], required if delta18o or mungsm is activated');
-                            fielddisplay(self,'precipitations_presentday','monthly surface precipitation [m/yr water eq], required if delta18o/mungsm is activated');
-                            fielddisplay(self,'precipitations_lgm','monthly surface precipitation [m/yr water eq], required if delta18o/mungsm is activated');
-                            fielddisplay(self,'Tdiff','time interpolation parameter for temperature, 1D(year), required if mungsm is activated');
-                            fielddisplay(self,'sealev','sea level [m], 1D(year), required if mungsm is activated');
-                        elseif(self.ismungsm==1)
-                            fielddisplay(self,'temperatures_presentday','monthly present day surface temperatures [K], required if delta18o/mungsm is activated');
-                            fielddisplay(self,'temperatures_lgm','monthly LGM surface temperatures [K], required if delta18o or mungsm is activated');
-                            fielddisplay(self,'precipitations_presentday','monthly surface precipitation [m/yr water eq], required if delta18o/mungsm is activated');
-                            fielddisplay(self,'precipitations_lgm','monthly surface precipitation [m/yr water eq], required if delta18o/mungsm is activated');
-                            fielddisplay(self,'Pfac','time interpolation parameter for precipitation, 1D(year), required if mungsm is activated');
-                            fielddisplay(self,'Tdiff','time interpolation parameter for temperature, 1D(year), required if mungsm is activated');
-                            fielddisplay(self,'sealev','sea level [m], 1D(year), required if mungsm is activated');
-                        end
+			if(self.isdelta18o==0 & self.ismungsm==0)
+				fielddisplay(self,'monthlytemperatures',['monthly surface temperatures [K], required if pdd is activated and delta18o not activated']);
+				fielddisplay(self,'precipitation',['monthly surface precipitation [m/yr water eq], required if pdd is activated and delta18o or mungsm not activated']);
+			elseif(self.isdelta18o==1)
+				fielddisplay(self,'delta18o','delta18o [per mil], required if pdd is activated and delta18o activated');
+				fielddisplay(self,'delta18o_surface','surface elevation of the delta18o site, required if pdd is activated and delta18o activated');
+				fielddisplay(self,'temperatures_presentday','monthly present day surface temperatures [K], required if delta18o/mungsm is activated');
+				fielddisplay(self,'temperatures_lgm','monthly LGM surface temperatures [K], required if delta18o or mungsm is activated');
+				fielddisplay(self,'precipitations_presentday','monthly surface precipitation [m/yr water eq], required if delta18o/mungsm is activated');
+				fielddisplay(self,'precipitations_lgm','monthly surface precipitation [m/yr water eq], required if delta18o/mungsm is activated');
+				fielddisplay(self,'Tdiff','time interpolation parameter for temperature, 1D(year), required if mungsm is activated');
+				fielddisplay(self,'sealev','sea level [m], 1D(year), required if mungsm is activated');
+			elseif(self.ismungsm==1)
+				fielddisplay(self,'temperatures_presentday','monthly present day surface temperatures [K], required if delta18o/mungsm is activated');
+				fielddisplay(self,'temperatures_lgm','monthly LGM surface temperatures [K], required if delta18o or mungsm is activated');
+				fielddisplay(self,'precipitations_presentday','monthly surface precipitation [m/yr water eq], required if delta18o/mungsm is activated');
+				fielddisplay(self,'precipitations_lgm','monthly surface precipitation [m/yr water eq], required if delta18o/mungsm is activated');
+				fielddisplay(self,'Pfac','time interpolation parameter for precipitation, 1D(year), required if mungsm is activated');
+				fielddisplay(self,'Tdiff','time interpolation parameter for temperature, 1D(year), required if mungsm is activated');
+				fielddisplay(self,'sealev','sea level [m], 1D(year), required if mungsm is activated');
+			end
 		end % }}}
 		function marshall(self,md,fid) % {{{
@@ -149,17 +149,17 @@
 				WriteData(fid,'object',self,'class','surfaceforcings','fieldname','precipitation','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1);
 			elseif self.isdelta18o
-				WriteData(fid,'object',self,'class','surfaceforcings','fieldname','temperatures_presentday','format','DoubleMat','mattype',1);
-				WriteData(fid,'object',self,'class','surfaceforcings','fieldname','temperatures_lgm','format','DoubleMat','mattype',1);
-				WriteData(fid,'object',self,'class','surfaceforcings','fieldname','precipitations_presentday','format','DoubleMat','mattype',1);
-				WriteData(fid,'object',self,'class','surfaceforcings','fieldname','precipitations_lgm','format','DoubleMat','mattype',1);
-				WriteData(fid,'object',self,'class','surfaceforcings','fieldname','delta18o_surface','format','DoubleMat','mattype',1);
-				WriteData(fid,'object',self,'class','surfaceforcings','fieldname','delta18o','format','DoubleMat','mattype',1);
+				WriteData(fid,'object',self,'class','surfaceforcings','fieldname','temperatures_presentday','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1);
+				WriteData(fid,'object',self,'class','surfaceforcings','fieldname','temperatures_lgm','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1);
+				WriteData(fid,'object',self,'class','surfaceforcings','fieldname','precipitations_presentday','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1);
+				WriteData(fid,'object',self,'class','surfaceforcings','fieldname','precipitations_lgm','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1);
+				WriteData(fid,'object',self,'class','surfaceforcings','fieldname','delta18o_surface','format','DoubleMat','mattype',1,'timeserieslength',2);
+				WriteData(fid,'object',self,'class','surfaceforcings','fieldname','delta18o','format','DoubleMat','mattype',1,'timeserieslength',2);
 				WriteData(fid,'object',self,'class','surfaceforcings','fieldname','Tdiff','format','DoubleMat','mattype',1,'timeserieslength',2);
 				WriteData(fid,'object',self,'class','surfaceforcings','fieldname','sealev','format','DoubleMat','mattype',1,'timeserieslength',2);
 			elseif self.ismungsm
-				WriteData(fid,'object',self,'class','surfaceforcings','fieldname','temperatures_presentday','format','DoubleMat','mattype',1);
-				WriteData(fid,'object',self,'class','surfaceforcings','fieldname','temperatures_lgm','format','DoubleMat','mattype',1);
-				WriteData(fid,'object',self,'class','surfaceforcings','fieldname','precipitations_presentday','format','DoubleMat','mattype',1);
-				WriteData(fid,'object',self,'class','surfaceforcings','fieldname','precipitations_lgm','format','DoubleMat','mattype',1);
+				WriteData(fid,'object',self,'class','surfaceforcings','fieldname','temperatures_presentday','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1);
+				WriteData(fid,'object',self,'class','surfaceforcings','fieldname','temperatures_lgm','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1);
+				WriteData(fid,'object',self,'class','surfaceforcings','fieldname','precipitations_presentday','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1);
+				WriteData(fid,'object',self,'class','surfaceforcings','fieldname','precipitations_lgm','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1);
 				WriteData(fid,'object',self,'class','surfaceforcings','fieldname','Pfac','format','DoubleMat','mattype',1,'timeserieslength',2);
 				WriteData(fid,'object',self,'class','surfaceforcings','fieldname','Tdiff','format','DoubleMat','mattype',1,'timeserieslength',2);
Index: issm/trunk-jpl/src/m/classes/SMBpdd.py
===================================================================
--- issm/trunk-jpl/src/m/classes/SMBpdd.py	(revision 19263)
+++ issm/trunk-jpl/src/m/classes/SMBpdd.py	(revision 19264)
@@ -152,20 +152,20 @@
 
 		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','monthlytemperatures','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1)
 			WriteData(fid,'object',self,'class','surfaceforcings','fieldname','precipitation','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1)
 		elif self.isdelta18o:
-			WriteData(fid,'object',self,'class','surfaceforcings','fieldname','temperatures_presentday','format','DoubleMat','mattype',1)
-			WriteData(fid,'object',self,'class','surfaceforcings','fieldname','temperatures_lgm','format','DoubleMat','mattype',1)
-			WriteData(fid,'object',self,'class','surfaceforcings','fieldname','precipitations_presentday','format','DoubleMat','mattype',1)
-			WriteData(fid,'object',self,'class','surfaceforcings','fieldname','precipitations_lgm','format','DoubleMat','mattype',1)
-			WriteData(fid,'object',self,'class','surfaceforcings','fieldname','delta18o_surface','format','DoubleMat','mattype',1)
-			WriteData(fid,'object',self,'class','surfaceforcings','fieldname','delta18o','format','DoubleMat','mattype',1)
+			WriteData(fid,'object',self,'class','surfaceforcings','fieldname','temperatures_presentday','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1)
+			WriteData(fid,'object',self,'class','surfaceforcings','fieldname','temperatures_lgm','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1)
+			WriteData(fid,'object',self,'class','surfaceforcings','fieldname','precipitations_presentday','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1)
+			WriteData(fid,'object',self,'class','surfaceforcings','fieldname','precipitations_lgm','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1)
+			WriteData(fid,'object',self,'class','surfaceforcings','fieldname','delta18o_surface','format','DoubleMat','mattype',1,'timeserieslength',2)
+			WriteData(fid,'object',self,'class','surfaceforcings','fieldname','delta18o','format','DoubleMat','mattype',1,'timeserieslength',2)
 			WriteData(fid,'object',self,'class','surfaceforcings','fieldname','Tdiff','format','DoubleMat','mattype',1,'timeserieslength',2)
 			WriteData(fid,'object',self,'class','surfaceforcings','fieldname','sealev','format','DoubleMat','mattype',1,'timeserieslength',2)			
 		elif self.ismungsm:
-			WriteData(fid,'object',self,'class','surfaceforcings','fieldname','temperatures_presentday','format','DoubleMat','mattype',1)
-			WriteData(fid,'object',self,'class','surfaceforcings','fieldname','temperatures_lgm','format','DoubleMat','mattype',1)
-			WriteData(fid,'object',self,'class','surfaceforcings','fieldname','precipitations_presentday','format','DoubleMat','mattype',1)
-			WriteData(fid,'object',self,'class','surfaceforcings','fieldname','precipitations_lgm','format','DoubleMat','mattype',1)
+			WriteData(fid,'object',self,'class','surfaceforcings','fieldname','temperatures_presentday','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1)
+			WriteData(fid,'object',self,'class','surfaceforcings','fieldname','temperatures_lgm','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1)
+			WriteData(fid,'object',self,'class','surfaceforcings','fieldname','precipitations_presentday','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1)
+			WriteData(fid,'object',self,'class','surfaceforcings','fieldname','precipitations_lgm','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1)
 			WriteData(fid,'object',self,'class','surfaceforcings','fieldname','Pfac','format','DoubleMat','mattype',1,'timeserieslength',2)
 			WriteData(fid,'object',self,'class','surfaceforcings','fieldname','Tdiff','format','DoubleMat','mattype',1,'timeserieslength',2)
