Index: /issm/trunk-jpl/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dx.cpp	(revision 22730)
+++ /issm/trunk-jpl/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dx.cpp	(revision 22731)
@@ -10,5 +10,5 @@
 
 int InterpFromMesh2dx(IssmSeqVec<IssmPDouble>** pdata_prime,
-			double* index_data, double* x_data, double* y_data, int nods_data,int nels_data, double* data, int data_length,
+			int* index_data, double* x_data, double* y_data, int nods_data,int nels_data, double* data, int data_length,
 			double* x_prime, double* y_prime, int nods_prime,
 			double* default_values,int num_default_values,Contour<IssmPDouble>** contours,int numcontours){
Index: /issm/trunk-jpl/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dx.h
===================================================================
--- /issm/trunk-jpl/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dx.h	(revision 22730)
+++ /issm/trunk-jpl/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dx.h	(revision 22731)
@@ -15,5 +15,5 @@
 	bool                debug;
 	int                 nels_data;
-	double              *index_data;
+	int                *index_data;
 	double              *x_data;
 	double              *y_data;
@@ -31,5 +31,5 @@
 } InterpFromMesh2dxThreadStruct;
 
-int InterpFromMesh2dx(IssmSeqVec<IssmPDouble>** pdata_prime,double* index_data, double* x_data, double* y_data, int nods_data,int nels_data, double* data, int data_length, double* x_prime, double* y_prime, int nods_prime,
+int InterpFromMesh2dx(IssmSeqVec<IssmPDouble>** pdata_prime,int* index_data, double* x_data, double* y_data, int nods_data,int nels_data, double* data, int data_length, double* x_prime, double* y_prime, int nods_prime,
 		double* default_values,int num_default_values,Contour<IssmPDouble>** contours,int numcontours);
 
Index: /issm/trunk-jpl/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dxt.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dxt.cpp	(revision 22730)
+++ /issm/trunk-jpl/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dxt.cpp	(revision 22731)
@@ -23,5 +23,5 @@
 	bool    debug                   = gate->debug;
 	int     nels_data               = gate->nels_data;
-	double *index_data              = gate->index_data;
+	int    *index_data              = gate->index_data;
 	double *x_data                  = gate->x_data;
 	double *y_data                  = gate->y_data;
@@ -50,14 +50,14 @@
 
 		/*if there is no point inside the domain, go to next iteration*/
-		if ( (x_data[(int)index_data[3*i+0]-1]<xmin) && (x_data[(int)index_data[3*i+1]-1]<xmin) && (x_data[(int)index_data[3*i+2]-1]<xmin)) continue;
-		if ( (x_data[(int)index_data[3*i+0]-1]>xmax) && (x_data[(int)index_data[3*i+1]-1]>xmax) && (x_data[(int)index_data[3*i+2]-1]>xmax)) continue;
-		if ( (y_data[(int)index_data[3*i+0]-1]<ymin) && (y_data[(int)index_data[3*i+1]-1]<ymin) && (y_data[(int)index_data[3*i+2]-1]<ymin)) continue;
-		if ( (y_data[(int)index_data[3*i+0]-1]>ymax) && (y_data[(int)index_data[3*i+1]-1]>ymax) && (y_data[(int)index_data[3*i+2]-1]>ymax)) continue;
+		if ( (x_data[index_data[3*i+0]-1]<xmin) && (x_data[index_data[3*i+1]-1]<xmin) && (x_data[index_data[3*i+2]-1]<xmin)) continue;
+		if ( (x_data[index_data[3*i+0]-1]>xmax) && (x_data[index_data[3*i+1]-1]>xmax) && (x_data[index_data[3*i+2]-1]>xmax)) continue;
+		if ( (y_data[index_data[3*i+0]-1]<ymin) && (y_data[index_data[3*i+1]-1]<ymin) && (y_data[index_data[3*i+2]-1]<ymin)) continue;
+		if ( (y_data[index_data[3*i+0]-1]>ymax) && (y_data[index_data[3*i+1]-1]>ymax) && (y_data[index_data[3*i+2]-1]>ymax)) continue;
 
 		/*get area of the current element (Jacobian = 2 * area)*/
 		//area =x2 * y3 - y2*x3 + x1 * y2 - y1 * x2 + x3 * y1 - y3 * x1;
-		area=x_data[(int)index_data[3*i+1]-1]*y_data[(int)index_data[3*i+2]-1]-y_data[(int)index_data[3*i+1]-1]*x_data[(int)index_data[3*i+2]-1]
-		  +  x_data[(int)index_data[3*i+0]-1]*y_data[(int)index_data[3*i+1]-1]-y_data[(int)index_data[3*i+0]-1]*x_data[(int)index_data[3*i+1]-1]
-		  +  x_data[(int)index_data[3*i+2]-1]*y_data[(int)index_data[3*i+0]-1]-y_data[(int)index_data[3*i+2]-1]*x_data[(int)index_data[3*i+0]-1];
+		area=x_data[index_data[3*i+1]-1]*y_data[index_data[3*i+2]-1]-y_data[index_data[3*i+1]-1]*x_data[index_data[3*i+2]-1]
+		  +  x_data[index_data[3*i+0]-1]*y_data[index_data[3*i+1]-1]-y_data[index_data[3*i+0]-1]*x_data[index_data[3*i+1]-1]
+		  +  x_data[index_data[3*i+2]-1]*y_data[index_data[3*i+0]-1]-y_data[index_data[3*i+2]-1]*x_data[index_data[3*i+0]-1];
 
 		/*loop over the prime nodes*/
@@ -67,9 +67,9 @@
 
 				/*Get first area coordinate = det(x-x3  x2-x3 ; y-y3   y2-y3)/area*/
-				area_1=((x_prime[j]-x_data[(int)index_data[3*i+2]-1])*(y_data[(int)index_data[3*i+1]-1]-y_data[(int)index_data[3*i+2]-1]) 
-						-  (y_prime[j]-y_data[(int)index_data[3*i+2]-1])*(x_data[(int)index_data[3*i+1]-1]-x_data[(int)index_data[3*i+2]-1]))/area;
+				area_1=((x_prime[j]-x_data[index_data[3*i+2]-1])*(y_data[index_data[3*i+1]-1]-y_data[index_data[3*i+2]-1]) 
+						-  (y_prime[j]-y_data[index_data[3*i+2]-1])*(x_data[index_data[3*i+1]-1]-x_data[index_data[3*i+2]-1]))/area;
 				/*Get second area coordinate =det(x1-x3  x-x3 ; y1-y3   y-y3)/area*/
-				area_2=((x_data[(int)index_data[3*i+0]-1]-x_data[(int)index_data[3*i+2]-1])*(y_prime[j]-y_data[(int)index_data[3*i+2]-1]) 
-						- (y_data[(int)index_data[3*i+0]-1]-y_data[(int)index_data[3*i+2]-1])*(x_prime[j]-x_data[(int)index_data[3*i+2]-1]))/area;
+				area_2=((x_data[index_data[3*i+0]-1]-x_data[index_data[3*i+2]-1])*(y_prime[j]-y_data[index_data[3*i+2]-1]) 
+						- (y_data[index_data[3*i+0]-1]-y_data[index_data[3*i+2]-1])*(x_prime[j]-x_data[index_data[3*i+2]-1]))/area;
 				/*Get third area coordinate = 1-area1-area2*/
 				area_3=1-area_1-area_2;
@@ -81,5 +81,5 @@
 					if (interpolation_type==1){
 						/*nodal interpolation*/
-						data_value=area_1*data[(int)index_data[3*i+0]-1]+area_2*data[(int)index_data[3*i+1]-1]+area_3*data[(int)index_data[3*i+2]-1];
+						data_value=area_1*data[index_data[3*i+0]-1]+area_2*data[index_data[3*i+1]-1]+area_3*data[index_data[3*i+2]-1];
 					}
 					else{
Index: /issm/trunk-jpl/src/c/modules/InterpFromMeshToGridx/InterpFromMeshToGridx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/InterpFromMeshToGridx/InterpFromMeshToGridx.cpp	(revision 22730)
+++ /issm/trunk-jpl/src/c/modules/InterpFromMeshToGridx/InterpFromMeshToGridx.cpp	(revision 22731)
@@ -64,5 +64,5 @@
 
 		/*display current iteration*/
-		if(debug && fmod(double(n),1000)==0)
+		if(debug && n%10000==0)
 		 _printf_("\r      interpolation progress: "<<setw(6)<<setprecision(2)<<double(n)/double(nels)*100<<"%   ");
 
Index: /issm/trunk-jpl/src/wrappers/InterpFromMesh2d/InterpFromMesh2d.cpp
===================================================================
--- /issm/trunk-jpl/src/wrappers/InterpFromMesh2d/InterpFromMesh2d.cpp	(revision 22730)
+++ /issm/trunk-jpl/src/wrappers/InterpFromMesh2d/InterpFromMesh2d.cpp	(revision 22731)
@@ -23,24 +23,18 @@
 
 	/*input: */
-	double* index_data=NULL;
+	int*    index_data=NULL;
 	int     index_data_rows;
 	int     dummy;
-
 	double* x_data=NULL;
 	int     x_data_rows;
-
 	double* y_data=NULL;
 	int     y_data_rows;
-
 	double* data=NULL; 
 	int     data_rows;
 	int     data_cols;
-
 	double* x_prime=NULL;
 	double* y_prime=NULL;
-
 	int     x_prime_rows;
 	int     y_prime_rows;
-
 	double* default_values=NULL;
 	int     num_default_values=0;
@@ -139,5 +133,5 @@
 
 	/*end module: */
-	xDelete<double>(index_data);
+	xDelete<int>(index_data);
 	xDelete<double>(x_data);
 	xDelete<double>(y_data);
