[Thread Prev][Thread Next][Index]
Re: [ferret_users] Creating spatial filter for smoothing
Hi,
I think it's a bit simpler than that. This is just the double
application of a 3 point binomial filter with weights (1,2,1)/4
in 2
directions.
let Z_smooth=Z[i=@sbn:3,j=@sbn:3]
should do the trick.
Russ
On Wed, 2012-03-14 at 05:59 +1100, William S. Kessler wrote:
> You can do this easily (essentially as you have written it below)
> using the @SHF notation. BK
>
> On Mar 13, 2012, at 11:17 AM, Geeta Persad wrote:
>
> > 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