[ncl-talk] running NCL on a cron invokes wrong NCL version
Diana Stovern - NOAA Affiliate
diana.stovern at noaa.gov
Wed Jul 22 16:21:29 MDT 2020
Hello all,
Has anyone ever had issues running NCL on a cron via a python script? For
example, I wrote a python script that calls a bunch of NCL scripts using
the os.system command (i.e., os.system('ncl ' + regrid_script.ncl). I
define the NCARG_ROOT environment in the python script like the help forums
on this topic suggest with the following code:
os.environ["NCARG_ROOT"]='/usr/local/ncl-6.6.2'
Running the python script from the terminal always invokes NCL 6.6.2.
However, the NCL version that is invoked from the cron is a really old
version (6.3.0). I recently had 6.6.2 installed so I could take advantage
of the ESMF regridding routines.
My question is, does anyone know why the cron invokes the old version of
NCL and not the new version specified in the python script? This is really
causing problems because the python script tries to run the NCL scripts
with version 6.3.0, but looking in directories associated with 6.6.2, thus
errors arise and the script crashes.
Has anyone experienced this issue before and have a quick fix? How do I
get the cron to invoke 6.6.2 instead of 6.3.0?
Any advice is greatly appreciated!
- Diana Stovern
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20200722/0d57829b/attachment.html>
More information about the ncl-talk
mailing list