简体   繁体   中英

How to add 2 netcdf files with NCO?

I have two gridded.netcdf files with several variables including also time.

The files have the same dimension (gridded, time, variables). The number of the variables are the same. However, the name of them are different. For example

File1: var1_co, var2_co, var3_co
File2: var1_mo, var2_mo, var3_mo

The new file would be:

File3: var1_mo+var1_co, var2_co+var2_mo, var3_co+var3_mo

The following command does not work:

ncbo --op_typ=add File1.nc File2.nc File3.nc

Try something like this, and possible re-rename on the back-end too:

ncrename -v var1_mo,var1_co -v var2_mo,var2_co, -v var3_mo,var3_co File2.nc f2_tmp.nc
ncbo --op_typ=add File1.nc f2_fmp.nc File3.nc

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM