Index: issm/trunk-jpl/src/m/classes/solidearthsolution.m
===================================================================
--- issm/trunk-jpl/src/m/classes/solidearthsolution.m	(revision 25947)
+++ issm/trunk-jpl/src/m/classes/solidearthsolution.m	(revision 26229)
@@ -52,19 +52,31 @@
 
 			%transform our time series into time series rates 
-			time=self.displacementeast(end,:);
-			dt=diff(time,1,2);
+			if size(self.displacementeast,2)==1
+				disp('External solidearthsolution warning: only one time step provided, assuming the values are rates per year');
+				displacementeast_rate=[self.displacementeast;0];
+				displacementnorth_rate=[self.displacementnorth;0];
+				displacementup_rate=[self.displacementup;0];
+				geoid_rate=[self.geoid;0];
+				barystaticsealevel_rate=[self.barystaticsealevel;0];
+			else
+				time=self.displacementeast(end,:);
+				dt=diff(time,1,2);
+				displacementeast_rate=diff(self.displacementeast(1:end-1,:),1,2)./dt;
+				displacementeast_rate(end+1,:)=time(1:end-1);
+				displacementnorth_rate=diff(self.displacementnorth(1:end-1,:),1,2)./dt;
+				displacementnorth_rate(end+1,:)=time(1:end-1);
+				displacementup_rate=diff(self.displacementup(1:end-1,:),1,2)./dt;
+				displacementup_rate(end+1,:)=time(1:end-1);
+				geoid_rate=diff(self.geoid(1:end-1,:),1,2)./dt;
+				geoid_rate(end+1,:)=time(1:end-1);
+				barystaticsealevel_rate=diff(self.barystaticsealevel(1:end-1,:),1,2)./dt;
+				barystaticsealevel_rate(end+1,:)=time(1:end-1);
+			end
+			WriteData(fid,prefix,'object',self,'fieldname','displacementeast','data',displacementeast_rate,'format','DoubleMat','name', 'md.solidearth.external.displacementeast','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts);
+			WriteData(fid,prefix,'object',self,'fieldname','displacementup','data',displacementup_rate,'format','DoubleMat','name', 'md.solidearth.external.displacementup','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts);
+			WriteData(fid,prefix,'object',self,'fieldname','displacementnorth','data',displacementnorth_rate,'format','DoubleMat','name', 'md.solidearth.external.displacementnorth','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts);
+			WriteData(fid,prefix,'object',self,'fieldname','geoid','data',geoid_rate,'format','DoubleMat','name', 'md.solidearth.external.geoid','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts);
+			WriteData(fid,prefix,'object',self,'fieldname','barystaticsealevel','data',barystaticsealevel_rate,'format','DoubleMat','name', 'md.solidearth.external.barystaticsealevel','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts);
 			
-			displacementeast_rate=diff(displacementeast(1:end-1,:),1,2)./dt;
-			displacementnorth_rate=diff(displacementnorth(1:end-1,:),1,2)./dt;
-			displacementup_rate=diff(displacementup(1:end-1,:),1,2)./dt;
-			geoid_rate=diff(geoid(1:end-1,:),1,2)./dt;
-			barystaticsealevel_rate=diff(barystaticsealevel(1:end-1,:),1,2)./dt;
-
-			WriteData(fid,prefix,'name','md.solidearth.external.displacementeast','data',displacementeast_rate,'format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts);
-			WriteData(fid,prefix,'name','md.solidearth.external.displacementup','data',displacementup_rate,'format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts);
-			WriteData(fid,prefix,'name','md.solidearth.external.displacementnorth','data',displacementnorth_rate,'format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts);
-			WriteData(fid,prefix,'name','md.solidearth.external.geoid','data',geoid_rate,'format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts);
-			WriteData(fid,prefix,'name','md.solidearth.external.barystaticsealevel','data',barystaticsealevel_rate,'format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts);
-	
 		end % }}}
 		function savemodeljs(self,fid,modelname) % {{{
