How to Filter 2D Fourier Coefficients

An example with GMT.jl

using GMT

# Download a Geoid grid
G = grdcut("@earth_geoid_02m", region=(-40,-20,32,45));

#Filter with Boxcar (low pass wavelength > 500 km). ´f=:g´ is to infor that grid is in geogs, `N=:a` is to select best FFT dims(
 Gf_box = grdfft(G, F="-/-/500000/500000", N=:a, f=:g);

# Filter with cosne taper. Pass wavelengths > 500 km and rejecting wavelengths < 100 km
Gf_ct = grdfft(G, F="-/-/500000/100000", N=:a, f=:g);

The results

viz(G, shade=true, coast=true, title="Geoid", colorbar=true, name="Goid.jpg")
viz(Gf_box, shade=true, coast=true, title="Geoid Boxcar", colorbar=true, name="Goid_box.jpg")
viz(Gf_ct, shade=true, coast=true, title="Geoid cos-taper", colorbar=true, name="Goid_ct.jpg")

2 Likes