Hello,
I'm running NCL 5.2.1 (opendap enabled) on a machine, but keep getting
segmenation faults/core dumps when trying to use either the NCL
calendar functions or some of the string parsing functions. For
example, I ran the code from the ut_calendar documenation page:
----------------------------------------------------------------------------------------------------------------------
begin
;
; Array to hold month abbreviations. Don't store anything in index
; '0' (i.e. let index 1=Jan, 2=Feb, ..., index 12=Dec).
;
month_abbr = (/"","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep", \
"Oct","Nov","Dec"/)
;
; Time values and units.
;
time = (/17522904, 17522928, 17522952, 17522976, 17523000/)
time@units = "hours since 1-1-1 00:00:0.0"
;
; Convert to UTC time.
;
utc_date = ut_calendar(time, 0)
;
; Store return information into more meaningful variables.
;
year = floattointeger(utc_date(:,0)) ; Convert to integer for
month = floattointeger(utc_date(:,1)) ; use sprinti
day = floattointeger(utc_date(:,2))
hour = floattointeger(utc_date(:,3))
minute = floattointeger(utc_date(:,4))
second = utc_date(:,5)
;
; Write out strings in the format "hhZ dd mmm yyyy".
;
date_str = sprinti("%0.2iZ ", hour) + sprinti("%0.2i ", day) + \
month_abbr(month) + " " + sprinti("%0.4i", year)
print(date_str)
end
----------------------------------------------------------------------------------------------------------------------
and get the following when I run it:
Press ENTER or type command to continue
Copyright (C) 1995-2010 - All Rights Reserved
University Corporation for Atmospheric Research
NCAR Command Language Version 5.2.1
The use of this software is governed by a License Agreement.
See http://www.ncl.ucar.edu/ for more details.
/bin/bash: line 1: 24760 Segmentation fault (core dumped) ncl <
./formatTimestamps.ncl
shell returned 139
Here's the info on the machine I'm running this on:
Linux kerfoot-lin.marine.rutgers.edu 2.6.35.10-74.fc14.x86_64 #1 SMP
Thu Dec 23 16:04:50 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux
Any insight/suggestions?
Thanks in advance.
John
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Mar 3 07:10:56 2011
This archive was generated by hypermail 2.1.8 : Thu Mar 03 2011 - 10:00:25 MST