Project

General

Profile

delete timesteps in multiple files in one piped command

Added by Anja Lef 12 months ago

Hi,

I'm trying to write a command and subtract two files. I need timesteps deleted in each file but I can't seem to pipe the delete,timestep command. Here is what I wrote:

cdo -L yearsum -gtc,20 -sub -delete,timestep=-1 infile1.nc -shifttime,-1 -delete,timestep=1 infile2.nc outfile.nc

Any help if piping of the delete command is at all possible would be very appreciated.

Thank you,

Anja


Replies (2)

RE: delete timesteps in multiple files in one piped command - Added by Karin Meier-Fleischer 12 months ago

Hi Anja,

I think you have to group it like:

cdo -L -yearsum -gtc,20 [ -sub [ -delete,timestep=-1 infile1.nc ] [ -shifttime,-1 -delete,timestep=1 infile2.nc ] ] outfile.nc

RE: delete timesteps in multiple files in one piped command - Added by Anja Lef 10 months ago

Thank you for your help. The solution Karin Meier-Fleischer provided has worked for me.

    (1-2/2)