[ncl-talk] Problem with new plots variable

Adam Phillips asphilli at ucar.edu
Mon Apr 11 12:42:35 MDT 2022


Hi Mauro,
I think you need to move your plots2 array creation and gsn_open_wks call
above and outside your do loop, like this:

plots2 = new(4,graphic)
type ="x11"
wks = gsn_open_wks(type,"test") ; send graphics to PNG file
;B)START --------- LOOP OVER THE STATIONS ----------------------
      do ft=0,nfiles-1

If those first three lines are within the do loop, then the plots2 array
and the workstation get reinitizalied at each do loop interaction.
Hope that helps!
Adam

On Mon, Apr 11, 2022 at 12:25 PM Mauro Morichetti via ncl-talk <
ncl-talk at mailman.ucar.edu> wrote:

> Hi all,
>
> I have problem when I set a new variable (plots).
>
> Even if I declare the new variable outside the loop, every time the plots
> delete itself.
>
> Maybe it is a really dummy problem, but I can not find the solution.
>
> Attached the ncl script and files useful to run it.
>
> Thanks
>
> Mauro
>
> ---------
>
> Ph.D. Mauro Morichetti
> Department of Industrial Engineering and Mathematical Science
> Marche Polytechnic University, Ancona, Italy
> m.morichetti at pm.univpm.it
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at mailman.ucar.edu
> List instructions, subscriber options, unsubscribe:
> https://mailman.ucar.edu/mailman/listinfo/ncl-talk



-- 
Adam Phillips
Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR
www.cgd.ucar.edu/staff/asphilli/   303-497-1726

<http://www.cgd.ucar.edu/staff/asphilli>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20220411/98f3d8d7/attachment.html>


More information about the ncl-talk mailing list