[ncl-talk] (no subject)

Kevin Hallock hallock at ucar.edu
Thu Apr 26 13:01:32 MDT 2018


Hi Fuchang,

I found a previous discussion about this issue in an old ncl-talk thread: https://www.ncl.ucar.edu/Support/talk_archives/2010/2040.html <https://www.ncl.ucar.edu/Support/talk_archives/2010/2040.html>

Please try downloading the files linked on that page and put them in the same directory as your NCL script, and then try running your script again.

I will consult with the other NCL developers to determine if find_substring.ncl was intended to be included with NCL or not.

Thanks,
Kevin

> On Apr 26, 2018, at 12:33 PM, fc w <wfc1102 at gmail.com> wrote:
> 
> Hey,
> 
> Here is a bug I encounter today.
> 
> Code:
> 
> load "$NCARG_ROOT/lib/ncarg/nclscripts/contrib/calendar_decode2.ncl"
> time=675514.7083333334
> time at calendar="proleptic_gregorian"
> time at units="days since 0001-01-01"
> r1=calendar_decode2(time,-5)
> 
> 
> Fatal error:
> 
>  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/ <http://www.ncl.ucar.edu/> for more details.
> fatal:Undefined identifier: (find_substring) is undefined, can't continue
> fatal:["Execute.c":8640]:Execute: Error occurred at or near line 390 in file $NCARG_ROOT/lib/ncarg/nclscripts/contrib/calendar_decode2.ncl
> 
> fatal:["Execute.c":8640]:Execute: Error occurred at or near line 609 in file $NCARG_ROOT/lib/ncarg/nclscripts/contrib/calendar_decode2.ncl
> 
> fatal:["Execute.c":8640]:Execute: Error occurred at or near line 6 in file calendar_decode2.ncl
> 
> 
> The bug is that when time calendar is  proleptic_gregorian,   calendar_decode2.ncl  will try to call  find_substring.ncl which is missing. Appreciate it if you nice people could you fix it.
> 
> 
> calendar_decode2.ncl
> 178 ; Custom library dependencies:
> 179 ;
> 180 ;   find_substring.ncl
> 181 ;   substring.ncl
> 
> 382    units_lc = str_lower (tcopy at units)       ; make case insensitive
> 383    sp1 = find_substring (units_lc, " since ")   ; find space before "since"
> 384    remainder = substring (units_lc, sp1+7, 0)   ; find dash following "since "
> 385    dash = find_substring (remainder, "-")
> 
> Warm Regards,
> Fuchang
> 
> _______________________________________________
> 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/20180426/5199d399/attachment.html>


More information about the ncl-talk mailing list