opposite of "subtrend"
Added by Bidyut Goswami almost 5 years ago
Hi, I was wondering if there is any operator which works exactly opposite as "subtrend". What I mean is,
cdo trend ifile afile bfile cdo subtrend afile bfile ifile_detrended
Is there any operator like "addtrend" such that,
cdo addtrend ifile_detrended afile bfile outfile
where, outfile would be basically same as my ifile
Thanks.
Replies (5)
RE: opposite of "subtrend" - Added by Ralf Mueller almost 5 years ago
hi!
in this thread I explained what the outputs of the trend
operator are about. you can create a data file based on the given formula (and your coefficients) using the expr
operators and call the add
operators on both inputs to get what you want.
hth
ralf
RE: opposite of "subtrend" - Added by Bidyut Goswami almost 5 years ago
Hi Ralf,
Thanks for your suggestion. After reading the thread you had referred to, I tried the following:
### calculate trend cdo -trend sst.nc afile.nc bfile.nc ### Detrend sst cdo -subtrend sst.nc afile.nc bfile.nc sst_detrended.nc ### Retrieve the original SST cdo -mul sst_detrended.nc bfile.nc sst_trended.nc cdo -add sst_trended.nc afile.nc sst_retrived.nc
But there are differences between my original SST and the retrieved SST (please see the attached figures). Can you please suggest what am I missing here? I am attaching the original SST file for your reference.
Many thanks.
Bidyut
check_timeseries.gif (14.8 KB) check_timeseries.gif | |||
check.gif (46.3 KB) check.gif | |||
sst.nc (25.3 MB) sst.nc |
RE: opposite of "subtrend" - Added by Uwe Schulzweida almost 5 years ago
bfile.nc needs to be multiplied with the timestep.
RE: opposite of "subtrend" - Added by Uwe Schulzweida almost 5 years ago
The operator addtrend will be available in the next CDO release.
A prerelease for testing is available in the download area.
RE: opposite of "subtrend" - Added by Bidyut Goswami almost 5 years ago
Thanks Uwe. The pre-release version cdo-1.9.9rc2 worked perfectly for me.