<div dir="ltr">Dave:<div><br></div><div>The problem is that a new variable cannot be created more than once in a loop over different files (where each file has a different number of elements within).</div><div><br></div><div>The simple solution is to delete (varaible_name) after each loop.</div><div><br></div><div>Thank you for your suggestions,</div><div><br></div><div>Barry</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 13, 2021 at 10:14 PM Dave Allured - NOAA Affiliate <<a href="mailto:dave.allured@noaa.gov">dave.allured@noaa.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Barry, no, you can not create new memory variables in a loop.  You CAN create new file variables in a loop.  But I sincerely doubt that is what you want to do.</div><div><br></div><div>I recommend using the reassignment operator ":=".  If that gives you a different error, then debug that specifically.  If that is still a problem, please show us what you mean by "another error".  HTH.</div><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 13, 2021 at 1:04 PM Barry Lynn via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello:<div><br></div><div>I define new variables:</div><div><br></div><div>  height_gmax  = new(ng_lines,float)   ; Create array to hold marker objects<br>  height_gmin  = new(ng_lines,float)   ; Create array to hold marker objects<br>  </div><div>The problem is that the second time around there is an error that their size has changed.  But, if I add a colon (:) to the definition, I will get another error.</div><div><br></div><div>Is there a way to create a new variable every time step?</div><div><br></div><div>Thanks<br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><span style="color:rgb(34,34,34)">Guest Editor of Special Issue “Extreme Hydroclimatic Events and Prediction”</span><br style="color:rgb(34,34,34)"><span style="color:rgb(34,34,34)">LINK:</span><br style="color:rgb(34,34,34)"><a href="https://www.mdpi.com/journal/water/special_issues/Extreme_Hydroclimatic_Events" rel="noreferrer" style="color:rgb(17,85,204)" target="_blank">https://www.mdpi.com/journal/water/special_issues/Extreme_Hydroclimatic_Events</a><br></div><div dir="ltr"><br></div><div dir="ltr">Barry H. Lynn, Ph.D<div><div>Senior Associate Scientist, 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</div></div></div></div></div></div></div></blockquote></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><span style="color:rgb(34,34,34)">Guest Editor of Special Issue “Extreme Hydroclimatic Events and Prediction”</span><br style="color:rgb(34,34,34)"><span style="color:rgb(34,34,34)">LINK:</span><br style="color:rgb(34,34,34)"><a href="https://www.mdpi.com/journal/water/special_issues/Extreme_Hydroclimatic_Events" rel="noreferrer" style="color:rgb(17,85,204)" target="_blank">https://www.mdpi.com/journal/water/special_issues/Extreme_Hydroclimatic_Events</a><br></div><div dir="ltr"><br></div><div dir="ltr">Barry H. Lynn, Ph.D<div><div>Senior Associate Scientist, 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><br></div></div></div></div></div>