Index: /issm/trunk/src/m/model/ThicknessCorrection.m
===================================================================
--- /issm/trunk/src/m/model/ThicknessCorrection.m	(revision 6888)
+++ /issm/trunk/src/m/model/ThicknessCorrection.m	(revision 6889)
@@ -5,5 +5,5 @@
 %   by forcing the hydrostatic equilibrium.
 %   the thickness is modified as follows:
-%      thickness = coeff * thickness_observation + (1-coeff) * thickness_hydrostatic
+%      thickness = (1-coeff) * thickness_observation + coeff * thickness_hydrostatic
 %   where:
 %      coeff=(d/distance)^2;
@@ -20,4 +20,5 @@
 thickness=md.thickness;
 thickness_hydro=md.surface/(1-md.rho_ice/md.rho_water);
+thickness_coeff=zeros(size(md.thickness));
 
 %get nodes on ice sheet and on ice shelf
@@ -51,5 +52,6 @@
 	if d>distance,
 
-		%if d > 15km, hydrostatique equilibrium
+		%if d > 15km, hydrostatic equilibrium
+		thickness_coeff(pos_shelf(i))=1;
 		thickness(pos_shelf(i))=thickness_hydro(pos_shelf(i));
 
@@ -57,6 +59,6 @@
 
 		%else: quadratic combination of hydrostatic equilibrium and observations
-		coeff=(d/distance)^2;
-		thickness(pos_shelf(i))=(1-coeff)*thickness(pos_shelf(i))+coeff*thickness_hydro(pos_shelf(i));
+		thickness_coeff(pos_shelf(i))=(d/distance)^2;
+		thickness(pos_shelf(i))=(1-thickness_coeff(pos_shelf(i)))*thickness(pos_shelf(i))+thickness_coeff(pos_shelf(i))*thickness_hydro(pos_shelf(i));
 
 	end
@@ -71,3 +73,4 @@
 %change bed to take into account the changes in thickness
 md.thickness=thickness;
+md.thickness_coeff=thickness_coeff;
 md.bed=md.surface-md.thickness;
