function   	v=scale(ref_lvl)
%% digits truncation  

%%  Kriging Software Package  version 1.0 beta,   October 29, 1998
%%  Copyright (c) 1998, property of Dezhang Chu and Woods Hole Oceanographic
%%  Institution.  All Rights Reserved.

k=round(log10(abs(ref_lvl)/5+eps));
v=round([0.4 0.6 0.8]*ref_lvl/10^k)*10^k;