Added by Guillaume S about 7 years ago
Hi,
I have 2 timeseries (1D) with the same time axes and dimensions, but one contains missing value at some dates, while the other one contains only valid values.
I would like to replace the missing values of the first timseries by the valid values from the second one (and keep the valid values from the first dataset elsewhere).
Is it possible to do this with cdo (using mask and mergetime for exemple) ? Thank you.
Best regards,
Guillaume
Hi Guillaume,
the ifthenelse operator is what you are looking for.
cdo ifthenelse -gtc,-9999 -setmisstoc,-9999 tser1.nc tser1.nc tser2.nc outfile.nc
-Karin