Index: ../trunk-jpl/src/c/classes/kriging/Covertree.cpp
===================================================================
--- ../trunk-jpl/src/c/classes/kriging/Covertree.cpp	(revision 18918)
+++ ../trunk-jpl/src/c/classes/kriging/Covertree.cpp	(revision 18919)
@@ -5,11 +5,11 @@
 #include <algorithm>
 
 	/*Constructors/Destructors*/
-Covertree::Covertree(const double& maxDist,const std::vector<Observation>& points){
+Covertree::Covertree(int maxLevel,const std::vector<Observation>& points){
 	this->base = 2.;
 	_root=NULL;
 	_numNodes=0;
-	_maxLevel=ceilf(log(maxDist)/log(base));
+	_maxLevel=maxLevel;//ceilf(log(maxDist)/log(base));
 	_minLevel=_maxLevel-1;
 	std::vector<Observation>::const_iterator it;
 	for(it=points.begin(); it!=points.end(); ++it) {
Index: ../trunk-jpl/src/c/classes/kriging/Covertree.h
===================================================================
--- ../trunk-jpl/src/c/classes/kriging/Covertree.h	(revision 18918)
+++ ../trunk-jpl/src/c/classes/kriging/Covertree.h	(revision 18919)
@@ -88,7 +88,7 @@
 	 * if an inaccurate maxDist is given.
 	 */
 
-	Covertree(const double& maxDist,
+	Covertree(int maxDist,
 				const std::vector<Observation>& points=std::vector<Observation>()); 
 	~Covertree();
 
Index: ../trunk-jpl/src/c/classes/kriging/Observations.cpp
===================================================================
--- ../trunk-jpl/src/c/classes/kriging/Observations.cpp	(revision 18918)
+++ ../trunk-jpl/src/c/classes/kriging/Observations.cpp	(revision 18919)
@@ -156,15 +156,13 @@
 /*}}}*/
 void Observations::InitCovertree(IssmPDouble* observations_list,IssmPDouble* x,IssmPDouble* y,int n,Options* options){/*{{{*/
 
-    int maxdepth = 10;
+    int maxdepth = 20;
 	 _printf0_("Generating covertree with a maximum depth " <<  maxdepth <<"... ");
     this->covertree=new Covertree(maxdepth);
 
     for(int i=0;i<n;i++){
-		 if(i%1000) printf("progress = %g \n",double(i)/double(n)*100.);
 		 this->covertree->insert(Observation(x[i],y[i],observations_list[i]));
     }
-
 	 _printf0_("done\n");
 }
 /*}}}*/
@@ -618,7 +616,6 @@
 	xDelete<IssmPDouble>(counter);
 }/*}}}*/
 
-
 void Observations::ObservationList2(double **px,double **py,double **pobs,int* pnobs,double x_interp,double y_interp,double radius,int maxdata){/*{{{*/
     
 
@@ -629,7 +626,7 @@
     std::vector<Observation> kNN;
 
 	 kNN=(this->covertree->kNearestNeighbors(observation, maxdata));
-	 //cout << "kNN's size: " << kNN.size() << endl;
+	 //cout << "kNN's size: " << kNN.size() << " (maxdata = " <<maxdata<<")"<<endl;
 	
 	//kNN is sort from closest to farthest neighbor
 	//searches for the first neighbor that is out of radius
