[pyngl-talk] Importing PyNio modifies shell environment. Is it on purpose ?

Stéphane Sénési senesi at posteo.net
Mon Apr 20 10:38:43 MDT 2020


Dear all,

Working in a notebook environment, I happened to write

    /import Nio//
    //! ncl some_ncl_script.ncl//
    /

where the second line actually launches Ncl as a subprocess in the 
notebook environment

I got that error, which does not happen when I launch the Ncl command 
without importing Nio :

	warning:Unable to load System Resource File /.....blabla/lib/python2.7/site-packages/PyNIO/ncarg/sysresfile

I discovered that this is due to the facts that :

 1. importing Nio does set environment variable NCARG_NCARG to a value
    consistent with the path in the error message,
 2. Ncl, in function ncargpath(), uses this environment variable, if
    set, rather than variable NCARG_ROOT
 3. the path for PyNio material does not include all material needed by Ncl

This is not fully user-friendly (and it actually took me a while to 
understand what was happening).

Is there a strong reason for modifying the environment ?

Best regards

Stéphane Sénési
(currently working for IPCC/AR6/WGI - chapter 8 on hydrology as chapter 
scientist)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/pyngl-talk/attachments/20200420/fb37f572/attachment.html>


More information about the pyngl-talk mailing list