Re: loading contributed.ncl in a where document fails with ncl 6.2.0

From: Wei Huang <huangwei_at_nyahnyahspammersnyahnyah>
Date: Thu Apr 03 2014 - 10:51:08 MDT

Keith,

There are two things here.

1. In 6.2.0, you do not need to load contributed.ncl yourself again, as NCL has loaded it already.

2. You may want to change this script to:

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
begin
end

Wei
On Apr 3, 2014, at 10:33 AM, Keith Lindsay <klindsay@ucar.edu> wrote:

> Hi,
>
> When I run
>
> ncl << EOF
> begin
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
> end
> EOF
>
> with ncl 6.1.2, it runs fine. The output is usual ncl header info:
>
> Copyright (C) 1995-2013 - All Rights Reserved
> University Corporation for Atmospheric Research
> NCAR Command Language Version 6.1.2
> The use of this software is governed by a License Agreement.
> See http://www.ncl.ucar.edu/ for more details.
>
> When I run it with ncl 6.2.0, I get hundred of fatal errors. I've
> cut-n-pasted the first few below.
> I am able to load contributed.ncl when I run ncl interactively.
> I am also able to load my own ncl scripts from within a where document.
> The problem seems to be unique to loading contributed.ncl within a where
> document.
> Could this be looked into please?
>
> Thanks, Keith
>
> fatal:syntax error: line 92 in file
> /glade/apps/opt/ncl/6.2.0/gnu/4.7.2/lib/ncarg/nclscripts/csm/contributed.ncl
> before or near size_array
> function size_array
> ------------------^
>
> ^Mfatal:Function identifier is defined
> ^Mfatal:syntax error: line 100 in file
> /glade/apps/opt/ncl/6.2.0/gnu/4.7.2/lib/ncarg/nclscripts/csm/contributed.ncl
> before or near isatt_LongName
> function isatt_LongName
> ----------------------^
>
> ^Mfatal:Function identifier is defined
> ^Mfatal:syntax error: line 101 in file
> /glade/apps/opt/ncl/6.2.0/gnu/4.7.2/lib/ncarg/nclscripts/csm/contributed.ncl
> before or near local
> local
> ----^
>
> ^Mfatal:error in statement
> ^Mfatal:syntax error: line 121 in file
> /glade/apps/opt/ncl/6.2.0/gnu/4.7.2/lib/ncarg/nclscripts/csm/contributed.ncl
> before or near getLongName
> function getLongName
> -------------------^
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Apr 3 10:51:24 2014

This archive was generated by hypermail 2.1.8 : Thu Apr 03 2014 - 13:36:27 MDT