java读写netcdf文件_Netcdf java库用于读取HDf5错误 (Netcdf java library for reading HDf5 error)...

2015-09-30 11:53:23

0

I am a newbie to netcdf library and i am currently using it to read the metadata from a hdf5 file in java. After reading, I thought that netcdf is a decent enough library for my use, so using it.

however in the first step when i try to read the file it throws an error

LOGGER.debug("Inside Try");

//InputStream fileStream = new FileInputStream(h5File);

//parser.parse(fileStream, handler, metadata);

LOGGER.debug("path is :"+ h5File.getPath());

NetcdfFile hf5File = NetcdfFile.open(h5File.getPath());

LOGGER.debug("Got NetCdFile");

I am assuming the problem occurs when i try to open it , as it says :

Inside Try

13:42:04.393 [main] DEBUG e.k.n.c.m.e.HDF5MetadataExtractor - path is :/var/www/webdav/admin/1151/data/XXXX.h5

13:42:04.495 [main] DEBUG ucar.nc2.NetcdfFile - Using IOSP ucar.nc2.iosp.hdf5.H5iosp

13:42:04.544 [main] ERROR ucar.nc2.iosp.hdf5.H5header - shape[0]=0 must be > 0

My Hd5f is a 2 dimensional array of integers, I am not interested in the array as such but with the metadata group associated with the file.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值