Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

RE: How to average monthly wind direction and represent them as wind barbs

This post was from a previous version of the WRF&MPAS-A Support Forum. New replies have been disabled and if you have follow up questions related to this post, then please start a new thread from the forum home page.

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@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@description = "Wind Speed"
spd@units = "m s-1"

spd_avg = dim_avg_n(spd(0:30,:,:,:),0)
spd_avg@description = "Average Wind Speed"
spd_avg@units = "m s-1"

res = True
opts = res
opts@cnFillOn = True
opts@cnLinesOn = True
opts@ContourParameters = (/ 0., 12., 0.5/)
opts@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
 
Try using wrf_vector instead of wrf_contour to plot wind barbs.

http://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_vector.shtml
 
Top