[ncl-talk] Reusing the interpreter after Ngl.end()

Karin Meier-Fleischer meier-fleischer at dkrz.de
Tue Oct 22 08:32:21 MDT 2019


Hi Gabriel,

Ngl.end() terminates all. See 
http://www.pyngl.ucar.edu/Functions/Ngl.end.shtml:

This function terminates a PyNGL script. It flushes all buffers and 
closes all internal and graphical (PS, PDF, and NCGM) files. This 
function should only be called once within a PyNGL script, right before 
you exit.

If you want just to close the wks you can use the *Ngl.delete_wks* 
function, see http://www.pyngl.ucar.edu/Functions/Ngl.delete_wks.shtml.
Afterwards you can define a new wks and use it in the same notebook.

By the way, you send this request to the wrong mailing list. Here, we 
answer NCL questions. Send PyNGL requests to pyngl-talk, see
http://www.pyngl.ucar.edu/User_forum/

-Karin



Am 08.10.19 um 03:04 schrieb Gabriel Abrahão via ncl-talk:
> Hello all,
>
> I generally use python on a jupyter notebook in Atom. In that context, 
> it would be useful to rerun just the plotting part of a script when 
> iterating with resources and such. However, after calling Ngl.end() 
> something is flushed/closed and you can't open a workspace again.
>
> Is there something one can do after Ngl.end() to make the Ngl stuff 
> work again, short of restarting the kernel/interpreter and losing 
> everything else the script did?
>
> Thank you,
>
> -- 
> Gabriel Medeiros Abrahão
> Grupo de Pesquisas em Interação Atmosfera-Biosfera - DEA/UFV
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20191022/5c409432/attachment.html>


More information about the ncl-talk mailing list