[ncl-talk] "graphic" array cannot store many figures?

music piano musicpianoljy at gmail.com
Fri Nov 10 12:17:52 MST 2017


Hi, everyone

I produced many figures and passed to panel plot. I define a "graphic"
array to store my figures.

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.

After all the figures were stored in plot_1_3d array. the panel plot
plot them. *This code works fine* when plot_1_3d is a smaller array. For
instance, ntimes=4, num_var=2, nlevels=18.

 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.

I will be very appreciated if anybody can help me.

My scripts:
plot_1_3d=new((/ntimes,num_var,nlevels/),"graphic")

do it=0, ntimes-1
    do var_id=num_var-1
              do level=nlevels-1
                         ........................... ; I skip my code here
                        plot_1_3d(it,var_id,level) =
contour_data_1_3d(var_id,level)
               end do
     end do
end do

do it=0, ntimes-1
    do var_id=num_var-1
              do level=nlevels-1
                      gsn_panel(wks,(/plot_1_3d(it,var_id,k)/),(/1,1/),resP
    )
                       frame(wks)
      end do
     end do
end do
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20171110/d88a4a1d/attachment.html>


More information about the ncl-talk mailing list