function  [model,Ng,Sil,L,b,p]=getvariopara()
%% get parameter from the panel (set by user) of semi-variogram/correlogram

%%  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 max_nugt max_sill max_lscl max_powr max_osci

%%% read in parameters
ModIndx=[1:3 5 20:22 24:28 30];
ListHndl=findobj(gcf,'Tag','VariogramModel');
index=get(ListHndl,'Value');
model=ModIndx(index);
hvar=findobj(gcf,'Tag','radioVAR');
value=get(hvar(1),'value');
if isempty(value) | value == 0
   model=-model;						% covariance model
end

hvar=findobj(gcf,'Tag','txtnugt');
Ng=str2num(get(hvar,'String'));
hvar=findobj(gcf,'Tag','txtsill');
Sil=str2num(get(hvar,'String'));
hvar=findobj(gcf,'Tag','txtlscl');
L=str2num(get(hvar,'String'));
hvar=findobj(gcf,'Tag','txtosci');
b=str2num(get(hvar,'String'));
hvar=findobj(gcf,'Tag','txtpowr');
p=str2num(get(hvar,'String'));

if Ng > max_nugt max_nugt=Ng;end
if Sil > max_sill max_sill=sill;end
if L > max_lscl max_lscl=L;end
if p > max_powr max_powr=p;end
if b > max_osci max_osci=b;end

hv=findobj(gcf,'Tag','delx');
res=str2num(get(hv(1),'string'));
save default_variogram model Ng Sil L b p res



