<div dir="ltr"><div dir="ltr"><div>Hi Shanru,</div><div><br></div><div>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.</div><div><br></div><div>Searching a little bit, I found this website: <a href="https://www.pythonforthelab.com/blog/how-to-use-hdf5-files-in-python/">https://www.pythonforthelab.com/blog/how-to-use-hdf5-files-in-python/</a></div><div><br></div><div>I hope this helps.<br></div><div><br></div><div>Best regards,</div><div><br></div><div>Mateus</div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Em qua, 8 de mai de 2019 às 10:30, Shanru Tian via pyngl-talk <<a href="mailto:pyngl-talk@ucar.edu">pyngl-talk@ucar.edu</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div>Hi, </div><div>  Does PYNIO not support to read the HDF5 format ? you can see the errors below.</div><div><br></div><div><br></div><div>--------------</div><div><br></div><div>NC4_open: path </div><div>./<a href="http://precip.mon.total.v501.nc" target="_blank">precip.mon.total.v501.nc</a> mode 4096 params 0</div><div><span style="white-space:pre-wrap">        </span>HDF5 error messages turned on.</div><div>./<a href="http://precip.mon.total.v501.nc" target="_blank">precip.mon.total.v501.nc</a> mode 4096</div><div><span style="white-space:pre-wrap">                  </span>nc4_grp_list_add: name /</div><div>HDF5-DIAG: Error detected in HDF5 (1.10.4) thread 47273485308896:</div><div>  #000: H5F.c line 509 in H5Fopen(): unable to open file</div><div>    major: File accessibilty</div><div>    minor: Unable to open file</div><div>  #001: H5Fint.c line 1400 in H5F__open(): unable to open file</div><div>    major: File accessibilty</div><div>    minor: Unable to open file</div><div>  #002: H5Fint.c line 1615 in H5F_open(): unable to lock the file</div><div>    major: File accessibilty</div><div>    minor: Unable to open file</div><div>  #003: H5FD.c line 1640 in H5FD_lock(): driver lock request failed</div><div>    major: Virtual File Layer</div><div>    minor: Can't update object</div><div>  #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'</div><div>    major: File accessibilty</div><div>    minor: Bad file ID accessed</div><div>ERROR: file /home/conda/feedstock_root/build_artifacts/libnetcdf_1545075232789/work/libhdf5/hdf5open.c, line 506.</div><div>NetCDF: HDF error</div><div>HDF5-DIAG: Error detected in HDF5 (1.10.4) thread 47273485308896:</div><div>  #000: H5F.c line 509 in H5Fopen(): unable to open file</div><div>    major: File accessibilty</div><div>    minor: Unable to open file</div><div>  #001: H5Fint.c line 1400 in H5F__open(): unable to open file</div><div>    major: File accessibilty</div><div>    minor: Unable to open file</div><div>  #002: H5Fint.c line 1615 in H5F_open(): unable to lock the file</div><div>    major: File accessibilty</div><div>    minor: Unable to open file</div><div>  #003: H5FD.c line 1640 in H5FD_lock(): driver lock request failed</div><div>    major: Virtual File Layer</div><div>    minor: Can't update object</div><div>  #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'</div><div>    major: File accessibilty</div><div>    minor: Bad file ID accessed</div><div><span style="white-space:pre-wrap">                   </span>nc4_close_hdf5_file: h5->path </div><div>./<a href="http://precip.mon.total.v501.nc" target="_blank">precip.mon.total.v501.nc</a> abort 1</div><div><span style="white-space:pre-wrap">                        </span>nc4_rec_grp_HDF5_del: grp->name /</div><div><span style="white-space:pre-wrap">                     </span>nc4_close_netcdf4_file: h5->path ./udel.airtemp.precip/<a href="http://precip.mon.total.v501.nc" target="_blank">precip.mon.total.v501.nc</a> abort 1</div><div><span style="white-space:pre-wrap">                 </span>nc4_rec_grp_del: grp->name /</div><div>warning:_NclOpenFile: Can not open file <./<a href="http://precip.mon.total.v501.nc" target="_blank">precip.mon.total.v501.nc</a>>; file format not supported or file is corrupted</div><div>Traceback (most recent call last):</div><div>  File "<a href="http://test2.udel-prcp.py" target="_blank">test2.udel-prcp.py</a>", line 17, in <module></div><div>    f    = Nio.open_file(os.path.join(dirc,"<a href="http://precip.mon.total.v501.nc" target="_blank">precip.mon.total.v501.nc</a>"))</div><div>  File "/home/1833/anaconda3/envs/ncl_to_python/lib/python3.7/site-packages/PyNIO/Nio.py", line 751, in open_file</div><div>    file = _nio.open_file(filename,mode,options,history,format)</div><div>Nio.NIOError: Unable to open file</div><div><div dir="ltr" class="gmail-m_-8056508180907137566gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><div dir="ltr"><font size="1" face="times new roman, serif"><i>Shanru TIAN </i></font></div><div dir="ltr"><div><font size="1" face="times new roman, serif"><i>PhD Student in Climatology </i></font></div><div><i style="font-family:"times new roman",serif;font-size:x-small">University of Delaware </i><br></div><div><font size="1" face="times new roman, serif"><i><span style="background-color:rgb(246,246,246);color:rgb(0,0,0)">TO BE MODEST, TO BE GREAT</span><font>    </font>           </i></font></div><div><i style="font-size:12.8px"><font face="times new roman, serif"><font size="2"><br></font></font></i></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
_______________________________________________<br>
pyngl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/pyngl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/pyngl-talk</a><br>
</blockquote></div>