[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: automating variograms
Yetta Jager wrote:
>
> Does anyone know of a way to get Gstat to estimate variogram parameters for
> a list of variables in one fell swoop (i.e. without the interface) and give
> a command file or other electronic output with parameter estimates? We are
> using a categorical variable that may have many values and its rather slow
> to check the plot for each one. We have a very high density of points, so
> fits are typically extraordinary. I haven't succeeded with running gstat
> for variogram modeling inside a UNIX script or in batch mode, but it may be
> my ignorance.
The following command file may do what you want, with the example data:
# direct fit & plot in batch mode
data(zince): '../zinc.eas', x=1, y=2, v=3, log;
data(zincs): '../zinc.eas', x=1, y=2, v=3, log;
variogram(zince): 'zince.sem' : 1 Exp(300); # initial fit parameters
variogram(zincs): 'zincs.sem' : 1Nug() + 1 Sph(300); # initial fit
parameters
method: semivariogram;
set fit = 1; # fit; and use weights n(h)
the fitted model is written to the log file, use
gstat -l logfile <cmd_file>
to save it to logfile, and you can then filter the output for the
fitted parameters (using grep and awk).
I just found out that writing to a plot file (set plot = '...';)
does not work flawless when multiple variograms are fitted.
Hope this helps,
--
Edzer