<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">There might be some copy/paste errors in your email and I don't know about limits on graphic array sizes but a couple comments before someone from the NCL team can reply.  </div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif"><div class="gmail_default">Possibly most importantly, given that you're drawing individual plots, why not just plot in the first loop and drop the dependence on the array. <br></div><div><br></div><div>Plots have a bunch of attributes connected to them I feel like using the (/ /) notation will likely disrupt how NCL handles graphics and tickmarks etc.  Although if this works on smaller loops maybe it doesn't matter. <br></div><div><br></div></div><div class="gmail_default" style="font-family:verdana,sans-serif">Why use gsn_panel() for a single plot? Why not just draw() and frame(), and why frame() after gsn_panel() instead of just letting gsn_panel() do it. </div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Your 2nd nested loop uses level as the iterator but you use k as the index in the gsn_panel call.  (copy paste error or actual typo?)</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Finally, if you're processing 650GB of data, it's probably best to process the data and save the processed output to a netcdf. Then have a second script that plots the processed data. This way you can play with the plotting criteria without having to run through all of the data again.  </div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Or if you're just digging through raw data which based on the loops you may well be doing, panoply, ncview or similar would allow you to just visualise the data without having to process it at all. Are you sure you want 972 pages in a single pdf? </div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Good luck, </div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Alan</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 10, 2017 at 2:17 PM, music piano <span dir="ltr"><<a href="mailto:musicpianoljy@gmail.com" target="_blank">musicpianoljy@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 dir="ltr"><div>Hi, everyone </div><div><br></div><div>I produced many figures and passed to panel plot. I define a "graphic" array to store my figures. </div><div><br></div><div>The following script is the essential part to produce the figure. There are many files, the code read one file at a time. It loops over many times, many variables and many vertical levels. </div><div><br></div><div>After all the figures were stored in plot_1_3d array. the panel plot plot them. <b>This code works fine</b> when plot_1_3d is a smaller array. For instance, ntimes=4, num_var=2, nlevels=18.</div><div><br></div><div> However, when I loop over many files, such as ntimes=27, the program stops without any error message when it loops to it=12 or some other number. Each of the file the program read is 25GB, but I delete old variables in every time loop. The only array exists over the whole period is the "graphic" array. I am not sure it is the memory issue. I run this code on a supercomputer node, which has  32GB memory. The output pdf file for the figure is 43MB if ntimes=4, nlevels=18, num_var=2.</div><div><br></div><div>I will be very appreciated if anybody can help me. </div><div><br></div><div>My scripts: </div><font color="#ff0000">plot_1_3d=new((/ntimes,</font><span style="color:rgb(255,0,0)">num_var</span><font color="#ff0000"><wbr>,nlevels/),"graphic") <br></font><div><font color="#ff0000"><br></font></div><div><font color="#ff0000">do it=0, ntimes-1</font></div><div><font color="#ff0000">    do var_id=num_var-1</font></div><div><font color="#ff0000">              do level=nlevels-1</font></div><div><font color="#ff0000">                         ........................... ; I skip my code here</font></div><div><font color="#ff0000">                        plot_1_3d(it,var_id,level) = contour_data_1_3d(var_id,level<wbr>)<br></font></div><div><font color="#ff0000">               end do</font></div><div><font color="#ff0000">     end do</font></div><div><font color="#ff0000">end do</font></div><div><font color="#ff0000"><br></font></div><div><div><font color="#ff0000">do it=0, ntimes-1</font></div><div><font color="#ff0000">    do var_id=num_var-1</font></div><div><font color="#ff0000">              do level=nlevels-1</font></div></div><div><div><font color="#ff0000">                      gsn_panel(wks,(/plot_1_3d(it,v<wbr>ar_id,k)/),(/1,1/),resP     )     </font></div><div><font color="#ff0000">                       frame(wks)</font></div></div><div><div><font color="#ff0000">      end do</font></div><div><font color="#ff0000">     end do</font></div><div><font color="#ff0000">end do</font></div></div><div><font color="#ff0000"><br></font></div></div>
<br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>