Index: issm/trunk/src/m/classes/public/mesh2grid.m
===================================================================
--- issm/trunk/src/m/classes/public/mesh2grid.m	(revision 2328)
+++ issm/trunk/src/m/classes/public/mesh2grid.m	(revision 2328)
@@ -0,0 +1,16 @@
+function md=mesh2grid(md,field,cornereast,cornernorth,xspacing,yspacing,nlines,ncols,defautvalue)
+%MESH2GRID - build a grid out of a filed given on the mesh
+%
+%   Usage:
+%      md=mesh2grid(md,data,cornereast,cornernorth,xspacing,yspacing,nlines,ncols,defautvalue)
+
+if strcmpi(md.type,'2d'),
+	error('mesh2grid error message: 3d mesh not supported yet')
+end
+
+if ischar(field),
+	md.mesh2grid_parameters{end+1}=field;
+end
+
+[md.mesh2grid_x_m md.mesh2grid_y_m md.mesh2grid_data]=...
+	InterpFromMeshToGrid(md.elements,md.x,md.y,md.(field),cornereast,cornernorth,xspacing,yspacing,nlines,ncols,defautvalue);
Index: issm/trunk/src/m/classes/public/modeldefault/modeldefault_process.m
===================================================================
--- issm/trunk/src/m/classes/public/modeldefault/modeldefault_process.m	(revision 2326)
+++ issm/trunk/src/m/classes/public/modeldefault/modeldefault_process.m	(revision 2328)
@@ -7,5 +7,5 @@
 %retrieve some paths
 global ISSM_DIR
-modeldatapath='/u/wilkes-r1b/larour/ModelData';
+modeldatapath='/u/astrid-r1b/larour/ModelData';
 
 %initialize output
Index: issm/trunk/src/m/classes/public/plot/plot_overlay.m
===================================================================
--- issm/trunk/src/m/classes/public/plot/plot_overlay.m	(revision 2326)
+++ issm/trunk/src/m/classes/public/plot/plot_overlay.m	(revision 2328)
@@ -7,6 +7,38 @@
 %   See also: PLOTMODEL
 
+%process mesh and data
+[x y z elements is2d]=processmesh(md,options_structure);
+[data isongrid isquiver]=processdata(md,data,options_structure);
 
-%check that buildoverlay has not already been called
+%check is2d
+if ~is2d, 
+	error('buildoverlay error message: overlay not supported for 3d meshes, project on a layer');
+end
+
+%get xlim and ylim
+if ~isnan(options_structure.xlim),
+	xlim=options_structure.xlim;
+else
+	xlim=[min(md.x) max(md.x)];
+end
+if ~isnan(options_structure.ylim),
+	ylim=options_structure.ylim;
+else
+	ylim=[min(md.y) max(md.y)];
+end
+
+%radar power
+redo=1;
+if ~any(isnan(md.sarxm)) & ~any(isnan(md.sarym))
+	choice=input('This model seems to have a radar power image. Do you want to use it? (y/n)','s');
+	if strcmp(choice,'y'), redo=0; end
+end
+if redo,
+	t1=clock; fprintf('%s','Extracting radar image...');
+	md=radarpower(md,xlim,ylim,options_structure.highres);
+	t2=clock;fprintf('%s\n',[' done (' num2str(etime(t2,t1)) ' seconds)']);
+end
+
+%mesh2grid
 redo=1;
 if (ischar(data) & isstruct(md.mesh2grid_parameters) & ismember(data,mesh2grid_parameters)),
@@ -14,42 +46,15 @@
 	if strcmp(choice,'y')
 		disp('use previous mesh2grid result');
+		x_m=md.mesh2grid_x_m;
+		y_m=md.mesh2grid_y_m;
+		data_grid=md.mesh2grid_data;
 		redo=0;
 	end
 end
-
-if redo
-	%process mesh and data
-	[x y z elements is2d]=processmesh(md,options_structure);
-	[data isongrid isquiver]=processdata(md,data,options_structure);
-
+if redo,
 	%apply caxis if required
 	if ~isnan(options_structure.caxis),
 		data(find(data<options_structure.caxis(1)))=options_structure.caxis(1);
 		data(find(data>options_structure.caxis(2)))=options_structure.caxis(2);
-	end
-
-	%check is2d
-	if ~is2d, 
-		error('buildoverlay error message: overlay not supported for 3d meshes, project on a layer');
-	end
-
-	%Ok, first we need to recover the radar map.
-	if ~isnan(options_structure.xlim),
-		xlim=options_structure.xlim;
-	else
-		xlim=[min(md.x) max(md.x)];
-	end
-	if ~isnan(options_structure.ylim),
-		ylim=options_structure.ylim;
-	else
-		ylim=[min(md.y) max(md.y)];
-	end
-	if ~any(isnan(md.sarxm)) & ~any(isnan(md.sarym))
-		choice=input('This model seems to have a radar power image. Do you want to use it? (y/n)','s');
-		if ~strcmp(choice,'y')
-			md=radarpower(md,xlim,ylim,options_structure.highres);
-		end
-	else
-		md=radarpower(md,xlim,ylim,options_structure.highres);
 	end
 
@@ -61,9 +66,7 @@
 	nlines=length(md.sarym);
 	ncols =length(md.sarxm);
+	t1=clock; fprintf('%s','Interpolating data on grid...');
 	[x_m y_m data_grid]=InterpFromMeshToGrid(elements,x,y,data,cornereast,cornernorth,xspacing,yspacing,nlines,ncols,0);
-else
-	%process mesh and data
-	[x y z elements is2d]=processmesh(md,options_structure);
-	[data isongrid isquiver]=processdata(md,data,options_structure);
+	t2=clock;fprintf('%s\n',[' done (' num2str(etime(t2,t1)) ' seconds)']);
 end
 
Index: issm/trunk/src/m/classes/public/radarpower.m
===================================================================
--- issm/trunk/src/m/classes/public/radarpower.m	(revision 2326)
+++ issm/trunk/src/m/classes/public/radarpower.m	(revision 2328)
@@ -13,5 +13,5 @@
 
 %if MODELDATA has not been initialized (ie: empty), use default path.
-if isempty(MODELDATA), MODELDATA='/u/wilkes-r1b/larour/ModelData'; end
+if isempty(MODELDATA), MODELDATA='/u/astrid-r1b/larour/ModelData'; end
 
 %find gdal coordinates
