# History file 'cknfft.h' to generate and plot Von Karman correlation
# function according to the equations given in
#     Klimes, L. (2002): Correlation functions of random media.
#         Pure and Applied Geophysics, 159, 1811-1831.
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Input files required
  chk.pl: "forms/" "mul.cal"
  chk.pl: "forms/" "div.cal"
  chk.pl: "forms/" "echo.pl"

# Values describing the random medium
  NDIM=1  POWERN=-0.1  ACORG=0.  ACOR=10.

# Analytical calculation of the correlation function by 'grdckn.for'
# according to the equation 48
  O1=-10. D1=0.1  N1=201
  CKNOUT='ckn.out'
  grdckn:

# Calculation of the correlation function by FFT
# according to equations 16, 17 and 34
  O1=-31.415926  D1=0.0306796  N1=2048
  grdcor:
  CAL='mul.cal' GRD1='grdcor.out' GRD2='grdcor.out' GRD3='grdcal.out'
  grdcal:
  FFTINR='grdcal.out' FFTOUTR='fft.tmp'
  O1OUT=-10.  D1OUT=0.1  N1OUT=201
  FFT=1.
  grdfft:
  echo.pl: "@2=@1/2.506628" "> cal.tmp"
  CAL='cal.tmp' GRD1='fft.tmp' GRD2='fft.out'
  N1=201
  grdcal:

# Plots of the 1-D functions stored in files 'ckn.out' and 'fft.out'
  KSIG=0  DT=0.1  NFFT=512  MPTS=201
  echo.pl: "/" ">>ckn.out"
  echo.pl: "/" ">>fft.out"
  SIGDIG='ckn.out'  SS=' '  SIGPLOT='ckn.ps'  ss:
  SIGDIG='fft.out'  SS=' '  SIGPLOT='fft.ps'  ss:

# Comparisson of the results
  CAL='div.cal' GRD1='fft.out' GRD2='ckn.out' GRD3='div.out'
  N1=201
  grdcal:

