[Thread Prev][Thread Next][Index]

Re: Smooth velocity fields with vector function



Hi Jerome,
	I think your u_sum and v_sum data need to be averaged
to get an overall smoother result.  Try one of @sbx, @shn, ... as for
example in the following demo.  Note that @sbx:3 will lose
points around the boundary (or around missing points like
islands, unless you use an "if()then ... else ..." definition
to restore the lost points - perhaps with the original unsmoothed
values.  You might try @sbn, @shn, ... if the smoothing by @sbx
is too much.
Good luck,
Mick

region/i=1:24/j=1:18
let d2r=atan(1.)/45
let u_sum=0.3*randu(i+j)+sin(d2r*(i-j)/0.2)
let v_sum=0.2*randn(i-j)+cos(d2r*(i+j)/0.3)
let usmooth = u_sum[x=@sbx:3,y=@sbx:3]
let vsmooth = v_sum[x=@sbx:3,y=@sbx:3]
set view upper ; vector/xskip=1/yskip=1 u_sum,v_sum
set view lower ; vector/xskip=1/yskip=1 usmooth,vsmooth

|Please note NEW E-Mail Address|
|!!! Mick.Spillane@noaa.gov !!!|
|__Room 2070 Bldg#3 NOAA/PMEL__|
|____Phone_:_(206)526-6780_____|






[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement