[ncl-talk] segmentation default when reading variables

Rick Brownrigg brownrig at ucar.edu
Sat Dec 9 22:36:07 MST 2017


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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20171209/1f7e92a1/attachment.html>


More information about the ncl-talk mailing list