在 bash、R、python 或 NCL 中将 hdf5 转换为 netcdf4?

Convert hdf5 to netcdf4 in bash, R, python or NCL?

在 bash 中是否有一种快速简单的方法可以从命令行将 HDF5 文件转换为 netcdf(4)?或者,在 R、NCL 或 python 中自动处理此类转换的简单脚本?

NCL 的 ncl_convert2nc 函数是我 go-to 解决此类问题的方法:https://www.ncl.ucar.edu/Document/Tools/ncl_convert2nc.shtml

使用 netcdf-c 库您可以:$ nccopy in.h5 out.nc

您可以通过以下命令轻松地将 hdf5 格式数据转换为 nedtcdf-4 数据:

ncks inputfile_name.h5 outputfile_name.nc

注意:这个inputfile.h5数据是我从mosdac网站上得到的。