[ncl-talk] Segmentation fault when reading variables from NC
Dennis Shea
shea at ucar.edu
Mon Mar 23 08:40:16 MDT 2015
Also, forgot to mention ...
Using named dimensions should only be done when reordering an array.
Nothing wrong with doing so but is is less efficient than ..
lon2d = inp0->XLONG_M (0, :, :)
On Mon, Mar 23, 2015 at 8:11 AM, Dennis Shea <shea at ucar.edu> wrote:
> I don't understand why either. 6.1.2 is no longer available here so I can
> not test with 6.1.2
>
> When it does work ... what does printVarSummary(lon2d) indicate?
>
> On Mon, Mar 23, 2015 at 2:47 AM, ChenFeng <fengfengabc003 at 163.com> wrote:
>
>> 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
>>
>> _______________________________________________
>> ncl-talk mailing list
>> 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/20150323/54f1a535/attachment.html
More information about the ncl-talk
mailing list