[ncl-talk] Error subscript when using indices output from dim_pqsort to reorder another array
Dennis Shea
shea at ucar.edu
Thu May 28 11:21:11 MDT 2020
Whenever you encounter an error, you should add print statements to help
you debug the issue.
printVarSummary(x) ; overview of source variable
print("-----") ; visual break
ip = dim_pqsort(x,-2) ;; descending order
printVarSummary(ip)
prinyMinMax(ip, 0)
print("-----")
dim_ip = dimsizes(ip)
print(dim_ip)
print("-----")
y=y(ip,:,:,:)
=============================
Are there grid locations that contain all missing values?
On Tue, May 26, 2020 at 6:36 PM YAN HUIPING via ncl-talk <ncl-talk at ucar.edu>
wrote:
> Hi,
> I am using the function dim_pqsort to reorder an array with dimensions of
> (time,nlat, nlon, nlev) following the instructions
> https://www.ncl.ucar.edu/Document/Functions/Built-in/dim_pqsort.shtml
>
> ip=dim_pqsort(x,-2);; descending order
> y=y(ip,:,:,:)
>
> However, there are error messages: “fatal:Illegal subscript. Subscripts
> must be scalar or one dimensional vectors”.
> Ps: the version of NCL I used is 6.5.0
>
> Could please help me on this problem?
>
> Thanks,
> Huiping
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20200528/2138c128/attachment.html>
More information about the ncl-talk
mailing list