[ncl-talk] Error in plotting average wind speed at higher heights
Kunal Dayal
kday202 at aucklanduni.ac.nz
Tue Nov 24 18:33:49 MST 2020
Hi Ncl-talk,
I am trying to plot the average wind speed maps at 55 m above ground level
and I am getting the following error message:
"
*fatal:conform_dims: the dimension sizes of the second argument do not
match those indicated by the third argument*
"
The specific section of the script where the error occurs is highlighted
below:
"
u = wrf_user_getvar(a,"ua",-1)
v = wrf_user_getvar(a,"va",-1)
height = wrf_user_getvar(a,"z",0)
ter = wrf_user_getvar(a,"ter",0)
nheight = conform(height,ter,(/1,2/))
height = height - nheight
*cheight=conform_dims(dimsizes(u),height,(/1,2,3/))*
u_plane = wrf_user_intrp3d(u,cheight,"h",55,0.,False)
v_plane = wrf_user_intrp3d(v,cheight,"h",55,0.,False)
spd = (u_plane*u_plane + v_plane*v_plane)^(0.5)
spd at description = "55 m Wind Speed"
spd at units = "m s-1"
spd_avg = dim_avg_n(spd(0:31,:,:,:),0)
spd_avg at description = "Average Wind Speed"
spd_avg at units = "m s-1"
"
I understand that the dimension of u is time x lev x lat x lon (0, 1, 2, 3)
and the dimension for height is time x lat x lon (0, 2, 3).
I have tried the following in the script:
- cheight=conform_dims(dimsizes(u),height,(/1,2,3/))
- cheight=conform_dims(dimsizes(u),height,(/0,2,3/))
- cheight=conform_dims(dimsizes(u),height,(/0,1,2/))
- cheight=conform_dims(dimsizes(u),height,1)
- cheight=conform_dims(dimsizes(u),height,0)
But, the problem remains with the same error message.
Appreciate your assistance and advice.
Regards
Kunal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20201125/06f4b979/attachment.html>
More information about the ncl-talk
mailing list