CDO select on files with differing variable numbers
Added by Gabe Bromley almost 5 years ago
Hello!
18 of my 365 files are lacking a few variables (I enabled those variables after the first model restart). I am trying to select a few variables out of all the files and create a new file from them. How can I get around this? The error I got was:
cdo select (Abort): Input streams have different number of variables per timestep!
Is there any way to ignore these variables? They are not the ones I am interested in anyway. Otherwise, is there a work around? Would I have to select the variables out of the 18 days and then combine the file with the variables from the remaining 347 days?
Thanks!
Gabe
Replies (1)
RE: CDO select on files with differing variable numbers - Added by Ralf Mueller almost 5 years ago
hi Gabe!
this is a perfect use-case for the apply
function:
cdo -select,name=P -apply,selname,P [ s1.nc s0.nc ] out.ncHere both input files have different variables:
$cdo showname s1.nc P T $cdo showname s0.nc P
hth
ralf