[ncl-talk] Hodograph

ali mughal mughalali655 at gmail.com
Wed Feb 9 02:52:18 MST 2022


thanks Jonathan

uv should  have 4 dimensions according to the explanation on
https://www.ncl.ucar.edu/Document/Functions/Contributed/wind_component.shtml
.






On Wed, Feb 9, 2022 at 4:52 PM Buzan, Jonathan <jbuzan at purdue.edu> wrote:

> Hi Ali Mughal,
>
> Try
> > printVarSummary(uv)
> The warning is saying that your subscripts do not match your variable.
>
> Cheers,
> -Jonathan
>
>
>
> On Feb 9, 2022, at 09:23, ali mughal via ncl-talk <
> ncl-talk at mailman.ucar.edu> wrote:
>
> Dear NCL Team
>
> In the NCL example script,  skewt_10.ncl. The following loop is not
> working. I am also copying the error below.
>
> ;---Calculate coordinates of hodograph grid circles
>
>  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
>
>
> 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
>
>
> I would be grateful if I can get a reply to this question.
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at mailman.ucar.edu
> List instructions, subscriber options, unsubscribe:
> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20220209/b7b2bd51/attachment.html>


More information about the ncl-talk mailing list