ut_inv_calendar and f[:] => Segfault

From: Sebastian Schubert <sebastian.schubert_at_nyahnyahspammersnyahnyah>
Date: Mon May 03 2010 - 11:32:39 MDT

Dear all,

I get a segmentation fault with the following script:

begin
  fils = systemfunc ("ls
/home/schubert/scratch/clm/output/2003_0.0625/out01/lffd200308*.nc")
  f = addfiles (fils, "r")
                                                                                       
; f =
addfile("/home/schubert/scratch/clm/output/2003_0.0625/out01/lffd2003082509.nc",
"r")
                                                                                       
  dalex = ut_inv_calendar(2003, 08, 1, 1,0,0,"seconds since 2003-08-01
00:00:00",0)
; dalex = 1
  print(dalex)
                                                                                       
  T = f[:]->T_S
; T = f->T_S
                                                                                       
  printVarSummary(T)
                                                                                       
end

The files that are read are 246 netcdf files. The output is:

IPLEX - schubert@login01:~/plots> ncl test.ncl
ncl: /usr/lib64/libssl.so.0.9.8: no version information available (required by
ncl)
ncl: /usr/lib64/libcrypto.so.0.9.8: no version information available (required
by ncl)
 Copyright (C) 1995-2010 - All Rights Reserved
 University Corporation for Atmospheric Research
 NCAR Command Language Version 5.2.0
 The use of this software is governed by a License Agreement.
 See http://www.ncl.ucar.edu/ for more details.

Variable: dalex
Type: double
Total Size: 8 bytes
            1 values
Number of Dimensions: 1
Dimensions and sizes: [1]
Coordinates:
Number Of Attributes: 2
  calendar : standard
  units : seconds since 2003-08-01 00:00:00
(0) 3600
Segmentation fault

No segfault when not getting T variable. No segfault when dalex not defined or
just the simple dalex=1; output for T then:

Variable: T
Type: float
Total Size: 103935000 bytes
            25983750 values
Number of Dimensions: 3
Dimensions and sizes: [time | 246] x [rlat | 325] x [rlon | 325]
Coordinates:
            time: [ 0.. 0]
            rlat: [-17..3.25]
            rlon: [-12.5..7.75]
Number Of Attributes: 4
  long_name : soil surface temperature
  units : K
  grid_mapping : rotated_pole
  coordinates : lon lat

Furthermore, and this is strange, no segfault when the order is changed: first
reading of T and then defining of dalex. Also, no segfault when just reading
one file.

Bug?

Cheers,
Sebastian

-- 
Potsdam Institute for Climate Impact Research (PIK)
Research Domain II - Climate Impacts & Vulnerabilities
http://www.pik-potsdam.de/members/schubert/

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

Received on Mon May 3 11:32:53 2010

This archive was generated by hypermail 2.1.8 : Mon May 03 2010 - 14:51:25 MDT