<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Ali Mughal,
<div class=""><br class="">
</div>
<div class=""> uv should be called using 4 dimensions. It looks like</div>
<div class="">cir_x_pts(dd,cc) </div>
<div class="">should be 2 dimensions. This means that you need to select 2 dimensions from uv to be put into <span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">cir_x_pts</span></div>
<div class=""><br class="">
</div>
<div class="">I don’t know what your data is, but I would want to know what my data was so I can select the correct dimensions. But the code will look something like:</div>
<div class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">cir_x_pts(dd,cc) = </span>uv(dd,cc,0,1)</div>
<div class="">
<div><br class="">
</div>
<div>Cheers,</div>
<div>-Jonathan</div>
<div><br class="">
</div>
<div><br class="">
</div>
<div><br class="">
</div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">On Feb 9, 2022, at 10:52, ali mughal <<a href="mailto:mughalali655@gmail.com" class="">mughalali655@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">
<div dir="ltr" class="">thanks Jonathan
<div class=""><br class="">
</div>
<div class="">uv should have 4 dimensions according to the explanation on <a href="https://www.ncl.ucar.edu/Document/Functions/Contributed/wind_component.shtml" class="">
https://www.ncl.ucar.edu/Document/Functions/Contributed/wind_component.shtml</a>.</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
</div>
</div>
<br class="">
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Wed, Feb 9, 2022 at 4:52 PM Buzan, Jonathan <<a href="mailto:jbuzan@purdue.edu" class="">jbuzan@purdue.edu</a>> wrote:<br class="">
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div style="overflow-wrap: break-word;" class="">Hi Ali Mughal,
<div class=""><br class="">
</div>
<div class="">Try </div>
<div class="">> printVarSummary(uv)</div>
<div class="">The warning is saying that your subscripts do not match your variable.</div>
<div class=""><br class="">
</div>
<div class="">Cheers,</div>
<div class="">-Jonathan</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
<div class=""><br class="">
<blockquote type="cite" class="">
<div class="">On Feb 9, 2022, at 09:23, ali mughal via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank" class="">ncl-talk@mailman.ucar.edu</a>> wrote:</div>
<br class="">
<div class="">
<div dir="ltr" class="">
<div dir="ltr" class="">
<div dir="ltr" class="">
<div dir="ltr" class="">Dear NCL Team
<div class=""><br class="">
</div>
<div class="">In the NCL example script, <span style="white-space:pre-wrap" class="">skewt_10.ncl. The following loop is not working. I am also copying the error below.</span></div>
<div class=""><span style="white-space:pre-wrap" class=""><br class="">
</span></div>
<div class=""><span style="white-space:pre-wrap" class=""></span><span style="white-space:pre-wrap" class="">;---Calculate coordinates of hodograph grid circles</span></div>
<pre style="white-space:pre-wrap" class=""> circle_rad = ispan(20,240,20) ; hodograph grid circle radii
n_circle_rad = dimsizes(circle_rad)
circle_deg = ispan(0,360,2) ; points 360 deg around hodograph circle
n_deg = dimsizes(circle_deg)
cir_x_pts = new((/n_circle_rad,n_deg/),"float") ; x coordinates for hodograph circles
cir_y_pts = new((/n_circle_rad,n_deg/),"float") ; y coordinates for hodograph circles
do cc=0,n_deg-1 ; loop through all degrees in circle
do dd=0,n_circle_rad-1 ; loop through all radii
uv = wind_component(circle_rad(dd),circle_deg(cc),0) ; calculate x,y coordinates using wind_component fx
cir_x_pts(dd,cc) = uv(0,0) ; x coordinates are in index 0
cir_y_pts(dd,cc) = uv(1,0) ; y coordinates are in index 1
end do
end do</pre>
<pre style="white-space:pre-wrap" class=""><br class=""></pre>
<pre class=""><font class=""><span style="white-space:pre-wrap" class="">warning:New: Could not coerce missing value parameter into appropriate type, using default
fatal:Number of subscripts (1) and number of dimensions (2) do not match for variable (uv)
fatal:["Execute.c":8578]:Execute: Error occurred at or near line 1279 in file /opt/ncl/lib/ncarg/nclscripts/csm/contributed.ncl<br class=""></span></font></pre>
<pre class=""><font class=""><span style="white-space:pre-wrap" class=""><br class=""></span></font></pre>
<pre class="">I would be grateful if I can get a reply to this question.</pre>
</div>
</div>
</div>
</div>
_______________________________________________<br class="">
ncl-talk mailing list<br class="">
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank" class="">ncl-talk@mailman.ucar.edu</a><br class="">
List instructions, subscriber options, unsubscribe:<br class="">
<a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank" class="">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></div>
</blockquote>
</div>
<br class="">
</div>
</div>
</blockquote>
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>