This code generates two-dimensional analytic perturbation fields. These perturbations can be used, for example, to initialize idealized numerical model simulations. The methodology is described in Bryan et al. (2007, JAS, p. 1249, section 4a); see also Knievel et al. (2007, MWR, 3808, section 2f).
The code is available here: getperts.tar
To compile the code, use the included "compile" script. (You will probably need to modify the "compile" script, depending on what fortran compiler you have availble.)
To help explain the various types of perturbations that can be generated with this code, I provide below some examples.
Example 1: white noise, one scale only (1 km):
Example 2: white noise, one scale only (8 km):
Example 3: white noise, multiple scales (1 km through 8 km)
Example 4: kappa^{-5/3} spectrum, 6-km large eddy scale, no filter
Example 5: kappa^{-3} spectrum, 6-km large eddy scale, no filter