<div dir="ltr"><div>The variable 'spd' is 3D not 4D<br></div><div><br></div><div>Variables: Dimensions => Sizes</div><div>==========================<br></div><div>height: [Time x bottom_top x south_north x west_east] => (ntim,klev,nlat,mlon)<br>cheight: (ntim,klev,nlat,mlon)<br>u_plane: [Time x south_north x west_east] => (ntim,nlat,mlon)<br>spd: [Time x south_north x west_east] => (ntim,nlat,mlon) <=== 3D not 4D</div><div><br> spd_avg = dim_avg_n(spd(0:31,:,:),0) ; <*** spd is (ntim,nlat,mlon)<br> spd_avg@description = "Average Wind Speed"<br> spd_avg@units = "m s-1"<br> printVarSummary(spd_avg) ; [south_north] x [west_east] => (nlat,mlon)<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Nov 24, 2020 at 6:34 PM Kunal Dayal via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu">ncl-talk@mailman.ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Ncl-talk,<div><br></div><div>I am trying to plot the average wind speed maps at 55 m above ground level and I am getting the following error message:</div><div>"</div><div><b>fatal:conform_dims: the dimension sizes of the second argument do not match those indicated by the third argument</b></div><div>"</div><div>The specific section of the script where the error occurs is highlighted below:</div><div>"</div><div>u = wrf_user_getvar(a,"ua",-1) <br>v = wrf_user_getvar(a,"va",-1) <br>height = wrf_user_getvar(a,"z",0)<br>ter = wrf_user_getvar(a,"ter",0) <br><br>nheight = conform(height,ter,(/1,2/))<br>height = height - nheight<br><br><b>cheight=conform_dims(dimsizes(u),height,(/1,2,3/))</b><br>u_plane = wrf_user_intrp3d(u,cheight,"h",55,0.,False)<br>v_plane = wrf_user_intrp3d(v,cheight,"h",55,0.,False)<br><br>spd = (u_plane*u_plane + v_plane*v_plane)^(0.5)<br>spd@description = "55 m Wind Speed"<br>spd@units = "m s-1" <br> <br>spd_avg = dim_avg_n(spd(0:31,:,:,:),0)<br>spd_avg@description = "Average Wind Speed"<br>spd_avg@units = "m s-1" <br></div><div>"</div><div>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).</div><div><br></div><div>I have tried the following in the script:</div><div><ul><li>cheight=conform_dims(dimsizes(u),height,(/1,2,3/)) </li><li>
cheight=conform_dims(dimsizes(u),height,(/0,2,3/)) </li><li>cheight=conform_dims(dimsizes(u),height,(/0,1,2/)) </li><li>
cheight=conform_dims(dimsizes(u),height,1) </li><li>
cheight=conform_dims(dimsizes(u),height,0) </li></ul></div><div>But, the problem remains with the same error message. </div><div><br></div><div>Appreciate your assistance and advice.</div><div><br></div><div>Regards</div><div>Kunal</div></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div>