runtraj.meteorology.fit_variogram#
- runtraj.meteorology.fit_variogram(lag, gamma, *, sigma=None)[source]#
Fit an exponential variogram to an empirical one.
- Parameters:
lag (
ArrayLike) – The empirical variogram, as returned byvariogram().gamma (
ArrayLike) – The empirical variogram, as returned byvariogram().sigma (
float|None) – Error standard deviation. When given, the sill is fixed atsigma²and only the correlation scale is fitted, as Lin and Gerbig’s definition implies. Use it when the sample standard deviation is known.Nonefits both.
- Return type:
Notes
The model has no nugget, and the fit is unweighted least squares on the bins, whatever the number of pairs in each. Noise in the errors adds a variance that stays at small separations, which the model cannot hold, so with sigma fixed at the sample standard deviation the fitted
lengthcomes out too short. In a test with a true length of 450 m, noise that was 20% of the variance gave about 330 m.