<div dir="ltr"><div>Whenever you encounter an error, you should add print statements to help you debug the issue.</div><div><br></div><div>  printVarSummary(x)                         ; overview of source variable<br></div><div>  print("-----")                                       ; visual break</div><div><br></div><div>  ip = dim_pqsort(x,-2)                          ;; descending order</div><div><div>  printVarSummary(ip)</div><div>  prinyMinMax(ip, 0)</div><div>  print("-----") <br></div><div><br></div><div>  dim_ip = dimsizes(ip)</div><div>  print(dim_ip)<br></div><div>  print("-----")    <br></div><div><br></div></div><div>  
y=y(ip,:,:,:)</div><div>=============================</div><div>Are there grid locations that contain all missing values? <br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, May 26, 2020 at 6:36 PM YAN HUIPING via ncl-talk <<a href="mailto:ncl-talk@ucar.edu">ncl-talk@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">Hi,<br>
I am using the function dim_pqsort to reorder an array with dimensions of (time,nlat, nlon, nlev) following the instructions <a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/dim_pqsort.shtml" rel="noreferrer" target="_blank">https://www.ncl.ucar.edu/Document/Functions/Built-in/dim_pqsort.shtml</a><br>
<br>
ip=dim_pqsort(x,-2);; descending order<br>
y=y(ip,:,:,:)<br>
<br>
However, there are error messages: “fatal:Illegal subscript. Subscripts must be scalar or one dimensional vectors”.<br>
Ps: the version of NCL I used is 6.5.0<br>
<br>
Could please help me on this problem?<br>
<br>
Thanks,<br>
Huiping<br>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div>