% Get DeFault Kriging Parameters

%%  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.


global status

if status >= 1					% set default x,y value
   load default_coord
   [xmin xmin_indx]=min(x);[xmax xmax_indx]=max(x);
   ymin=min(y);ymax=max(y);
else
   xmin=[];xmax=[];ymin=[];ymax=[];
end

if status >= 2
   load default_variogram
   hk=findobj(gcf,'Tag','vmod');
   if model > 0
      set(hk,'string',num2str(model));
      hk1=findobj(gcf,'Tag','VariogramType');
      set(hk1,'string','Variogram');
   else
      set(hk,'string',num2str(-model));
      hk1=findobj(gcf,'Tag','VariogramType');
      set(hk1,'string','Covariance')
   end
   hk=findobj(gcf,'Tag','nugt');
   set(hk,'string',num2str(Ng));
   hk=findobj(gcf,'Tag','sill');
   set(hk,'string',num2str(Sil));
   hk=findobj(gcf,'Tag','lscl');
   set(hk,'string',num2str(L*DispScl));
   hk=findobj(gcf,'Tag','osci');
   set(hk,'string',num2str(b));
   hk=findobj(gcf,'Tag','powr');
   set(hk,'string',num2str(p));
   hk=findobj(gcf,'Tag','delx');
   set(hk,'string',num2str(res*DispScl))
   hk=findobj(gcf,'Tag','dely');
   set(hk,'string',num2str(res*DispScl))
   sr=2*L;
   hk=findobj(gcf,'Tag','srad');
   set(hk,'string',num2str(sr*DispScl))
end   
if Lat_long == 1
   scl=cos(lat*pi/180);
else
   scl=1;
end
hk=findobj(gcf,'Tag','xmin');
set(hk,'string',num2str(min(x*DispScl./scl)))
hk=findobj(gcf,'Tag','xmax');
set(hk,'string',num2str(max(x*DispScl./scl)))
hk=findobj(gcf,'Tag','ymin');
set(hk,'string',num2str(ymin*DispScl))
hk=findobj(gcf,'Tag','ymax');
set(hk,'string',num2str(ymax*DispScl))


