Index: /issm/trunk-jpl/src/c/Container/Observations.cpp
===================================================================
--- /issm/trunk-jpl/src/c/Container/Observations.cpp	(revision 12367)
+++ /issm/trunk-jpl/src/c/Container/Observations.cpp	(revision 12368)
@@ -216,6 +216,6 @@
 	Observation *observation2 = NULL;
 
-	int *counter= (int*)xmalloc(n*sizeof(int));
-	for(j=0;j<n;j++) counter[j] = 0;
+	double *counter = (double*)xmalloc(n*sizeof(double));
+	for(j=0;j<n;j++) counter[j] = 0.0;
 	for(j=0;j<n;j++) gamma[j]   = 0.0;
 
@@ -234,12 +234,12 @@
 
 			gamma[index]   += 1./2.*pow(observation1->value - observation2->value,2.);
-			counter[index] += 1;
+			counter[index] += 1.;
 		}
 	}
 
 	/*Normalize semivariogram*/
-	gamma[0]=0;
+	gamma[0]=0.;
 	for(k=0;k<n;k++){
-		if(counter[k]) gamma[k] = gamma[k]/double(counter[k]);
+		if(counter[k]) gamma[k] = gamma[k]/counter[k];
 	}
 
