Index: /issm/trunk-jpl/src/wrappers/ContourToNodes/ContourToNodes.cpp
===================================================================
--- /issm/trunk-jpl/src/wrappers/ContourToNodes/ContourToNodes.cpp	(revision 23072)
+++ /issm/trunk-jpl/src/wrappers/ContourToNodes/ContourToNodes.cpp	(revision 23073)
@@ -18,5 +18,5 @@
 
 	/* input: */
-	int       edgevalue,nods;
+	int       edgevalue,dim1,dim2,test1,test2;
 	double   *x           = NULL;
 	double   *y           = NULL;
@@ -34,14 +34,20 @@
 
 	/*Fetch inputs: */
-	FetchData(&x,&nods,NULL,XHANDLE);
-	FetchData(&y,NULL,NULL,YHANDLE);
+	FetchData(&x,&dim1,&dim2,XHANDLE);
+	FetchData(&y,&test1,&test2,YHANDLE);
 	FetchData(&edgevalue,EDGEVALUE);
 	FetchData(&contours,CONTOUR);
 
+	/*Some sanity checks*/
+	if(dim1<1) _error_("x is empty");
+	if(dim2<1) _error_("x is empty");
+	if(test1!=dim1) _error_("x ans y do not have the same size");
+	if(test2!=dim2) _error_("x ans y do not have the same size");
+
 	/*Run x layer */
-	ContourToNodesx(&flags,x,y,nods,contours,edgevalue);
+	ContourToNodesx(&flags,x,y,dim1*dim2,contours,edgevalue);
 
 	/* output: */
-	WriteData(FLAGS,flags,nods);
+	WriteData(FLAGS,flags,dim1,dim2);
 
 	/*Clean up*/
