[ncl-talk] Wondering Why I Get This Error
Barry Lynn
barry.h.lynn at gmail.com
Fri Sep 8 02:44:38 MDT 2017
Of course I read the error statement.
I don't understand why I can add dbz (which is a 2 dimensional array) to a
scalar value. This is a pretty basic thing to do.
Moreover, when I defined "wrap_around" as dbz, and then set wrap_around to
zero, I still can't coerce the variables.
fatal:["NclVar.c":1390]:Assignment type mismatch, right hand side can't be
coerced to type of left hand side
fatal:["Execute.c":8575]:Execute: Error occurred at or near line 35 in file
./radar_2.ncl
Is the answer to this problem obvious? It seems to me that it should be,
which I am (at the moment) frustrated.
wrap_around = dbz
wrap_around = 256.
do j = 0,dims2d(0)-1
do i = 0,dims2d(1)-1
check = ismissing(dbz(j,i))
if (check.eq.False)then
if (dbz(j,i).lt.0)then
dbz(j,i) = dbz(j,i) + wrap_around(j,i)
end if
end if
end do
end do
On Fri, Sep 8, 2017 at 11:37 AM, Marston Johnston <shejo284 at gmail.com>
wrote:
> Again, read the error statement and try to understand what it is telling
> you:
>
> atal:["NclVar.c":1390]:Assignment type mismatch, right hand side can't be
> coerced to type of left hand side
>
> fatal:["Execute.c":8575]:Execute: Error occurred at or near line 35 in
> file ./ra
>
>
>
> You have a TYPE mismatch between your variables and NCL cannot coerce one
> to the other. Make sure you are adding the same types of variables…
>
> For example, you cannot do 1 + “help”, that would be a type mismatch!
>
> /M
>
>
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Marston S. Ward, PhD
>
> Department of Earth Sciences
>
> University of Gothenburg, Sweden
>
> Email: marston.johnston at gu.se
>
> SkypeID: marston.johnston
>
> Phone: +46-31-7864901 <+46%2031%20786%2049%2001>
>
> Only the fruitful thing is true!
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
>
>
>
> *From: *ncl-talk <ncl-talk-bounces at ucar.edu> on behalf of Barry Lynn <
> barry.h.lynn at gmail.com>
> *Date: *Friday, 8 September 2017 at 10:11
> *To: *ncl-talk <ncl-talk at ucar.edu>
> *Subject: *[ncl-talk] Wondering Why I Get This Error
>
>
>
> atal:["NclVar.c":1390]:Assignment type mismatch, right hand side can't be
> coerced to type of left hand side
>
> fatal:["Execute.c":8575]:Execute: Error occurred at or near line 35 in
> file ./ra
>
--
Barry H. Lynn, Ph.D
Senior 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
US 914 432 3108
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170908/3af44466/attachment.html>
More information about the ncl-talk
mailing list