[ncl-talk] (no subject)

fc w wfc1102 at gmail.com
Thu Apr 26 12:33:42 MDT 2018


 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/ 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180426/ceefab2b/attachment.html>


More information about the ncl-talk mailing list