文章目录
cat ./archive/logs/cesm.log.3951256.210111-122432 |grep ‘aheadvpdp’ > aheadvpdp3.txt
调用nco包
module load nco/4.6.0-icc-14.0.2
ncdump
ncdump -h **.nc
ncdump -v a variable name **.nc | less
ncks
从nc文件中抽取部分变量,保存为新的nc文件。
ncks -v lat,lon,time,landmask,area,VPD D2_nocrop.clm2.h0.1901-01-01-43200.nc D2-1901-01-01-43200.nc
ncrcat
-v variables to process (regular expressions supported)
将多个nc文件按公共字段时间顺序连接
ncrcat 1901.nc 1902.nc 19012.nc
ncrcat -v SST case.pop.h.*.nc temp.nc
Concatenate files 85.nc, 86.nc, … 89.nc along the record dimension, and store the results in 8589.nc:
ncrcat 85.nc 86.nc 87.nc 88.nc 89.nc 8589.nc
ncrcat 8[56789].nc 8589.nc
ncrcat -n 5,2,1 85.nc 8589.nc
四则运算
4.3 ncbo netCDF Binary Operator
ncbo [-y op_typ] file_1 file_2 [file_3]
-C, --nocoords Associated coordinate variables should not be processed
-v, --variable var1[,var2[...]] Variable(s) to process (regular expressions supported)
-y, --op_typ, --operation op_typ Binary arithmetic operation: add,sbt,mlt,dvd (+,-,*,/)
-x, --x