kunaldayal
Member
Hi,
I am trying to plot the wind rose using the scripts provided under examples on the NCL website.
This is the script I am using:
"
begin
f = addfile("/scale_wlg_persistent/filesets/project/uoa02450/Build_WRF/WRFV3/WRFV3/run/wrfout_d03_2016-12-29_00:00:00.nc","r")
uvm10 = wrf_user_getvar(f,"uvmet10",-1)
u10 = uvm10(0,:,:,
v10 = uvm10(1,:,:,
; Pick one grid point
loc = wrf_user_ll_to_ij(f, -18.21, 177.73, True)
mx = loc(0) - 1
ny = loc(1) - 1
lat1 = f->XLAT(0,ny,mx)
lon1 = f->XLONG(0,ny,mx)
res = True
res@tiMainString = "WRF: All Times: grid point ["+sprintf("%5.2f",lat1)+" , "+sprintf("%5.2f",lon1) +"]"
wspd1= ndtooned( sqrt(u10,ny,mx)^2 + v10,ny,mx)^2) )
wdir1= ndtooned( atan2(u10,ny,mx),v10,ny,mx))/0.01745329 +180. )
numPetals = 16
circFr = 10.
spdBounds = (/ 10., 20., 30., 40. /)
colorBounds = (/ "blue", "green", "yellow", "red" /)
wks = gsn_open_wks("pdf","rose")
plot = WindRoseColor (wks,wspd1,wdir1,numPetals,circFr,spdBounds,colorBounds,res)
end
"
And this the error I am getting:
"
(0) NOTE: No unstaggering required, as the input field is already on mass points.
(0) NOTE: No unstaggering required, as the input field is already on mass points.
fatal:["NclFile.c":2100]:Subscript out of range, error in subscript #1
fatal:["Execute.c":8637]:Execute: Error occurred at or near line 15 in file windrose
"
Appreciate assistance and advice as to how I can fix the problem and plot the wind rose at a grid point.
Regards
Kunal
I am trying to plot the wind rose using the scripts provided under examples on the NCL website.
This is the script I am using:
"
begin
f = addfile("/scale_wlg_persistent/filesets/project/uoa02450/Build_WRF/WRFV3/WRFV3/run/wrfout_d03_2016-12-29_00:00:00.nc","r")
uvm10 = wrf_user_getvar(f,"uvmet10",-1)
u10 = uvm10(0,:,:,
v10 = uvm10(1,:,:,
; Pick one grid point
loc = wrf_user_ll_to_ij(f, -18.21, 177.73, True)
mx = loc(0) - 1
ny = loc(1) - 1
lat1 = f->XLAT(0,ny,mx)
lon1 = f->XLONG(0,ny,mx)
res = True
res@tiMainString = "WRF: All Times: grid point ["+sprintf("%5.2f",lat1)+" , "+sprintf("%5.2f",lon1) +"]"
wspd1= ndtooned( sqrt(u10,ny,mx)^2 + v10,ny,mx)^2) )
wdir1= ndtooned( atan2(u10,ny,mx),v10,ny,mx))/0.01745329 +180. )
numPetals = 16
circFr = 10.
spdBounds = (/ 10., 20., 30., 40. /)
colorBounds = (/ "blue", "green", "yellow", "red" /)
wks = gsn_open_wks("pdf","rose")
plot = WindRoseColor (wks,wspd1,wdir1,numPetals,circFr,spdBounds,colorBounds,res)
end
"
And this the error I am getting:
"
(0) NOTE: No unstaggering required, as the input field is already on mass points.
(0) NOTE: No unstaggering required, as the input field is already on mass points.
fatal:["NclFile.c":2100]:Subscript out of range, error in subscript #1
fatal:["Execute.c":8637]:Execute: Error occurred at or near line 15 in file windrose
"
Appreciate assistance and advice as to how I can fix the problem and plot the wind rose at a grid point.
Regards
Kunal