<div dir="ltr">Hi Mauro,<div>I think you need to move your plots2 array creation and gsn_open_wks call above and outside your do loop, like this:</div><div><br></div><div>plots2 = new(4,graphic)<br>type ="x11"<br>wks = gsn_open_wks(type,"test") ; send graphics to PNG file<br>;B)START --------- LOOP OVER THE STATIONS ----------------------<br>      do ft=0,nfiles-1<br></div><div><br></div><div>If those first three lines are within the do loop, then the plots2 array and the workstation get reinitizalied at each do loop interaction.</div><div>Hope that helps!</div><div>Adam</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 11, 2022 at 12:25 PM Mauro Morichetti via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu">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">Hi all,<br>
<br>
I have problem when I set a new variable (plots).<br>
<br>
Even if I declare the new variable outside the loop, every time the plots delete itself.<br>
<br>
Maybe it is a really dummy problem, but I can not find the solution.<br>
<br>
Attached the ncl script and files useful to run it. <br>
<br>
Thanks<br>
<br>
Mauro<br>
<br>
---------<br>
<br>
Ph.D. Mauro Morichetti<br>
Department of Industrial Engineering and Mathematical Science<br>
Marche Polytechnic University, Ancona, Italy<br>
<a href="mailto:m.morichetti@pm.univpm.it" target="_blank">m.morichetti@pm.univpm.it</a><br>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div><span><font color="#888888">Adam Phillips <br></font></span></div><span><font color="#888888">Associate Scientist,  </font></span><span><font color="#888888">Climate and Global Dynamics Laboratory, NCAR<br></font></span></div></div><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank">www.cgd.ucar.edu/staff/asphilli/</a>   </font></span><span><font color="#888888">303-497-1726 </font></span></div><span><font color="#888888"></font></span><div><div><span><font color="#888888"><br></font></span><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli" target="_blank"></a></font></span></div></div></div></div></div></div></div></div></div></div></div>