NCAR / ncl

The NCAR Command Language (NCL) is a scripting language for the analysis and visualization of climate and weather data.

Home Page:http://www.ncl.ucar.edu

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Segmentation fault (core dumped) issue when Reading hdf5 files

thegiantspaceman opened this issue · comments

I am using linux OS and have installed NCL using the conda install method here. I have NCL version 6.6.2 and it works fine except for the fact that it cannot read hdf5 files. To illustrate this error, below is a test script to write and then read an hdf5 file. The script is able to write to hdf5, but once it goes to read hdf5 it gives "Segmentation fault (core dumped)." How can I fix this issue?

begin
fn = "./out.hdf5"
a= (/1,2/)
;WRITE
f = addfile(fn, "c")
f->a = (/a/)
;READ
f = addfile(fn, "r")
s = f->a
end

Thank you for the quick reply Rick. I added "delete(f)" before reading, but I still get the same seg fault issue. I also have tried to open an hdf5 file output from a model and I encounter the exact same error. Should I try to build NCL differently on my machine? Do you have any other suggestions?

-Reuben