Index: /issm/trunk-jpl/src/m/contrib/larour/ismip6.m
===================================================================
--- /issm/trunk-jpl/src/m/contrib/larour/ismip6.m	(revision 25271)
+++ /issm/trunk-jpl/src/m/contrib/larour/ismip6.m	(revision 25272)
@@ -188,5 +188,5 @@
 
 		end % }}}
-		function interpolate(self,field,ismip2mesh,ismip2mesh_correction) % {{{
+		function interpolate(self,md,field,ismip2mesh,ismip2mesh_correction) % {{{
 
 			for i=1:self.n,
@@ -202,13 +202,31 @@
 				end
 
-				%map onto mesh: 
-				hg=ismip2mesh_correction.*(ismip2mesh*ht); 
-				pos=find(isnan(hg)); hg(pos)=0;
+				%map onto mesh: correct only for thicknesses
+				hg=ismip2mesh_correction.*(ismip2mesh*ht) ;
 
 				%keep field:
 				if strcmpi(field,'lithk'),
+					pos=find(isnan(hg)); hg(pos)=0;
 					self.thickness{i}=hg; 
-					self.deltathickness{i}=diff(hg,1,2);
-				end
+				end
+				if strcmpi(field,'sftgif'),
+					hge=ones(md.mesh.numberofvertices,size(hg,2));
+					for j=1:size(hg,2),
+						hgj=hg(:,j);
+						pos=find(hgj>0); 
+						hge(md.mesh.elements(pos,:),j)=-1;
+					end
+					self.icemask{i}=hge; 
+				end
+				if strcmpi(field,'sftgrf'),
+					hge=-ones(md.mesh.numberofvertices,size(hg,2));
+					for j=1:size(hg,2),
+						hgj=hg(:,j);
+						pos=find(hgj>0);
+						hge(md.mesh.elements(pos,:),j)=1;
+					end
+					self.oceanmask{i}=hge; 
+				end
+
 				self.time{i}=t;
 				self.timestart{i}=t0;
@@ -217,4 +235,16 @@
 			end
 		end  % }}}
+		function part=partition(self,md,part,value) % {{{
+
+			for i=1:self.n,
+				dh=self.deltathickness{i}; 
+				for j=1:size(dh,2),
+					dhj=dh(:,j);
+					pos=find(dhj);
+					part(pos)=value;
+				end
+			end
+
+		end  % }}}
 	end
 end
Index: /issm/trunk-jpl/src/m/contrib/larour/oceanmip.m
===================================================================
--- /issm/trunk-jpl/src/m/contrib/larour/oceanmip.m	(revision 25271)
+++ /issm/trunk-jpl/src/m/contrib/larour/oceanmip.m	(revision 25272)
@@ -42,8 +42,17 @@
 					disp(['reading file ' file]);
 					
-					%figure out time interval: 
+					%figure out time interval and remove historical:
 					time=ncread(file,'time');
-					pos=find(time>2000); time=time(pos); nt=length(time);
-					
+					pos=find(diff(time)<0); 
+					if isempty(pos),
+						pos=(length(time)-12*100+1):length(time);
+					else
+						pos=[(pos+1):length(time)]; 
+					end
+					time2=time(pos); 
+					pos2=find(time2<=2099 & time2>=2006);
+					pos=pos(pos2);
+					time=time(pos); nt=length(time);
+
 					%reduce datasets: 
 					time=floor(time(12:12:nt)); 
@@ -55,11 +64,11 @@
 					for i=12:12:nt,
 						year=i/12;
-						zosm(:,:,year)=mean(zos(:,:,i-11:i),3);
+						zosm(:,:,year)=mean(zos(:,:,(i-11):i),3);
 					end
 					self.zos{end+1}=zosm; clear zos;
 
 					%zostoga:
-					zostoga=ncread(file,'zostoga');
-					zostogam=zeros(nt/12);
+					zostoga=ncread(file,'zostoga'); zostoga=zostoga(pos);
+					zostogam=zeros(nt/12,1);
 					for i=12:12:nt,
 						year=i/12;
@@ -155,5 +164,33 @@
 		end
 		%}}}
-		function [pbo,time]= bottompressure(self,model,gridded) % {{{
+		function [rate,time]= zostoga_mean(self) % {{{
+			series=zeros(length(self.time{1}),self.n);
+			for i=1:self.n,
+				series(:,i)=self.zostoga{i};
+			end
+			rate=mean(series,2);
+			time=self.time{1};
+		end
+		%}}}
+		function [rate,time]= zostoga_std(self) % {{{
+			series=zeros(length(self.time{1}),self.n);
+			for i=1:self.n,
+				series(:,i)=self.zostoga{i};
+			end
+			rate=std(series,1,2);
+			time=self.time{1};
+		end
+		%}}}
+		function [average,stddev,time]= zostoga_stats(self) % {{{
+			series=zeros(length(self.time{1}),self.n);
+			for i=1:self.n,
+				series(:,i)=self.zostoga{i};
+			end
+			average=mean(series,2);
+			stddev=std(series,1,2);
+			time=self.time{1};
+		end
+		%}}}
+	function array= bottompressure(self,model,gridded) % {{{
 			for i=1:self.n,
 				if strcmpi(model,self.model{i}),
@@ -164,4 +201,5 @@
 					end
 					time=self.time{i};
+					array=[pbo;time];
 					break;
 				end
@@ -169,4 +207,35 @@
 		end
 		%}}}
+	function arrays= dbottompressures(self) % {{{
+		arrays=cell(self.n,1);
+		for i=1:self.n,
+			pbo=self.mesh_pbo{i}; pbo=pbo/1000; %in meters
+			dpbo=diff(pbo,1,2);
+			time=self.time{i};
+			time=time(1:end-1);
+			array=[dpbo;dtime];
+			arrays{i}=array;
+		end
+	end %}}}
+	function arrays= dzoss(self) % {{{
+		arrays=cell(self.n,1);
+		for i=1:self.n,
+			zos=self.mesh_zos{i}; zos=zos/1000; %in meters
+			dzos=diff(zos,1,2);
+			time=self.time{i};time=time(1:end-1);
+			array=[dzos;time];
+			arrays{i}=array;
+		end
+	end	%}}}
+	function arrays= dzostogass(self) % {{{
+		arrays=cell(self.n,1);
+		for i=1:self.n,
+			zostoga=self.zostoga{i}; zos=zos/1000; %in meters
+			dzostoga=diff(dzostoga);
+			time=self.time{i};time=time(1:end-1);
+			array=[dzostoga;time];
+			arrays{i}=array;
+		end
+	end	%}}}
 		function [lat,long]= latlong(self,model) % {{{
 			for i=1:self.n,
