[ncl-install] ncl error: loading scripts
Scott Rabenhorst
scott.rabenhorst.ctr at nrl.navy.mil
Thu Jan 21 10:04:55 MST 2016
Dear NCL developer,
I have installed the following NCL packages on my Debian 8.2 machine
through the apt-get interface:
dpkg -l | grep -i ncar
ii libncarg-bin 6.2.0-3+b1 amd64 NCAR command-language
library - development tools
ii libncarg-data 6.2.0-3 all NCAR command-language
library - Data
ii libncarg-dev:amd64 6.2.0-3+b1 amd64 Development files for the
NCAR command language library
ii libncarg0:amd64 6.2.0-3+b1 amd64 NCAR command-language library
ii ncl-ncarg 6.2.0-3+b1 amd64 NCAR Command Language and
NCAR graphics
which places package files in the following directories:
/usr/bin/* ...
/usr/include/* ...
/usr/lib/x86_64-linux-gnu/* ...
/usr/share/doc/* ...
/usr/share/man/* ...
/usr/share/ncarg/* ...
and therefore I set environment variables in the ~/.bashrc file accordingly:
export NCARG_ROOT=/usr
export NCARG_MAN=$NCARG_ROOT/share/man
export NCARG_INCLUDE=$NCARG_ROOT/include
export NCARG_LIB=$NCARG_ROOT/lib
export NCARG_NCARG=$NCARG_ROOT/share/ncarg
export NCARG_COLORMAPS=$NCARG_NCARG/colormaps
Since these packages do not conform to the traditional directory
structure, I added the following symbolic link to point ncl to the ncarg
directory:
sudo ln -s /usr/share/ncarg /usr/lib/ncarg
ls -lh /usr/lib/ncar*
lrwxrwxrwx 1 root root 17 Jan 14 14:11 /usr/lib/ncarg -> /usr/share/ncarg/
However, I am perplexed by a bizarre error when loading scripts as shown
below:
ncl
Copyright (C) 1995-2014 - All Rights Reserved
University Corporation for Atmospheric Research
NCAR Command Language Version 6.2.0
The use of this software is governed by a License Agreement.
See http://www.ncl.ucar.edu/ for more details.
ncl 0> load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
fatal:Could not open ($NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl)
fatal:error at line 0
ncl 1> load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
However, if I repeat the same load command again, it works the second
time. This is quite problematic when running a batch of scripts with
multiple ncl instances (e.g. ncl -nQ SomeScriptThatCallsLoad.ncl) which
all abort with an error after the first load command. Hardcoding the
path appears to solve the immediate problem, but eventually results in
errors because of other scripts that call load with environment variables:
ncl
Copyright (C) 1995-2014 - All Rights Reserved
University Corporation for Atmospheric Research
NCAR Command Language Version 6.2.0
The use of this software is governed by a License Agreement.
See http://www.ncl.ucar.edu/ for more details.
ncl 0> load "/usr/share/ncarg/nclscripts/wrf/WRFUserARW.ncl"
fatal:Could not open ($NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl)
fatal:error at line 1 in file /usr/share/ncarg/nclscripts/wrf/WRFUserARW.ncl
Although ncl errors state the above scripts cannot be opened,
file/directory permissions show everyone has read/execute access.
Furthermore, these files are verified to exist when using the exact same
environment variable syntax on the shell command line:
ls -lh $NCARG_ROOT/lib/ncarg/nclscripts/wrf/*.ncl
-rwxr-xr-x 1 root root 9.7K Oct 10 2014
/usr/lib/ncarg/nclscripts/wrf/WRF_contributed.ncl
-rwxr-xr-x 1 root root 156K Oct 10 2014
/usr/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl
Could you please provide some suggestions regarding what may be going
wrong? Any help would be greatly appreciated.
Thanks!
Scott
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-install/attachments/20160121/573eecd4/attachment.html
More information about the ncl-install
mailing list