<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Dear NCL developer,<br>
<br>
I have installed the following NCL packages on my Debian 8.2 machine
through the apt-get interface:<br>
<font color="#3333ff"><tt>dpkg -l | grep -i ncar</tt><tt><br>
</tt><tt>ii libncarg-bin 6.2.0-3+b1 amd64 NCAR
command-language library - development tools</tt><tt><br>
</tt><tt>ii libncarg-data 6.2.0-3 all NCAR
command-language library - Data</tt><tt><br>
</tt><tt>ii libncarg-dev:amd64 6.2.0-3+b1 amd64 Development
files for the NCAR command language library</tt><tt><br>
</tt><tt>ii libncarg0:amd64 6.2.0-3+b1 amd64 NCAR
command-language library</tt><tt><br>
</tt><tt>ii ncl-ncarg 6.2.0-3+b1 amd64 NCAR
Command Language and NCAR graphics</tt></font><br>
<br>
which places package files in the following directories:<br>
<font color="#3333ff"><tt>/usr/bin/* ...</tt><tt><br>
</tt><tt>/usr/include/* ...</tt><tt><br>
</tt><tt>/usr/lib/x86_64-linux-gnu/* ...</tt><tt><br>
</tt><tt>/usr/share/doc/* ...</tt><tt><br>
</tt><tt>/usr/share/man/* ...</tt><tt><br>
</tt><tt>/usr/share/ncarg/* ...</tt></font><br>
<br>
and therefore I set environment variables in the ~/.bashrc file
accordingly:<br>
<font color="#3333ff"><tt>export NCARG_ROOT=/usr</tt><tt><br>
</tt><tt>export NCARG_MAN=$NCARG_ROOT/share/man</tt><tt><br>
</tt><tt>export NCARG_INCLUDE=$NCARG_ROOT/include</tt><tt><br>
</tt><tt>export NCARG_LIB=$NCARG_ROOT/lib</tt><tt><br>
</tt><tt>export NCARG_NCARG=$NCARG_ROOT/share/ncarg</tt><tt><br>
</tt><tt>export NCARG_COLORMAPS=$NCARG_NCARG/colormaps</tt></font><br>
<br>
Since these packages do not conform to the traditional directory
structure, I added the following symbolic link to point ncl to the
ncarg directory:<br>
<font color="#3333ff"><tt>sudo ln -s /usr/share/ncarg /usr/lib/ncarg</tt><tt><br>
</tt><tt>ls -lh /usr/lib/ncar*</tt><tt><br>
</tt><tt>lrwxrwxrwx 1 root root 17 Jan 14 14:11 /usr/lib/ncarg
-> /usr/share/ncarg/</tt></font><br>
<br>
However, I am perplexed by a bizarre error when loading scripts as
shown below:<br>
<font color="#ff0000"><tt>ncl<br>
Copyright (C) 1995-2014 - All Rights Reserved<br>
University Corporation for Atmospheric Research<br>
NCAR Command Language Version 6.2.0<br>
The use of this software is governed by a License Agreement.<br>
See <a class="moz-txt-link-freetext"
href="http://www.ncl.ucar.edu/">http://www.ncl.ucar.edu/</a>
for more details.<br>
ncl 0> load
"$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"<br>
fatal:Could not open
($NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl)<br>
fatal:error at line 0<br>
ncl 1> load
"$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl" <br>
</tt></font><br>
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:<br>
<font color="#ff0000"><tt>ncl</tt><tt><br>
</tt><tt> Copyright (C) 1995-2014 - All Rights Reserved</tt><tt><br>
</tt><tt> University Corporation for Atmospheric Research</tt><tt><br>
</tt><tt> NCAR Command Language Version 6.2.0</tt><tt><br>
</tt><tt> The use of this software is governed by a License
Agreement.</tt><tt><br>
</tt><tt> See <a class="moz-txt-link-freetext"
href="http://www.ncl.ucar.edu/">http://www.ncl.ucar.edu/</a>
for more details.</tt><tt><br>
</tt><tt>ncl 0> load
"/usr/share/ncarg/nclscripts/wrf/WRFUserARW.ncl"</tt><tt><br>
</tt><tt>fatal:Could not open
($NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl)</tt><tt><br>
</tt><tt>fatal:error at line 1 in file
/usr/share/ncarg/nclscripts/wrf/WRFUserARW.ncl</tt></font><font
color="#3333ff"><tt><br>
<br>
</tt></font>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:<br>
<font color="#3333ff"><tt>ls -lh
$NCARG_ROOT/lib/ncarg/nclscripts/wrf/*.ncl</tt><tt><br>
</tt><tt>-rwxr-xr-x 1 root root 9.7K Oct 10 2014
/usr/lib/ncarg/nclscripts/wrf/WRF_contributed.ncl</tt><tt><br>
</tt><tt>-rwxr-xr-x 1 root root 156K Oct 10 2014
/usr/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl</tt></font><br>
<br>
Could you please provide some suggestions regarding what may be
going wrong? Any help would be greatly appreciated.<br>
<br>
Thanks!<br>
Scott<br>
</body>
</html>