Index: /issm/trunk-jpl/src/c/modules/InterpFromMeshToGridx/InterpFromMeshToGridx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/InterpFromMeshToGridx/InterpFromMeshToGridx.cpp	(revision 21827)
+++ /issm/trunk-jpl/src/c/modules/InterpFromMeshToGridx/InterpFromMeshToGridx.cpp	(revision 21828)
@@ -6,17 +6,10 @@
 #include "../../shared/shared.h"
 
-void InterpFromMeshToGridx(double** px_m,double** py_m,double** pgriddata,double* index_mesh, double* x_mesh, double* y_mesh, int nods,int nels, double* data_mesh, int data_length, double xmin,double ymax,double xposting,double yposting,int nlines,int ncols,double default_value) {
-
-	/*Output*/
-	double* griddata=NULL;
-	double* x_grid=NULL;
-	double* y_grid=NULL;
+void InterpFromMeshToGridx(double** pgriddata,double* index_mesh, double* x_mesh, double* y_mesh, int nods,int nels, double* data_mesh,int data_length,double* x_grid,double* y_grid,int nlines,int ncols,double default_value){
 
 	/*Intermediary*/
-	int    i,j,n;
+	int    i,j;
 	int    i1,i2,j1,j2;
 	int    interpolation_type;
-	bool   debug;
-	int    xflip,yflip;
 	double area;
 	double area_1,area_2,area_3;
@@ -28,57 +21,42 @@
 
 	/*some checks*/
-	if (nels<1 || nods<3 || nlines<1 || ncols<1 || xposting==0 || yposting==0){
-		_error_("nothing to be done according to the mesh given in input");
-	}
+	if(nels<1 || nods<3 || nlines<2 || ncols<2) _error_("nothing to be done according to the mesh given in input");
 
 	/*figure out what kind of interpolation is needed*/
-	if (data_length==nods){
-		interpolation_type=1;
-	}
-	else if (data_length==nels){
-		interpolation_type=2;
-	}
-	else{
-		_error_("length of vector data not supported yet. It should be of length (number of nodes) or (number of elements)!");
-	}
+	if(data_length==nods)      interpolation_type=1;
+	else if(data_length==nels) interpolation_type=2;
+	else _error_("length of vector data not supported yet. It should be of length (number of nodes) or (number of elements)!");
 
 	/*First, allocate pointers: */
-	griddata=xNewZeroInit<double>(nlines*ncols);
-	x_grid=xNewZeroInit<double>(ncols);
-	y_grid=xNewZeroInit<double>(nlines);
+	double* griddata=xNewZeroInit<double>(nlines*ncols);
 
 	/*Set debug to 1 if there are lots of elements*/
-	debug=(bool)((double)ncols*nlines*nels >= 5*pow(10.,10.));
+	bool debug=(bool)((double)ncols*nlines*nels >= 5.e10);
 
 	/*Initialize coordintes and griddata*/
-	for(i=0;i<nlines;i++){
-		for(j=0;j<ncols; j++){
-			griddata[i*ncols+j]=default_value;
-		}
-	}
+	for(i=0;i<nlines;i++) for(j=0;j<ncols; j++) griddata[i*ncols+j]=default_value;
+
 	/*figure out if x or y are flipped*/
-	if (xposting<0) xflip=1;
-	else xflip=0;
-	if (yposting<0) yflip=1;
-	else yflip=0;
+	bool xflip = false;
+	bool yflip = false;
+	if (x_grid[1]-x_grid[0]<0) xflip=true;
+	if (y_grid[1]-y_grid[0]<0) yflip=true;
 
-	/*Get extreme coordinates of the grid*/
-	if (xflip){
-		for(i=0;i<ncols; i++) x_grid[ncols-1-i] = xmin - xposting*i;
+	/*Get min/max coordinates of the grid*/
+	double xposting = x_grid[1]-x_grid[0];
+	double yposting = y_grid[1]-y_grid[0];
+	if(xflip){
 		x_grid_min=x_grid[ncols-1];
 		x_grid_max=x_grid[0];
 	}
 	else{
-		for(i=0;i<ncols; i++) x_grid[i]= xmin + xposting*i;
 		x_grid_min=x_grid[0];
 		x_grid_max=x_grid[ncols-1];
 	}
-	if (yflip){
-		for(i=0;i<nlines;i++) y_grid[i] = ymax + yposting*i;
+	if(yflip){
 		y_grid_min=y_grid[nlines-1];
 		y_grid_max=y_grid[0];
 	}
 	else{
-		for(i=0;i<nlines;i++) y_grid[nlines-1-i]= ymax - yposting*i;
 		y_grid_min=y_grid[0];
 		y_grid_max=y_grid[nlines-1];
@@ -86,8 +64,8 @@
 
 	/*Loop over the elements*/
-	for (n=0;n<nels;n++){
+	for(int n=0;n<nels;n++){
 
 		/*display current iteration*/
-		if (debug && fmod((double)n,(double)100)==0)
+		if(debug && fmod((double)n,(double)100)==0)
 		 _printf_("\r      interpolation progress: "<<setw(6)<<setprecision(2)<<double(n)/double(nels)*100<<"%   ");
 
@@ -95,5 +73,5 @@
 		x_tria_min=x_mesh[(int)index_mesh[3*n+0]-1]; x_tria_max=x_tria_min;
 		y_tria_min=y_mesh[(int)index_mesh[3*n+0]-1]; y_tria_max=y_tria_min;
-		for (i=1;i<3;i++){
+		for(i=1;i<3;i++){
 			if(x_mesh[(int)index_mesh[3*n+i]-1]<x_tria_min) x_tria_min=x_mesh[(int)index_mesh[3*n+i]-1];
 			if(x_mesh[(int)index_mesh[3*n+i]-1]>x_tria_max) x_tria_max=x_mesh[(int)index_mesh[3*n+i]-1];
@@ -103,8 +81,8 @@
 
 		/*if the current triangle is not in the grid, continue*/
-		if ( (x_tria_min>x_grid_max) || (x_tria_max<x_grid_min) || (y_tria_min>y_grid_max) || (y_tria_max<y_grid_min) ) continue;
+		if( (x_tria_min>x_grid_max) || (x_tria_max<x_grid_min) || (y_tria_min>y_grid_max) || (y_tria_max<y_grid_min) ) continue;
 
 		/*Get indices i and j that form a square around the currant triangle*/
-		if (yflip){
+		if(yflip){
 			i1=max(0,       (int)floor((y_tria_max-y_grid_max)/yposting)-1);
 			i2=min(nlines-1,(int)ceil((y_tria_min-y_grid_max)/yposting));
@@ -114,5 +92,5 @@
 			i2=min(nlines-1,(int)ceil((y_tria_max-y_grid_min)/yposting));
 		}
-		if (xflip){
+		if(xflip){
 			j1=max(0,      (int)floor((x_tria_max-x_grid_max)/xposting)-1);
 			j2=min(ncols-1,(int)ceil((x_tria_min-x_grid_max)/xposting));
@@ -130,5 +108,5 @@
 
 		/*Go through x_grid and y_grid and interpolate if necessary*/
-		for (i=i1;i<=i2;i++){
+		for(i=i1;i<=i2;i++){
 
 			//exit if y not between y_tria_min and y_tria_max
@@ -147,11 +125,11 @@
 							- (y_mesh[(int)index_mesh[3*n+0]-1]-y_mesh[(int)index_mesh[3*n+2]-1])*(x_grid[j]-x_mesh[(int)index_mesh[3*n+2]-1]))/area;
 				/*Get third area coordinate = 1-area1-area2*/
-				area_3=1-area_1-area_2;
+				area_3=1.-area_1-area_2;
 
 				/*is the current point in the current element?*/
-				if (area_1>-10e-12 && area_2>-10e-12 && area_3>-10e-12){
+				if(area_1>-10e-12 && area_2>-10e-12 && area_3>-10e-12){
 
 					/*Yes ! compute the value on the point*/
-					if (interpolation_type==1){
+					if(interpolation_type==1){
 						/*nodal interpolation*/
 						data_value=area_1*data_mesh[(int)index_mesh[3*n+0]-1]+area_2*data_mesh[(int)index_mesh[3*n+1]-1]+area_3*data_mesh[(int)index_mesh[3*n+2]-1];
@@ -169,10 +147,7 @@
 		}
 	}
-	if (debug)
-	 _printf_("\r      interpolation progress: "<<fixed<<setw(6)<<setprecision(2)<<100.<<"%  \n");
+	if(debug) _printf_("\r      interpolation progress: "<<fixed<<setw(6)<<setprecision(2)<<100.<<"%  \n");
 
 	/*Assign output pointers:*/
 	*pgriddata=griddata;
-	*px_m=x_grid;
-	*py_m=y_grid;
 }
Index: /issm/trunk-jpl/src/c/modules/InterpFromMeshToGridx/InterpFromMeshToGridx.h
===================================================================
--- /issm/trunk-jpl/src/c/modules/InterpFromMeshToGridx/InterpFromMeshToGridx.h	(revision 21827)
+++ /issm/trunk-jpl/src/c/modules/InterpFromMeshToGridx/InterpFromMeshToGridx.h	(revision 21828)
@@ -8,5 +8,5 @@
 #include "../../toolkits/toolkits.h"
 
-void InterpFromMeshToGridx(double** px_m,double** py_m,double** pgriddata,double* index_mesh, double* x_mesh, double* y_mesh, int nods,int nels, double* data_mesh, int data_length, double xmin,double ymax,double xposting,double yposting,int nlines,int ncols,double default_value);
+void InterpFromMeshToGridx(double** pgriddata,double* index_mesh, double* x_mesh, double* y_mesh, int nods,int nels, double* data_mesh,int data_length,double* x_grid,double* y_grid,int nlines,int ncols,double default_value);
 
 #endif /* _INTERPFROMMESHTOGRIDX_H */
Index: /issm/trunk-jpl/src/m/kml/kmlimagesc.m
===================================================================
--- /issm/trunk-jpl/src/m/kml/kmlimagesc.m	(revision 21827)
+++ /issm/trunk-jpl/src/m/kml/kmlimagesc.m	(revision 21828)
@@ -46,9 +46,9 @@
 
 %figure out nlines and ncols in our image
-nlines=(maxlat-minlat)/posting;
-ncols=(maxlong-minlong)/posting;
+x_m = minlong:posting:maxlong;
+y_m = minlat:posting:maxlat;
 
 %regrid to lat,long grid
-[x_m,y_m,field]=InterpFromMeshToGrid(md.mesh.elements,md.mesh.long,md.mesh.lat,field,minlong,maxlat,posting,posting,nlines,ncols,NaN);
+field=InterpFromMeshToGrid(md.mesh.elements,md.mesh.long,md.mesh.lat,field,x_m,y_m,NaN);
 field=flipud(field);
 
Index: /issm/trunk-jpl/src/m/miscellaneous/diagnostics.m
===================================================================
--- /issm/trunk-jpl/src/m/miscellaneous/diagnostics.m	(revision 21827)
+++ /issm/trunk-jpl/src/m/miscellaneous/diagnostics.m	(revision 21828)
@@ -46,9 +46,8 @@
 		yposting=getfieldvalue(options,'velposting',500);
 
-		xmin=min(md.mesh.x); ymax=max(md.mesh.y); 
-		ncols=(max(md.mesh.x)-min(md.mesh.x))/xposting+1;
-		nlines=(max(md.mesh.y)-min(md.mesh.y))/yposting+1;
+		xm=min(md.mesh.x):posting:max(md.mesh.x);
+		ym=min(md.mesh.y):posting:max(md.mesh.y);
 		
-		[xm,ym,vel]=InterpFromMeshToGrid(md.mesh.elements,md.mesh.x,md.mesh.y,vel,xmin,ymax,xposting,yposting,nlines,ncols,0);
+		vel=InterpFromMeshToGrid(md.mesh.elements,md.mesh.x,md.mesh.y,vel,xm,ym,0.);
 		vel=uint16(flipud(vel));
 
Index: /issm/trunk-jpl/src/m/modules/InterpFromMeshToGrid.m
===================================================================
--- /issm/trunk-jpl/src/m/modules/InterpFromMeshToGrid.m	(revision 21827)
+++ /issm/trunk-jpl/src/m/modules/InterpFromMeshToGrid.m	(revision 21828)
@@ -1,4 +1,7 @@
-function [x_m,y_m,griddata] = InterpFromMeshToGrid(index,x,y,data,xmin,ymax,xposting,yposting,nlines,ncols,default_value);
+function grid = InterpFromMeshToGrid(index,x,y,data,xgrid,ygrid,default_value);
 %INTERPFROMMESHTOGRID - Interpolation of a data defined on a mesh onto a grid
+%
+%   Usage:
+%      grid = InterpFromMeshToGrid(index,x,y,data,xgrid,ygrid,default_value)
 %
 %   This function is a multi-threaded mex file that interpolates a field defined on a triangular
@@ -8,9 +11,9 @@
 %   meshdata:	vertex values of data to be interpolated
 %
-%   xmin,ymax,posting,nlines,ncols: parameters that define the grid
-%   default_value:	value of points located out of the mesh
+%   xgrid,ygrid:   parameters that define the grid
+%   default_value: value of points located out of the mesh
 
 % Check usage
-if nargin~=11
+if nargin~=7
 	help InterpFromMeshToGrid
 	error('Wrong usage (see above)');
@@ -18,3 +21,3 @@
 
 % Call mex module
-[x_m,y_m,griddata] = InterpFromMeshToGrid_matlab(index,x,y,data,xmin,ymax,xposting,yposting,nlines,ncols,default_value);
+grid = InterpFromMeshToGrid_matlab(index,x,y,data,xgrid,ygrid,default_value);
Index: /issm/trunk-jpl/src/m/modules/InterpFromMeshToGrid.py
===================================================================
--- /issm/trunk-jpl/src/m/modules/InterpFromMeshToGrid.py	(revision 21827)
+++ /issm/trunk-jpl/src/m/modules/InterpFromMeshToGrid.py	(revision 21828)
@@ -1,5 +1,5 @@
 from InterpFromMeshToGrid_python import InterpFromMeshToGrid_python
 
-def InterpFromMeshToGrid(index,x,y,data,xmin,ymax,xposting,yposting,nlines,ncols,default_value):
+def InterpFromMeshToGrid(index,x,y,data,xgrid,ygrid,default_value):
 	"""
 	INTERPFROMMESHTOGRID - Interpolation of a data defined on a mesh onto a grid
@@ -11,9 +11,9 @@
 		meshdata:	vertex values of data to be interpolated
 
-		xmin,ymax,posting,nlines,ncols:	parameters that define the grid
+		xgrid,ygrid,:	parameters that define the grid
 		default_value:	value of points located out of the mesh
 	"""
 	# Call mex module
-	x_m,y_m,griddata=InterpFromMeshToGrid_python(index,x,y,data,xmin,ymax,xposting,yposting,nlines,ncols,default_value)
+	grid=InterpFromMeshToGrid_python(index,x,y,data,xgrid,ygrid,default_value)
 	# Return
-	return x_m,y_m,griddate
+	return grid
Index: /issm/trunk-jpl/src/m/plot/kmlgridded.m
===================================================================
--- /issm/trunk-jpl/src/m/plot/kmlgridded.m	(revision 21827)
+++ /issm/trunk-jpl/src/m/plot/kmlgridded.m	(revision 21828)
@@ -25,5 +25,7 @@
 
 %Interpolating data on grid
-[x_m y_m data_grid]=InterpFromMeshToGrid(elements,x,y,data,xlim(1),ylim(2),post,post,round(diff(ylim)/post),round(diff(xlim)/post),NaN);
+x_m = xlim(1):post:xlim(2);
+y_m = ylim(1):post:ylim(2);
+data_grid=InterpFromMeshToGrid(elements,x,y,data,x_m,y_m,NaN);
 if size(data_grid,1)<3 | size(data_grid,2)<3,
 	error('data_grid size too small, check posting and units');
Index: /issm/trunk-jpl/src/m/plot/plot_googlemaps.m
===================================================================
--- /issm/trunk-jpl/src/m/plot/plot_googlemaps.m	(revision 21827)
+++ /issm/trunk-jpl/src/m/plot/plot_googlemaps.m	(revision 21828)
@@ -62,12 +62,7 @@
 %Prepare grid
 if size(md.radaroverlay.x,1)==1 | size(md.radaroverlay.x,2)==1,
-	xmin=min(md.radaroverlay.x);
-	ymax=max(md.radaroverlay.y);
-	xspacing=md.radaroverlay.x(2)-md.radaroverlay.x(1);
-	yspacing=md.radaroverlay.y(2)-md.radaroverlay.y(1);
-	nlines=length(md.radaroverlay.y);
-	ncols =length(md.radaroverlay.x);
-		[x_m y_m data_grid]=InterpFromMeshToGrid(elements,x/getfieldvalue(options,'unit',1),y/getfieldvalue(options,'unit',1),...
-			data,xmin,ymax,xspacing,yspacing,nlines,ncols,NaN);
+	x_m = md.radaroverlay.x;
+	y_m = md.radaroverlay.y;
+	data_grid=InterpFromMeshToGrid(elements,x/getfieldvalue(options,'unit',1),y/getfieldvalue(options,'unit',1),data,x_m,y_m,NaN);
 else
 	X = md.radaroverlay.x;
Index: /issm/trunk-jpl/src/m/plot/plot_gridded.m
===================================================================
--- /issm/trunk-jpl/src/m/plot/plot_gridded.m	(revision 21827)
+++ /issm/trunk-jpl/src/m/plot/plot_gridded.m	(revision 21828)
@@ -23,5 +23,7 @@
 
 %Interpolating data on grid
-[x_m y_m data_grid]=InterpFromMeshToGrid(elements,x,y,data,xlim(1),ylim(2),postx,posty,round(diff(ylim)/posty),round(diff(xlim)/postx),NaN);
+x_m = xlim(1):postx:xlim(2);
+y_m = ylim(1):posty:ylim(2);
+data_grid=InterpFromMeshToGrid(elements,x,y,data,x_m,y_m,NaN);
 data_grid_save = data_grid;
 if size(data_grid,1)<3 | size(data_grid,2)<3,
Index: /issm/trunk-jpl/src/m/plot/plot_overlay.m
===================================================================
--- /issm/trunk-jpl/src/m/plot/plot_overlay.m	(revision 21827)
+++ /issm/trunk-jpl/src/m/plot/plot_overlay.m	(revision 21828)
@@ -58,24 +58,11 @@
 
 %InterpFromMeshToGrid
-xmin=min(md.radaroverlay.x);
-ymax=max(md.radaroverlay.y);
-xspacing=(max(md.radaroverlay.x)-min(md.radaroverlay.x))/(length(md.radaroverlay.x) -1);
-yspacing=(max(md.radaroverlay.y)-min(md.radaroverlay.y))/(length(md.radaroverlay.y) -1);
-if(md.radaroverlay.x(end)-md.radaroverlay.x(1)<0)
-	xspacing= -xspacing; 
-end
-if(md.radaroverlay.y(end)-md.radaroverlay.y(1)<0)
-	yspacing= -yspacing; 
-end
-nlines=length(md.radaroverlay.y);
-ncols =length(md.radaroverlay.x);
 disp('Interpolating data on grid...');
+x_m = md.radaroverlay.x;
+y_m = md.radaroverlay.y;
 if radaronly,
-	x_m=xmin:xspacing:xmin+ncols*xspacing;
-	y_m=ymax-nlines*yspacing:yspacing:ymax;
-	data_grid=NaN*ones(nlines,ncols);
+	data_grid=NaN(size(radar));
 else
-	[x_m y_m data_grid]=InterpFromMeshToGrid(elements,x/getfieldvalue(options,'unit',1),y/getfieldvalue(options,'unit',1),...
-		data,xmin,ymax,xspacing,yspacing,nlines,ncols,NaN);
+	data_grid=InterpFromMeshToGrid(elements,x/getfieldvalue(options,'unit',1),y/getfieldvalue(options,'unit',1),data,x_m,y_m,NaN);
 end
 
@@ -152,5 +139,5 @@
 
 %Plot: 
-imagesc(md.radaroverlay.x*getfieldvalue(options,'unit',1),md.radaroverlay.y*getfieldvalue(options,'unit',1),image_rgb);set(gca,'YDir','normal');
+imagesc(x_m*getfieldvalue(options,'unit',1),y_m*getfieldvalue(options,'unit',1),image_rgb);set(gca,'YDir','normal');
 
 %last step: mesh overlay?
Index: /issm/trunk-jpl/src/wrappers/InterpFromMeshToGrid/InterpFromMeshToGrid.cpp
===================================================================
--- /issm/trunk-jpl/src/wrappers/InterpFromMeshToGrid/InterpFromMeshToGrid.cpp	(revision 21827)
+++ /issm/trunk-jpl/src/wrappers/InterpFromMeshToGrid/InterpFromMeshToGrid.cpp	(revision 21828)
@@ -12,9 +12,9 @@
 	_printf0_("\n");
 	_printf0_("   Usage:\n");
-	_printf0_("      [x_m,y_m,griddata]=InterpFromMeshToGrid(index,x,y,data,xmin,ymax,xposting,yposting,nlines,ncols,default_value)\n");
+	_printf0_("      grid=InterpFromMeshToGrid(index,x,y,data,x_grid,y_grid,default_value)\n");
 	_printf0_("\n");
 	_printf0_("      index,x,y: delaunay triangulation defining the mesh.\n");
 	_printf0_("      meshdata: vertex values of data to be interpolated.\n");
-	_printf0_("      xmin,ymax,posting,nlines,ncols: parameters that define the grid\n");
+	_printf0_("      xgrid,ygrid: parameters that define the grid\n");
 	_printf0_("      default_value: value of points located out of the mesh.\n");
 	_printf0_("\n");
@@ -22,23 +22,18 @@
 WRAPPER(InterpFromMeshToGrid_python){
 
-	/*input datasets: */
+	/*inputs */
 	double* index=NULL;
-	int     nel;
 	double* x=NULL;
-	int     nods;
 	double* y=NULL;
+	int     nel,nods;
 	double* meshdata=NULL;
 	int     meshdata_length;
-	double  xmin;
-	double  ymax;
-	double  xposting;
-	double  yposting;
-	int     nlines,ncols;
+	double* xgrid=NULL;
+	double* ygrid=NULL;
+	int     nlines,ncols,test;
 	double  default_value;
 
-	/* output datasets: */
+	/* outputs */
 	double* griddata=NULL;
-	double* x_m=NULL;
-	double* y_m=NULL;
 
 	/*Boot module: */
@@ -51,22 +46,18 @@
 
 	/*Input datasets: */
-	FetchData(&index,&nel,NULL,INDEX);
-	FetchData(&x,&nods,NULL,X);
-	FetchData(&y,NULL,NULL,Y);
-	FetchData(&meshdata,&meshdata_length,NULL,MESHDATA);
-	FetchData(&xmin,XMIN);
-	FetchData(&ymax,YMAX);
-	FetchData(&xposting,XPOSTING);
-	FetchData(&yposting,YPOSTING);
-	FetchData(&nlines,NLINES);
-	FetchData(&ncols,NCOLS);
+	FetchData(&index,&nel,&test,INDEX);
+	if(test!=3) _error_("size not supported yet");
+	FetchData(&x,&nods,X);
+	FetchData(&y,&test,Y);
+	if(test!=nods) _error_("size not supported yet");
+	FetchData(&meshdata,&meshdata_length,MESHDATA);
+	FetchData(&xgrid,&ncols,XGRID); 
+	FetchData(&ygrid,&nlines,YGRID);
 	FetchData(&default_value,DEFAULTVALUE);
 
 	/*Call core of computation: */
-	InterpFromMeshToGridx(&x_m,&y_m,&griddata,index,x,y,nods,nel,meshdata,meshdata_length,xmin,ymax,xposting,yposting,nlines,ncols,default_value);
+	InterpFromMeshToGridx(&griddata,index,x,y,nods,nel,meshdata,meshdata_length,xgrid,ygrid,nlines,ncols,default_value);
 
 	/*Write results: */
-	WriteData(XM,x_m,ncols);
-	WriteData(YM,y_m,nlines);
 	WriteData(GRIDDATA,griddata,nlines,ncols);
 
@@ -77,6 +68,6 @@
 	xDelete<double>(meshdata);
 	xDelete<double>(griddata);
-	xDelete<double>(x_m);
-	xDelete<double>(y_m);
+	xDelete<double>(xgrid);
+	xDelete<double>(ygrid);
 
 	/*end module: */
Index: /issm/trunk-jpl/src/wrappers/InterpFromMeshToGrid/InterpFromMeshToGrid.h
===================================================================
--- /issm/trunk-jpl/src/wrappers/InterpFromMeshToGrid/InterpFromMeshToGrid.h	(revision 21827)
+++ /issm/trunk-jpl/src/wrappers/InterpFromMeshToGrid/InterpFromMeshToGrid.h	(revision 21828)
@@ -33,15 +33,9 @@
 #define Y            prhs[2]
 #define MESHDATA     prhs[3]
-#define XMIN         prhs[4]
-#define YMAX         prhs[5]
-#define XPOSTING     prhs[6]
-#define YPOSTING     prhs[7]
-#define NLINES       prhs[8]
-#define NCOLS        prhs[9]
-#define DEFAULTVALUE prhs[10]
+#define XGRID        prhs[4]
+#define YGRID        prhs[5]
+#define DEFAULTVALUE prhs[6]
 /* serial output macros: */
-#define XM (mxArray**)&plhs[0]
-#define YM (mxArray**)&plhs[1]
-#define GRIDDATA (mxArray**)&plhs[2]
+#define GRIDDATA (mxArray**)&plhs[0]
 #endif
 
@@ -52,22 +46,16 @@
 #define Y            PyTuple_GetItem(args,2)
 #define MESHDATA     PyTuple_GetItem(args,3)
-#define XMIN         PyTuple_GetItem(args,4)
-#define YMAX         PyTuple_GetItem(args,5)
-#define XPOSTING     PyTuple_GetItem(args,6)
-#define YPOSTING     PyTuple_GetItem(args,7)
-#define NLINES       PyTuple_GetItem(args,8)
-#define NCOLS        PyTuple_GetItem(args,9)
+#define XGRID        PyTuple_GetItem(args,4)
+#define YGRID        PyTuple_GetItem(args,5)
 #define DEFAULTVALUE PyTuple_GetItem(args,10)
 /* serial output macros: */
-#define XM output,0
-#define YM output,1
-#define GRIDDATA output,2
+#define GRIDDATA output,0
 #endif
 
 /* serial arg counts: */
 #undef NLHS
-#define NLHS  3
+#define NLHS  1
 #undef NRHS
-#define NRHS  11
+#define NRHS  7
 
 #endif  /* _INTERPFROMMESHTOGRID_H*/
