[ncl-talk] Segmentation fault with addfiles and addfile

Dennis Shea shea at ucar.edu
Tue Aug 27 13:17:00 MDT 2019


Hi Andrea,

The file is a 'run-of-the-mill' CAM5 file with 64-bit offset.

*%>* ncdump -k spcesm_cam5_control.cam.h0.1910-05.nc
64-bit offset
====================================================
Using *NCL 6.3.0* and *NCL 6.5.0* I tested addfile and addfiles using the
attached script


Try the attached.

D

On Tue, Aug 27, 2019 at 12:43 PM Jenney,Andrea via ncl-talk <
ncl-talk at ucar.edu> wrote:

> All,
>
> I’m getting a segmentation fault error when using addfile and addfiles to
> read in netcdf files. Each single file is a monthly mean (only one time
> step) of many variables that are resolved in space. I’ve uploaded an
> example file to the link, (file is called "
> spcesm_cam5_control.cam.h0.1910-05.nc"):
> http://saddleback.atmos.colostate.edu/rr/docexch.php. Running
> ncl_filedump and ncl_convert2nc on the files works fine and everything
> looks great. The non-ncl ncview and ncdump also show that things look
> normal to me. My files are smaller than 400 MB each, all variables are 3D
> or smaller, and the largest dimension is length 144.
>
> Relevant code:
> (when using addfiles)
>
> fnameIn = dir + "spcesm_cam5_*.h0.*.nc"
> files = systemfunc("ls "+fnameIn)
> f     = addfiles(files, "r") ; <- Error: "warning:_NclOpenFile: Can not
> open file <filename> file format not supported or file is corrupted"
>
>
> (when using addfile)
> fnameIn = dir + "spcesm_cam5_*.h0.*.nc"
> files = systemfunc("ls "+fnameIn)
> nf    = dimsizes(files)
> do ifile = 0,nf-1
> f = addfile(files(ifile), "r") ; <- Error: "Segmentation fault"
>> end do
>
> Thanks in advance for your help
> ---
> Andrea Jenney
> PhD Candidate | Randall & Barnes Groups
> Colorado State University | Dept. of Atmospheric Science
>
> _______________________________________________
> 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/20190827/f1464951/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.spcesm_cam5_control.ncl
Type: application/octet-stream
Size: 689 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190827/f1464951/attachment.obj>


More information about the ncl-talk mailing list