问题描述
我们在处理数据时候,有时候文件分辨率太高,文件太大了,就需要进行改分辨率
首先用ncdump -h 查看源文件的分辨率 1440x721
ncdump -h ecpblh1621.nc
netcdf ecpblh1621 {
dimensions:
longitude = 1440 ;
latitude = 721 ;
time = 52608 ;
我们看到原文件的分辨率是 1440x721
解决方案:
现在我想插值为144X72,用下面这句
cdo remapbil,r144x72 ecpblh1621.nc ecpblh1621low.nc
提示:其中注意x是小写字母x, r后面加想要的分辨率,然后是源文件,最后加新建文件名。
结果展示:
[chengxl@login02 pblh_deeplearning]$ cdo remapbil,r144x72 ecpblh1621.nc ecpblh1621_low.nc
cdo: /public/software/apps/anaconda3/5.3.0/lib/libuuid.so.1: no version information available (required by cdo)
cdo remapbil: Bilinear weights from lonlat (1440x721) to lonlat (144x72) grid
cdo remapbil: Processed 54619729920 values from 1 variable over 52608 timesteps [1410.24s 107MB].
最后的输出文件只有100多M,改分辨率成功!