<div dir="ltr">Hi:<div><br></div><div>I have this error (it didn't obviously show up with a Google search).</div><div><br></div><div>







<p class="gmail-p1"><span class="gmail-s1">fatal:Assign: Hits_1 is undefined, can not subscript an undefined variable</span></p>
<p class="gmail-p1"><span class="gmail-s1">fatal:["Execute.c":8575]:Execute: Error occurred at or near line 17 in file ./test.ncl</span></p><p class="gmail-p1"><span class="gmail-s1">Before defining Hits_1 as an array of size n_days, I needed the : to do the sum.  </span></p><p class="gmail-p1">However, it is the : that causes the error when the variable is defined as an array.</p><p class="gmail-p1">I am not sure why, but I thought I would make a note of it for those who encounter the same error message.</p><p class="gmail-p1"><span class="gmail-s1"><br></span></p><p class="gmail-p1"><span class="gmail-s1">begin</span></p><p class="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-converted-space">  </span></span><span class="gmail-s2">n_days</span><span class="gmail-s1"><span class="gmail-Apple-converted-space">  </span>= 3</span></p><p class="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-converted-space">  </span>dims = 9</span></p><p class="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-converted-space">  </span>Hits_1 = new(</span><span class="gmail-s2">n_days</span><span class="gmail-s1">,float)</span></p><p class="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-converted-space">  </span>printVarSummary(Hits_1)</span></p><p class="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-converted-space">  </span>Hits_4km = new(</span><span class="gmail-s2">n_days</span><span class="gmail-s1">,float)</span></p><p class="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-converted-space">  </span>Hits_1 = 0</span></p><p class="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-converted-space">  </span>Hits_4km = 0</span></p><p class="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-converted-space">  </span>do ii_day = 0,dims,1</span></p><p class="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-converted-space">   </span>if (ii_day .eq.0)then</span></p><p class="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-converted-space">   </span>i_day = tointeger(0)</span></p><p class="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-converted-space">   </span>else</span></p><p class="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-converted-space">   </span>i_day = (mod(ii_day,3))</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>printVarSummary(i_day)</span></p><p class="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-converted-space">   </span>print("i_day = " + i_day)</span></p><p class="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-converted-space">   <b> </b></span><b>Hits_1(i_day) := Hits_4km(i_day) + Hits_1(i_day) ; </b><i>remove colon if Hits_1 is defined as an array.</i></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">end</span></p><p class="gmail-p1"><span class="gmail-s1"><br></span></p><div><br></div>-- <br><div class="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></div>