[ncl-talk] segmentation default when reading variables
Dennis Shea
shea at ucar.edu
Mon Dec 11 09:00:35 MST 2017
This is a netCDF-4 file:
%> *ncdump -k* EDIII_BIC_1990.nc
*netCDF-4*
NCL's netCDF-4 capabilities have evolved substantially over last few years.
NCL 6.3.0 was released in March 2015 (2.5+ years ago). It seg faults ... on
my box also.
The following NCL versions handle the "w" mode correctly:
NCL 6.4.0 released February 28, 2017
NCL 6.5.0*-beta* not yet released
*Solution:* Download the current release 6.4.0 or, perhaps, the 6.5.0 beta
realse
=====================
My 6.3.0 version of NCL handles this correctly when using "r"
%> ncl
Copyright (C) 1995-2015 - All Rights Reserved
University Corporation for Atmospheric Research
NCAR Command Language Version *6.3.0*
The use of this software is governed by a License Agreement.
See http://www.ncl.ucar.edu/ for more details.
ncl 0> wrfout = addfile("EDIII_BIC_1990.nc",*"**r"*)
ncl 1> lat2d = (/wrfout->lat/)
ncl 2> print(lat2d)
Variable: lat2d
Type: float
Total Size: 55216 bytes
13804 values
Number of Dimensions: 2
Dimensions and sizes: [116] x [119]
Coordinates:
(0,0) 18.24825
(0,1) 18.41432
(0,2) 18.57843
[SNIP]
==================
When using the *"w"* mode 6.3.0 seg faults::
ncl 1> wrfout = addfile("EDIII_BIC_1990.nc",*"**w"*)
ncl 2> lat2d = (/wrfout->lat/)
Segmentation fault
====================
%> ncl
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.
ncl 0> wrfout = addfile("EDIII_BIC_1990.nc","w")
ncl 1> lat2d = (/wrfout->lat/)
ncl 2> print(lat2d)
[SNIP]
=========
%> ncl
Copyright (C) 1995-2017 - All Rights Reserved
University Corporation for Atmospheric Research
NCAR Command Language Version *6.5.0 -11Dec2017_0148*
The use of this software is governed by a License Agreement.
See http://www.ncl.ucar.edu/ for more details.
ncl 0> wrfout = addfile("EDIII_BIC_1990.nc","w")
ncl 1> lat2d = (/wrfout->lat/)
ncl 2> print(lat2d)
[SNIP]
On Mon, Dec 11, 2017 at 12:49 AM, Noelia otero <noeli1680 at gmail.com> wrote:
> Hi Dennis,
>
> I just uploaded the file:
> name: EDIII_BIC_1990.nc
>
> uname -a:
> Darwin Noelias-MBP.fritz.box 15.5.0 Darwin Kernel Version 15.5.0: Tue Apr
> 19 18:36:36 PDT 2016; root:xnu-3248.50.21~8/RELEASE_X86_64 x86_64
>
> gcc --version
> Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr
> --with-gxx-include-dir=/usr/include/c++/4.2.1
> Apple LLVM version 7.3.0 (clang-703.0.31)
> Target: x86_64-apple-darwin15.5.0
> Thread model: posix
> InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/
> XcodeDefault.xctoolchain/usr/bin
>
> Please let me know if the file was totally uploaded (I think it was 100%
> uploaded before the connection was closed).
>
> Thanks again,
>
> Noelia
>
> 2017-12-10 16:48 GMT+01:00 Dennis Shea <shea at ucar.edu>:
>
>> I just tried ... there is a problem with the ftp area. Systems will have
>> to address that issue. Likely ... tomorrow.
>>
>> On Sun, Dec 10, 2017 at 8:41 AM, Noelia otero <noeli1680 at gmail.com>
>> wrote:
>>
>>> Hi,
>>> I can't login actually..it seems that it's down ? (at least I can't now,
>>> sorry)
>>>
>>> Thanks!
>>>
>>> 2017-12-10 16:39 GMT+01:00 Dennis Shea <shea at ucar.edu>:
>>>
>>>> The ftp site does not care if a file is gzipped or not.
>>>>
>>>> Did you
>>>>
>>>> cd incoming
>>>>
>>>> before attempting to upload the file?
>>>>
>>>> On Sun, Dec 10, 2017 at 8:20 AM, Barry Lynn <barry.h.lynn at gmail.com>
>>>> wrote:
>>>>
>>>>> Hi Noelia:
>>>>>
>>>>> I noticed that the ftp system prefers the files gzipped. If you are
>>>>> able to log on, but not upload, it maybe because the file is too large.
>>>>>
>>>>> Barry
>>>>>
>>>>> On Sun, Dec 10, 2017 at 4:15 PM, Noelia otero <noeli1680 at gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Hi again,
>>>>>>
>>>>>> I am trying to upload the file but the ftp is not working now (maybe
>>>>>> is temporary) .
>>>>>> In any case, I also wanted that I tried again with an older version
>>>>>> of NCL (6.2.1) and it works..yesterday I was using 6.3.0 and I got the
>>>>>> segmentation default. Then, it seems that it could be related to version of
>>>>>> ncl?
>>>>>>
>>>>>> I'll try to upload the file later, if you still suggest me to do it.
>>>>>>
>>>>>> Thanks a lot,
>>>>>>
>>>>>> Best
>>>>>>
>>>>>> Noelia
>>>>>>
>>>>>>
>>>>>> 2017-12-10 6:36 GMT+01:00 Rick Brownrigg <brownrig at ucar.edu>:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> Are you able you able to ftp the file in question to us? Using
>>>>>>> "addfile()" with "w" to both read and write should work, and in any case,
>>>>>>> it should not segv!
>>>>>>>
>>>>>>> ftp ftp.cgd.ucar.edu
>>>>>>> anonymous*<enter your email address for the password>*
>>>>>>> cd incoming
>>>>>>> put *file1*
>>>>>>> put *file2*
>>>>>>> . . .*continue with 'put' commands until all desired files are uploaded*. . .
>>>>>>> quit
>>>>>>>
>>>>>>> When the upload is complete, send email to ncl-talk
>>>>>>> <ncl-talk at ucar.edu> or the NCL team member that you've already been
>>>>>>> working with and include the exact names of the files, and the approximate
>>>>>>> size of each file.
>>>>>>>
>>>>>>> For security reasons, you cannot list the contents of the 'incoming'
>>>>>>> directory. This is why we need to know the exact names of the files.
>>>>>>>
>>>>>>> On Sat, Dec 9, 2017 at 3:18 PM, Noelia otero <noeli1680 at gmail.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Hi Dennis,
>>>>>>>>
>>>>>>>> This is not a wrfout_nc file, sorry, it was just the name used in
>>>>>>>> the script to call "file_in". What confuses me it's that when I open the
>>>>>>>> file with addfile with the option "r" I can get the variables (lat, lon or
>>>>>>>> whatever). The problem is when I want to overwrite some the values in
>>>>>>>> there, because I open it as addfile with the option "w". Then when I try to
>>>>>>>> read any variable the segmentation defaul happens. Any idea ?
>>>>>>>>
>>>>>>>> Many thanks again,
>>>>>>>> Noelia
>>>>>>>>
>>>>>>>>
>>>>>>>> 2017-12-09 22:42 GMT+01:00 Dennis Shea <shea at ucar.edu>:
>>>>>>>>
>>>>>>>>> Typically, wrfout_nc files do not have variable named 'lat'
>>>>>>>>>
>>>>>>>>> XLAT(Time, south_north, west_east)
>>>>>>>>> also
>>>>>>>>> XLONG(Time, south_north, west_east)
>>>>>>>>>
>>>>>>>>> So, maybe it should be
>>>>>>>>>
>>>>>>>>> lat2d = (/wrfout->XLAT(0,:,:)/) ; 0 refers to the 1st time step
>>>>>>>>> printVarSummary(lat2d)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Sat, Dec 9, 2017 at 12:56 PM, Noelia otero <noeli1680 at gmail.com
>>>>>>>>> > wrote:
>>>>>>>>>
>>>>>>>>>> Hi
>>>>>>>>>>
>>>>>>>>>> I am getting a Segmentation fault (core dumped) when trying to
>>>>>>>>>> read a variable from one file opened as:
>>>>>>>>>>
>>>>>>>>>> wrfout = addfile(file_in,"w")
>>>>>>>>>> lat2d = (/wrfout->lat/)
>>>>>>>>>> Segmentation fault (core dumped)
>>>>>>>>>>
>>>>>>>>>> I thought that it could due to a problem in the file, but I
>>>>>>>>>> looked at the file and it seems fine. If I use:
>>>>>>>>>> wrfout = addfile(file_in,"r")
>>>>>>>>>> lat2d = (/wrfout->lat/)
>>>>>>>>>> it works.
>>>>>>>>>> The file I'm using is 52M..no too large...so I'm quite lost about
>>>>>>>>>> what the problem can be... and the version of ncl Version 6.3.0.
>>>>>>>>>>
>>>>>>>>>> Any idea?
>>>>>>>>>>
>>>>>>>>>> Thanks!
>>>>>>>>>>
>>>>>>>>>> Best
>>>>>>>>>> Noelia
>>>>>>>>>>
>>>>>>>>>> _______________________________________________
>>>>>>>>>> ncl-talk mailing list
>>>>>>>>>> ncl-talk at ucar.edu
>>>>>>>>>> List instructions, subscriber options, unsubscribe:
>>>>>>>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> ncl-talk mailing list
>>>>>>>> ncl-talk at ucar.edu
>>>>>>>> List instructions, subscriber options, unsubscribe:
>>>>>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> ncl-talk mailing list
>>>>>> ncl-talk at ucar.edu
>>>>>> List instructions, subscriber options, unsubscribe:
>>>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Barry H. Lynn, Ph.D
>>>>> Senior Lecturer,
>>>>> The Institute of the Earth Science,
>>>>> The Hebrew University of Jerusalem,
>>>>> Givat Ram, Jerusalem 91904, Israel
>>>>> Tel: 972 547 231 170
>>>>> Fax: (972)-25662581
>>>>>
>>>>> C.E.O, Weather It Is, LTD
>>>>> Weather and Climate Focus
>>>>> http://weather-it-is.com
>>>>> Jerusalem, Israel
>>>>> Local: 02 930 9525
>>>>> Cell: 054 7 231 170
>>>>> Int-IS: x972 2 930 9525
>>>>> US 914 432 3108 <(914)%20432-3108>
>>>>>
>>>>> _______________________________________________
>>>>> ncl-talk mailing list
>>>>> ncl-talk at ucar.edu
>>>>> 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/20171211/0f7c4c56/attachment.html>
More information about the ncl-talk
mailing list