[ncl-install] ncl error: loading scripts

Mary Haley haley at ucar.edu
Thu Jan 21 11:59:00 MST 2016


Hi Scott,

There are a few issues that I'll try to explain.

[1] The "apt-get" version of NCL is not supported by us, and is provided by
an outside party.  We are appreciative that this was done, but the files
are put in slightly different locations that what we recommend, which can
cause problems as you've seen.  Normally, you should only have to set
NCARG_ROOT, and not all the other NCARG_XXXXX variables that you are
setting.

[2] I think by creating the "/usr/lib/ncarg" link, you probably don't even
need to set anything but NCARG_ROOT, because ncl will look in
$NCARG_ROOT/lib/ncarg for all of these files by default (/usr/lib/ncarg),
which you appear to have.

Please try unsetting everything but NCARG_ROOT, and let ncl-install know if
you continue to have problems.

[3] This is an older version of NCL.  The current version is 6.3.0, which
doesn't require that you load most of these scripts.  In V6.3.0, these
scripts are loaded automatically: gsn_code.ncl, gsn_csm.ncl
contributed.ncl, and WRFUserARW.ncl

Hence, if you upgrade you may not have these issues.  You could choose to
go this route, but I don't think there's an "apt-get" version.  It's pretty
easy to install NCL from a precompiled binary, which I can help you with.
In the future, we hope to get NCL under "conda" (a package manager used by
many beefy python packages).

--Mary

On Thu, Jan 21, 2016 at 10:04 AM, Scott Rabenhorst <
scott.rabenhorst.ctr at nrl.navy.mil> wrote:

> 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
>
> _______________________________________________
> ncl-install mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-install
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-install/attachments/20160121/dc79ba78/attachment-0001.html 


More information about the ncl-install mailing list