[pyngl-talk] PYNIO not supporting to read HDF5 format

Mateus da Silva Teixeira mateusstex at gmail.com
Wed May 8 08:02:22 MDT 2019


Hi Shanru,

I really don't know about PyNIO with HDF5, and since PyNIO was put in
maintenance mode, I'm trying to not use it, for now. So, for example, for
open netCDF files, I'm using xarray.

Searching a little bit, I found this website:
https://www.pythonforthelab.com/blog/how-to-use-hdf5-files-in-python/

I hope this helps.

Best regards,

Mateus


Em qua, 8 de mai de 2019 às 10:30, Shanru Tian via pyngl-talk <
pyngl-talk at ucar.edu> escreveu:

> Hi,
>   Does PYNIO not support to read the HDF5 format ? you can see the errors
> below.
>
>
> --------------
>
> NC4_open: path
> ./precip.mon.total.v501.nc mode 4096 params 0
> HDF5 error messages turned on.
> ./precip.mon.total.v501.nc mode 4096
> nc4_grp_list_add: name /
> HDF5-DIAG: Error detected in HDF5 (1.10.4) thread 47273485308896:
>   #000: H5F.c line 509 in H5Fopen(): unable to open file
>     major: File accessibilty
>     minor: Unable to open file
>   #001: H5Fint.c line 1400 in H5F__open(): unable to open file
>     major: File accessibilty
>     minor: Unable to open file
>   #002: H5Fint.c line 1615 in H5F_open(): unable to lock the file
>     major: File accessibilty
>     minor: Unable to open file
>   #003: H5FD.c line 1640 in H5FD_lock(): driver lock request failed
>     major: Virtual File Layer
>     minor: Can't update object
>   #004: H5FDsec2.c line 939 in H5FD_sec2_lock(): file locking disabled on
> this file system (use HDF5_USE_FILE_LOCKING environment variable to
> override), errno = 38, error message = 'Function not implemented'
>     major: File accessibilty
>     minor: Bad file ID accessed
> ERROR: file
> /home/conda/feedstock_root/build_artifacts/libnetcdf_1545075232789/work/libhdf5/hdf5open.c,
> line 506.
> NetCDF: HDF error
> HDF5-DIAG: Error detected in HDF5 (1.10.4) thread 47273485308896:
>   #000: H5F.c line 509 in H5Fopen(): unable to open file
>     major: File accessibilty
>     minor: Unable to open file
>   #001: H5Fint.c line 1400 in H5F__open(): unable to open file
>     major: File accessibilty
>     minor: Unable to open file
>   #002: H5Fint.c line 1615 in H5F_open(): unable to lock the file
>     major: File accessibilty
>     minor: Unable to open file
>   #003: H5FD.c line 1640 in H5FD_lock(): driver lock request failed
>     major: Virtual File Layer
>     minor: Can't update object
>   #004: H5FDsec2.c line 939 in H5FD_sec2_lock(): file locking disabled on
> this file system (use HDF5_USE_FILE_LOCKING environment variable to
> override), errno = 38, error message = 'Function not implemented'
>     major: File accessibilty
>     minor: Bad file ID accessed
> nc4_close_hdf5_file: h5->path
> ./precip.mon.total.v501.nc abort 1
> nc4_rec_grp_HDF5_del: grp->name /
> nc4_close_netcdf4_file: h5->path ./udel.airtemp.precip/
> precip.mon.total.v501.nc abort 1
> nc4_rec_grp_del: grp->name /
> warning:_NclOpenFile: Can not open file <./precip.mon.total.v501.nc>;
> file format not supported or file is corrupted
> Traceback (most recent call last):
>   File "test2.udel-prcp.py", line 17, in <module>
>     f    = Nio.open_file(os.path.join(dirc,"precip.mon.total.v501.nc"))
>   File
> "/home/1833/anaconda3/envs/ncl_to_python/lib/python3.7/site-packages/PyNIO/Nio.py",
> line 751, in open_file
>     file = _nio.open_file(filename,mode,options,history,format)
> Nio.NIOError: Unable to open file
>
> *Shanru TIAN *
> *PhD Student in Climatology *
> *University of Delaware *
> *TO BE MODEST, TO BE GREAT               *
>
> _______________________________________________
> pyngl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/pyngl-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/pyngl-talk/attachments/20190508/39c23be7/attachment-0001.html>


More information about the pyngl-talk mailing list