[ncl-talk] Possible bug in NCL 6.4.0

Mary Haley haley at ucar.edu
Fri Oct 20 13:45:18 MDT 2017


Hi Guido,

What's likely happening is that the /home/mpim/m300382 directory has some
files in it that are not valid NCL color maps, and the "utilities.ncl"
script was not expecting this.

One work-around is to create a clean directory that only contains valid NCL
color maps, and put your sat_ir.rgb and any other color map files in this
directory, but no other files.  Then, you can update your NCARG_COLORMAPS
environment variable to point to this new directory.

The second work-around is to take the attached "utilities_fix.ncl" script,
and load it at the top of your script, after other "load" commands:

load "./utilities_fix.ncl"

This script fixes an internal function that retrieves color map names, so
that it ignores anything that is not named xxxxx.yyy. This function is used
in several places where color is involved.  Some of our resources, like
"cnFillPalette" allow different ways to specify color (via a list of named
colors, a single color map name, a list of color indexes, RGB/A array,
etc), and these internal functions test the validity of whatever you are
giving it.

In your case, I believe it is this line:

 res at gsnXYBelowFillColors = "red"

that caused the internal function to be called, because I think this
particular resource allows you to input a color map name (don't quote me on
this).

--Mary




On Fri, Oct 20, 2017 at 11:09 AM, Guido Cioni <guidocioni at gmail.com> wrote:

> As a matter of fact I do! That was needed to include one of the colormaps
> that I created (sat_ir.rgb)
>
> export NCARG_COLORMAPS=/home/mpim/m300382:$NCARG_ROOT/lib/ncarg/colormaps
>
> When commenting out and re-logging in I don't have that problem anymore!
> So that was the reason.
>
> Why is it parsing the color table names when using a XY plot? I actually
> did a lot of contour plot with color tables without problems, that's the
> only one that gave me the error :)
>
>
> On 20. Oct 2017, at 17:55, Mary Haley <haley at ucar.edu> wrote:
>
> Guido and Rick,
>
> I took a quick look at this because I was afraid it was some code I was
> responsible for (it is).
>
> It looks like the error is coming from trying to parse color map names
> (although without digging further, I'm not sure why it's doing this).
>
> By any chance, do you have the NCARG_COLORMAPS environment variable set?
> If so, you might try unsetting it just to see if the script runs.
>
> It runs fine for me with NCL V6.3.0, V6.4.0, and our current development
> version.
>
> If you do have NCARG_COLORMAPS set, can you let me know what it's set to,
> so I can see if there's something we need to fix with regard to this?
>
> Thanks,
>
> --Mary
>
>
> On Fri, Oct 20, 2017 at 6:56 AM, Guido Cioni <guidocioni at gmail.com> wrote:
>
>> Thanks Rick,
>> I tried on both on the cluster and on my local machine (osx) and had the
>> same error. I have to say they are both 6.4*.0.*
>> *Cheers*
>>
>> On 20. Oct 2017, at 14:44, Rick Brownrigg <brownrig at ucar.edu> wrote:
>>
>> Hi,
>>
>> The test script runs just fine, without warning/error, with my
>> development version of NCL.  I'll give it a try with the 6.4.0 snapshot
>> when I get into the office.
>>
>> FWIW...
>> Rick
>>
>> On Fri, Oct 20, 2017 at 4:55 AM, Marston Johnston <shejo284 at gmail.com>
>> wrote:
>>
>>> There is still a lot of debugging you can do yourself to help with this
>>> situation. It is a very step to assume at this point that there is a bug in
>>> NCL.
>>>
>>> The error code tells you where the problem lies, and you can examine the
>>> data for both NCL versions to see what has changed, or at least to see what
>>> the data looks like.
>>>
>>> This is the golden rule: know your data.
>>>
>>>
>>>
>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>>
>>> Marston S. Ward, PhD
>>>
>>> Department of Earth Sciences
>>>
>>> University of Gothenburg, Sweden
>>>
>>> Email: marston.johnston at gu.se
>>>
>>> SkypeID: marston.johnston
>>>
>>> Phone: +46-31-7864901 <+46%2031%20786%2049%2001>
>>>
>>> Only the fruitful thing is true!
>>>
>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>>
>>>
>>>
>>>
>>>
>>> *From: *ncl-talk <ncl-talk-bounces at ucar.edu> on behalf of Guido Cioni <
>>> guidocioni at gmail.com>
>>> *Date: *Friday, 20 October 2017 at 12:47
>>> *To: *ncl-talk <ncl-talk at ucar.edu>
>>> *Subject: *[ncl-talk] Possible bug in NCL 6.4.0
>>>
>>>
>>>
>>> Hi,
>>>
>>> I'm not sure what is happening here. Running the same script on 6.3.0
>>> works just fine while on 6.4.0 it produces an error inside the NCL code,
>>> which I'm not able to debug (as I don't know the original code that much).
>>> Maybe Mary or Dennis can take a look.
>>>
>>>
>>>
>>> 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 /sw/rhel6-x64/ncl-6.4.0-gccsys/lib/ncarg/nclscripts/utilitie
>>> s.ncl
>>>
>>>
>>>
>>> fatal:["Execute.c":8640]:Execute: Error occurred at or near line 1275
>>> in file /sw/rhel6-x64/ncl-6.4.0-gccsys/lib/ncarg/nclscripts/utilitie
>>> s.ncl
>>>
>>>
>>>
>>> fatal:["Execute.c":8640]:Execute: Error occurred at or near line 1314
>>> in file /sw/rhel6-x64/ncl-6.4.0-gccsys/lib/ncarg/nclscripts/utilitie
>>> s.ncl
>>>
>>>
>>>
>>> fatal:["Execute.c":8640]:Execute: Error occurred at or near line 1721
>>> in file /sw/rhel6-x64/ncl-6.4.0-gccsys/lib/ncarg/nclscripts/utilitie
>>> s.ncl
>>>
>>>
>>>
>>> fatal:["Execute.c":8640]:Execute: Error occurred at or near line 5457
>>> in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl
>>>
>>>
>>>
>>> fatal:["Execute.c":8640]:Execute: Error occurred at or near line 6079
>>> in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl
>>>
>>>
>>>
>>> fatal:["Execute.c":8640]:Execute: Error occurred at or near line 158 in
>>> file statistics.ncl
>>>
>>>
>>>
>>> Since I can switch easily from 6.4. to 6.3. on the cluster that's not a
>>> big issue for now but I just thought to bring it to the attention. I'm
>>> attaching a test code and files.
>>>
>>>
>>>
>>> Cheers
>>>
>>>
>>> Guido Cioni
>>>
>>> http://guidocioni.altervista.org
>>>
>>>
>>>
>>> _______________________________________________ ncl-talk mailing list
>>> ncl-talk at ucar.edu List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>
>>> _______________________________________________
>>> ncl-talk mailing list
>>> ncl-talk at ucar.edu
>>> List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>
>>>
>>
>>
>> Guido Cioni
>> http://guidocioni.altervista.org
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>
>
> Guido Cioni
> http://guidocioni.altervista.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20171020/77fb31bf/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: utilities_fix.ncl
Type: application/octet-stream
Size: 80747 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20171020/77fb31bf/attachment.obj>


More information about the ncl-talk mailing list