- 积分
- 51
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2014-6-6
- 最后登录
- 1970-1-1
|
发表于 2014-11-18 16:49:54
|
显示全部楼层
NetCDF网站上的回答:
http://www.unidata.ucar.edu/software/netcdf/docs/faq.html#fv14
How can I convert netCDF-4 files into netCDF-3 files?
In general, you can't, because netCDF-4 files may have features of the netCDF enhanced data model, such as groups, compound types, variable-length types, or multiple unlimited dimensions, for which no netCDF-3 representation is available. However, if you know that a netCDF-4 file conforms to the classic model, either because it was written as a netCDF-4 classic model file, because the program that wrote it was a netCDF-3 program that was merely relinked to a netCDF-4 library, or because no features of the enhanced model were used in writing the file, then there are several ways to convert it to a netCDF-3 file.
You can use the nccopy utility from netCDF versions 4.1 and later. For example to convert a netCDF-4 classic-model format file foo4c.nc to a classic format file foo3.nc, use:
nccopy -k classic foo4c.nc foo3.nc
If you have installed NCO , the NCO utility "ncks" can be used to accomplish the same task, as follows:
ncks -3 foo4c.nc foo3.nc
For a relatively small netCDF-4 classic model file, "small4c.nc" for example, you can also use the ncdump and ncgen utilities to create an equivalent netCDF-3 classic format file named "small3.nc" as follows:
ncdump small4c.nc > small4.cdl
ncgen -o small3.nc small4.cdl |
|