[ncl-talk] histo_6.ncl produces an error
Mary Haley
haley at ucar.edu
Fri Nov 17 15:23:37 MST 2017
Hi Dan,
It's not a new thing. It's just a bug we had to fix.
In V6.4.0 I updated a function that traverses all the NCL colormaps, to
also include any colormaps pointed to by NCARG_COLORMAPS. This function was
incorrectly assuming that every file in NCARG_COLORMAPS would have the form
"xxxxx.yyy". The function was corrected to no longer make this assumption,
so hopefully you don't need to point to a "clean" directory.
The script that I attached to the previous email should fix this issue for
you, so you don't have to wait for 6.5.0.
--Mary
On Fri, Nov 17, 2017 at 1:06 PM, Daniel Adriaansen - NCAR <dadriaan at ucar.edu
> wrote:
> Hi Mary,
>
> You are correct about the NCARG_COLORMAPS environment variable. When I
> unset that variable I was able to run the example code.
>
> Is this something new in NCL 6.4.0 where the NCARG_COLORMAPS variable
> should point to a "clean" directory with only color map files? In previous
> versions we've been using this variable set to a directory with much more
> than just color map files inside.
>
> -Dan
>
> On Tue, Nov 7, 2017 at 7:16 AM, Mary Haley <haley at ucar.edu> wrote:
>
>> Hi Dan,
>>
>> I think this error is coming from having the environment variable
>> NCARG_COLORMAPS set to a directory that contains files without a "." in
>> them.
>>
>> Could you check if you have this environment variable set? From the UNIX
>> command line:
>>
>> printenv NCARG_COLORMAPS
>>
>> If you do have it set, then as a quick test, you can try unsetting it and
>> rerunning your script. You can also try temporarily moving any files that
>> don't have a "." in them.
>>
>> If you do have NCARG_COLORMAPS set, we recommend pointing this to a
>> "clean" directory that contains color map files only. If you have a bunch
>> of other non colormap files in the directory, NCL is going to try to read
>> every file because it doesn't know what is or isn't a potential color map.
>>
>> As a second test, you can try loading the attached script at the top of
>> your NCL script, *after* any other "load" commands you have:
>>
>> load "./get_colormap_names_fix.ncl"
>>
>> If neither of these fix the problem, please respond back to ncl-talk and
>> let us know. Also let us know if you had NCARG_COLORMAPS set.
>>
>> Thanks,
>>
>> --Mary
>>
>>
>> On Mon, Nov 6, 2017 at 3:03 PM, Daniel Adriaansen - NCAR <
>> dadriaan at ucar.edu> wrote:
>>
>>> Hello,
>>>
>>> I am attempting to run example 6 from the histogram example page
>>> (histo_6.ncl) but I am receiving errors:
>>>
>>> Copyright (C) 1995-2017 - All Rights Reserved
>>> University Corporation for Atmospheric Research
>>> NCAR Command Language Version 6.4.0
>>> The use of this software is governed by a License Agreement.
>>> See http://www.ncl.ucar.edu/ for more details.
>>> fatal:Subscript out of range, error in subscript #0
>>> fatal:An error occurred reading tmp_names
>>> fatal:["Execute.c":8640]:Execute: Error occurred at or near line 1251
>>> in file /usr/local/ncl_ncarg-6.4.0/lib/ncarg/nclscripts/utilities.ncl
>>>
>>> fatal:["Execute.c":8640]:Execute: Error occurred at or near line 1275
>>> in file /usr/local/ncl_ncarg-6.4.0/lib/ncarg/nclscripts/utilities.ncl
>>>
>>> fatal:["Execute.c":8640]:Execute: Error occurred at or near line 1314
>>> in file /usr/local/ncl_ncarg-6.4.0/lib/ncarg/nclscripts/utilities.ncl
>>>
>>> fatal:["Execute.c":8640]:Execute: Error occurred at or near line 1721
>>> in file /usr/local/ncl_ncarg-6.4.0/lib/ncarg/nclscripts/utilities.ncl
>>>
>>> fatal:["Execute.c":8640]:Execute: Error occurred at or near line 8240
>>> in file /usr/local/ncl_ncarg-6.4.0/lib/ncarg/nclscripts/csm/gsn_code.ncl
>>>
>>> fatal:["Execute.c":8640]:Execute: Error occurred at or near line 9282
>>> in file /usr/local/ncl_ncarg-6.4.0/lib/ncarg/nclscripts/csm/gsn_code.ncl
>>>
>>> fatal:["Execute.c":8640]:Execute: Error occurred at or near line 50 in
>>> file ncltest.ncl
>>>
>>> Line 50 in the example is the second call to gsn_histogram. Everything
>>> else references the nclscripts libraries. Could anyone offer any
>>> suggestions? Thanks!
>>>
>>> -Dan
>>>
>>> _______________________________________________
>>> ncl-talk mailing list
>>> ncl-talk at ucar.edu
>>> List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20171117/3cb1e3ef/attachment.html>
More information about the ncl-talk
mailing list