A Fourier spectrum with prescribed logarithimic slope and zero phases is constructed.
initmetagauss(sx, ns)
spectral slope for the output field.
The convention is that this is the slope of k*|A(k)|^2
.
size of the output field.
Output complex field in Fourier space with specified spectral slope,
with dimensions c(ns, ns)
.
# NOT RUN {
# Make a synthetic rainfall field with prescribed logarithmic spectral slope
f = initmetagauss(1.7, 64)
r = metagauss(f)
# Check slope of the resulting field
fx <- fft2d(r)
fitslope(fx)
# 1.640373
# }
Run the code above in your browser using DataLab