<div dir="ltr">Of course I read the error statement.<div><br></div><div>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.</div><div><br></div><div>Moreover, when I defined "wrap_around" as dbz, and then set wrap_around to zero, I still can't coerce the variables.</div><div><br></div><div>







<p class="gmail-p1"><span class="gmail-s1">fatal:["NclVar.c":1390]:Assignment type mismatch, right hand side can't be coerced to type of left hand side</span></p>
<p class="gmail-p1"><span class="gmail-s1">fatal:["Execute.c":8575]:Execute: Error occurred at or near line 35 in file ./radar_2.ncl</span></p><p class="gmail-p1"><span class="gmail-s1">Is the answer to this problem obvious? It seems to me that it should be, which I am (at the moment) frustrated. </span></p><p class="gmail-p1"><span class="gmail-s1"><br></span></p><p class="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-converted-space">  </span>wrap_around = </span><span class="gmail-s2">dbz</span></p><p class="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-converted-space">  </span>wrap_around = 256.</span></p><p class="gmail-p2"><span class="gmail-s1"></span><br></p><p class="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-converted-space">  </span>do j = 0,dims2d(0)-1</span></p><p class="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-converted-space">  </span>do i = 0,dims2d(1)-1</span></p><p class="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-converted-space">  </span>check = ismissing(</span><span class="gmail-s2">dbz</span><span class="gmail-s1">(j,i))</span></p><p class="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-converted-space">   </span>if (check.eq.False)then</span></p><p class="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-converted-space">   </span>if (</span><span class="gmail-s2">dbz</span><span class="gmail-s1">(j,i).lt.0)then</span></p><p class="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-converted-space">    </span></span><span class="gmail-s2">dbz</span><span class="gmail-s1">(j,i) = </span><span class="gmail-s2">dbz</span><span class="gmail-s1">(j,i) + wrap_around(j,i)</span></p><p class="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-converted-space">   </span>end if</span></p><p class="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-converted-space">   </span>end if</span></p><p class="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-converted-space">  </span>end do</span></p><p class="gmail-p1"><span class="gmail-s1">



















</span></p><p class="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-converted-space">  </span>end do</span></p><p class="gmail-p1"><span class="gmail-s1"><br></span></p></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 8, 2017 at 11:37 AM, Marston Johnston <span dir="ltr"><<a href="mailto:shejo284@gmail.com" target="_blank">shejo284@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="white" lang="EN-GB" link="#0563C1" vlink="#954F72"><div class="m_-55610706163436350WordSection1"><p class="MsoNormal"><span>Again, read the error statement and try to understand what it is telling you:<span class=""><br><br>atal:["NclVar.c":1390]:<wbr>Assignment type mismatch, right hand side can't be coerced to type of left hand side<u></u><u></u></span></span></p><span class=""><p class="MsoNormal"><span>fatal:["Execute.c":8575]:<wbr>Execute: Error occurred at or near line 35 in file ./ra<u></u><u></u></span></p><p class="MsoNormal"><span><u></u> <u></u></span></p></span><p class="MsoNormal"><span>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…<u></u><u></u></span></p><p class="MsoNormal"><span>For example, you cannot do 1 + “help”, that would be a type mismatch!<u></u><u></u></span></p><p class="MsoNormal"><span>/M<u></u><u></u></span></p><p class="MsoNormal"><span><u></u> <u></u></span></p><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070c0">~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070c0">Marston S. Ward, PhD<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070c0">Department of Earth Sciences<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070c0">University of Gothenburg, Sweden<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070c0">Email: <a href="mailto:marston.johnston@gu.se" target="_blank"><span style="color:#0070c0">marston.johnston@gu.se</span></a><u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070c0">SkypeID: marston.johnston <u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070c0">Phone: <a href="tel:+46%2031%20786%2049%2001" value="+46317864901" target="_blank">+46-31-7864901</a> <u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070c0">Only the fruitful thing is true!<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070c0">~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<u></u><u></u></span></p></div><p class="MsoNormal"><span><u></u> <u></u></span></p><p class="MsoNormal"><span><u></u> <u></u></span></p><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm"><p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black">ncl-talk <<a href="mailto:ncl-talk-bounces@ucar.edu" target="_blank">ncl-talk-bounces@ucar.edu</a>> on behalf of Barry Lynn <<a href="mailto:barry.h.lynn@gmail.com" target="_blank">barry.h.lynn@gmail.com</a>><br><b>Date: </b>Friday, 8 September 2017 at 10:11<br><b>To: </b>ncl-talk <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>><br><b>Subject: </b>[ncl-talk] Wondering Why I Get This Error<u></u><u></u></span></p></div><span class=""><div><p class="MsoNormal"><u></u> <u></u></p></div><p class="m_-55610706163436350gmail-p1" style="font-variant-caps:normal;text-align:start;word-spacing:0px"><span class="m_-55610706163436350gmail-s1"><span style="font-family:"-webkit-standard",serif;color:black">atal:["NclVar.c":1390]:<wbr>Assignment type mismatch, right hand side can't be coerced to type of left hand side</span></span><span style="font-family:"-webkit-standard",serif;color:black"><u></u><u></u></span></p><p class="m_-55610706163436350gmail-p1" style="font-variant-caps:normal;text-align:start;word-spacing:0px"><span class="m_-55610706163436350gmail-s1"><span style="font-family:"-webkit-standard",serif;color:black">fatal:["Execute.c":8575]:<wbr>Execute: Error occurred at or near line 35 in file ./ra</span></span><span style="font-family:"-webkit-standard",serif;color:black"><u></u><u></u></span></p></span></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Barry H. Lynn, Ph.D<div><div>Senior Lecturer,</div><div><div><span style="color:rgb(136,136,136)">The Institute of the Earth Science, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">The Hebrew University of Jerusalem, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Givat Ram, Jerusalem 91904, Israel </span><br style="color:rgb(136,136,136)"></div><span style="color:rgb(136,136,136)">Tel: 972 547 231 170</span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Fax: (972)-25662581</span></div></div><div><span style="color:rgb(136,136,136)"><br></span></div><div>C.E.O, Weather It Is, LTD<br>Weather and Climate Focus<br><a href="http://weather-it-is.com" target="_blank">http://weather-it-is.com</a><br>Jerusalem, Israel<br>Local: 02 930 9525<br>Cell: 054 7 231 170<br>Int-IS: x972 2 930 9525<br>US 914 432 3108<br></div></div></div>
</div>