NCO笔记

本文档详细介绍了NCO包中的ncdump、ncks、ncrcat等工具的使用,包括如何进行四则运算、处理临时文件、利用符号链接以及设置命令行选项。特别提到了ncap2用于netCDF数据的算术运算,并提供了丰富的命令行示例。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >


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
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值