[ncl-talk] Segmentation fault when reading variables from NC

ChenFeng fengfengabc003 at 163.com
Mon Mar 23 02:47:09 MDT 2015


Hi ncl-users,

I have encounted an error when reading a variable from an NC file.
the code is listed below:
;************************************************
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
;************************************************
begin
  inp0 = addfile("/public/home/chenf/AHWRF/TEST/WPSwks.T02/geo_em.d01.nc","r")
  lon2d = inp0->XLONG_M (Time|0, south_north|:, west_east|:)
  printVarSummary(lon2d)
;************************************************
end

the error message is:
 Copyright (C) 1995-2013 - All Rights Reserved
 University Corporation for Atmospheric Research
 NCAR Command Language Version 6.1.2
 The use of this software is governed by a License Agreement.
 See http://www.ncl.ucar.edu/ for more details.
Segmentation fault (core dumped)

The strange thing is when i'm reading the variable without any dimention name cited, the error disappeared.
The code changes into :
;************************************************
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
;************************************************
begin
  inp0 = addfile("/public/home/chenf/AHWRF/TEST/WPSwks.T02/geo_em.d01.nc","r")
  lon2d = inp0->XLONG_M
  printVarSummary(lon2d)
;************************************************
end

I don't understand why. It is very appreciate if anybody can tell me the reason.
Thanks.

Feng
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150323/98fe25e3/attachment.html 


More information about the ncl-talk mailing list