[ncl-talk] A comment on an error message

Barry Lynn barry.h.lynn at gmail.com
Tue Jun 18 10:01:08 MDT 2019


Thank you.

I figured out the error, but I wasn't sure how to understand what part of
the message referred to which part of the equivalence -- from the message
itself.

Barry

On Tue, Jun 18, 2019 at 6:33 PM Dennis Shea <shea at ucar.edu> wrote:

>
> ncl 0> x = *random_normal*(0,5, (/2,3,4,5/))
> ncl 1> printVarSummary(x)                          ; <== ; 4D ==> [2] x
> [3] x [4] x [5]
> ncl 2> printVarSummary(x(:,*1*,:,:))                ; <== ; 3D ==> [2] x
> [4] x [5]
>
> NCL treats a dimension of size 1 as a *degenerate dimension.*
> NCL silently acts like Matlab's  *squeeze*
> <https://www.mathworks.com/help/matlab/ref/squeeze.html;jsessionid=8cbd8b52c78c9d7954f78b44f7d6>
> function.
>
> HTH
>
> On Mon, Jun 17, 2019 at 9:31 PM Barry Lynn <barry.h.lynn at gmail.com> wrote:
>
>> Hello:
>>
>> I am wondering how to read this error message.
>>
>> I actually used three subscripts (1,:,:) when there are four (:,1,:,:),
>> but I am wondering how to glean this information from the error message.
>>
>> fatal:["Execute.c":7863]:Number of subscripts on right-hand-side do not
>> match
>>
>> number of dimensions of variable: (3), Subscripts used: (4)
>>
>> --
>> Barry H. Lynn, Ph.D
>> Senior Associate Scientist, Lecturer,
>> The Institute of the Earth Science,
>> The Hebrew University of Jerusalem,
>> Givat Ram, Jerusalem 91904, Israel
>> Tel: 972 547 231 170
>> Fax: (972)-25662581
>>
>> C.E.O, Weather It Is, LTD
>> Weather and Climate Focus
>> http://weather-it-is.com
>> Jerusalem, Israel
>> Local: 02 930 9525
>> Cell: 054 7 231 170
>> Int-IS: x972 2 930 9525
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>

-- 
Barry H. Lynn, Ph.D
Senior Associate Scientist, Lecturer,
The Institute of the Earth Science,
The Hebrew University of Jerusalem,
Givat Ram, Jerusalem 91904, Israel
Tel: 972 547 231 170
Fax: (972)-25662581

C.E.O, Weather It Is, LTD
Weather and Climate Focus
http://weather-it-is.com
Jerusalem, Israel
Local: 02 930 9525
Cell: 054 7 231 170
Int-IS: x972 2 930 9525
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190618/1ecb0614/attachment.html>


More information about the ncl-talk mailing list