sum all variables of file
Added by Chris Danek about 1 month ago
Hi
Is it possible to sum all variables of a file without repeating the selection operator for every variable and without using expr?
fin=cdo-2.5.2/test/data/ap2pl_l90_ref cdo -L -enssum -selname,ta $fin -selname,wa $fin ~/fout # works but repeated selname cdo -L -expr,'mysum=ta+wa' -select,name=ta,wa $fin ~/fout # works but expr cdo -L -enssum -select,name=ta,wa $fin ~/fout # does not work; just selects but does not sum
Thanks and cheers
Chris
btw: it would be great if you could sometimes reply to your millions of open issues ._.
Replies (2)
RE: sum all variables of file - Added by Karin Meier-Fleischer about 1 month ago
Example to add two variables per timestep:
cdo -varssum -selname,var1,var2 infile outfile
RE: sum all variables of file - Added by Chris Danek about 1 month ago
Ah thank you so much, sorry that I did not find this in the docu!