Fortran-从hdf5文件读取复杂变量

时间:2020-07-15 06:54:00

标签: fortran hdf5

我创建了一个复杂的数组,并以hdf5格式存储如下:

import numpy as np
import h5py

a = np.random.random((50,50))
b = np.random.random((50,50))
a = a+1j*b
with h5py.File('random.hdf5','w') as f:
    dset = f.create_dataset('vec',data=a,dtype='c16',compression="gzip",compression_opts=4)
f.close()

现在,我正尝试通过Fortran例程读取此文件 random.hdf5

Fortran没有适用于hdf5的本机复杂数据类型。我该如何读取该文件?

(如果有帮助,我正在使用Intel fortran编译器)

0 个答案:

没有答案
相关问题