[Thread Prev][Thread Next][Index]
[ferret_users] Creating spatial filter for smoothing
Hi all,
I'm trying to create a spatial filter to smooth a relative vorticity field calculated from netcdf data. The variable I'm trying to smooth is Z (relative vorticity at 300 mb at each grid point), and the filter I'm trying to implement is:
Z_smooth(i, j) = [4/16]Z(i,j) + [2/16]{Z(i-1, j) + Z(i+1, j) + Z(i, j-1) + Z(i, j+1)} + [1/16]{Z(i-1, j-1) + Z(i-1, j+1) + Z(i+1, j-1) + Z(i+1, j+1)}
where i and j are the longitude and latitude indices, respectively.
How might I go about implementing something like this in ferret? In particular, I'm not sure how to go about doing index-wise variable access (i.e. indicating Z(i-1, j)) in ferret, if that's what I need to do to code this filter. There may be another simpler or built-in function in ferret for this.
If anyone has any insight for how to implement this, it would be greatly appreciated!
Thanks,
Geeta
[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce /
NOAA /
OAR /
PMEL /
Ferret
Privacy Policy | Disclaimer | Accessibility Statement