[ncl-talk] How to average monthly wind direction and represent them as wind barbs
Kunal Dayal
kday202 at aucklanduni.ac.nz
Wed Dec 11 03:24:07 MST 2019
Hi,
I working on mapping wind resources from WRFOUT files.
I can easily plot contour maps of average wind speed for a month but I am
unable to represent average wind direction in the form of wind barbs.
The code I am using for the average wind speed contour maps is as follows:
"
begin
a =
addfile("/scale_wlg_persistent/filesets/project/uoa02450/wrf-topo2sstpblmix/wrfout_d03_2017-06-28_00:00:
00.nc","r")
type = "pdf"
wks = gsn_open_wks(type,"Average Wind Speed - Jul 2017")
opts = True
opts at MainTitle = "WIND SPEED"
pltres = True
mpres = True
times = wrf_user_getvar(a,"times",-1)
ntimes = dimsizes(times)
u = wrf_user_getvar(a,"ua",-1)
v = wrf_user_getvar(a,"va",-1)
spd = (u*u + v*v)^(0.5)
spd at description = "Wind Speed"
spd at units = "m s-1"
spd_avg = dim_avg_n(spd(0:30,:,:,:),0)
spd_avg at description = "Average Wind Speed"
spd_avg at units = "m s-1"
res = True
opts = res
opts at cnFillOn = True
opts at cnLinesOn = True
opts at ContourParameters = (/ 0., 12., 0.5/)
opts at gsnSpreadColorEnd = -3
contour_spd_avg = wrf_contour(a,wks,spd_avg(0,:,:),opts)
delete(opts)
plot = wrf_map_overlays(a,wks,(/contour_spd_avg/),pltres,mpres)
end
"
I wish to add monthly average wind direction to the same maps in the form
of wind barbs.
Appreciate your assistance and advice.
Regards
Kunal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20191211/f6e1a4fc/attachment.html>
More information about the ncl-talk
mailing list