cdo trend
Added by Syed Ali about 5 years ago
I am calculating the long term trend during for yearly data 1901 to 2013 using the CDO function
cdo trend temp.nc trend1.nc trend2.nc
What dodes the trend1.nc and trend2.nc represent.
Suppose I want to calculate decadal trend should i write cdo trend,10 temp.nc trend1.nc trend2.nc?
Replies (11)
RE: cdo trend - Added by Ralf Mueller about 5 years ago
Hi Syed!
Here is an example usage of trend
: suppose you have temperature evolution like this:
I created it with
cdo -f nc -settaxis,2001-01-01,12:00:00,1days -expr,'Temp=25*sin(seq*3.141529/360)+seq/100' -seq,1,10000When you call
trend
on this dataset you get two output files trend_o1
und trend_o2
, which both contain only single value: 1.6084 (o1) and 0.0096936 (o2). Following the documentation these are parameters of a linear fit to the data: Trend = 1.6084+0.0096936*time
. Finally this looks like this:
if you want to do a computation of the trend on a decade, you have to select each decade separately and to the trend
calculation I guess
cheers
ralf
temp.png (45.1 KB) temp.png | |||
temp_and_trend.png (55.5 KB) temp_and_trend.png |
RE: cdo trend - Added by Syed Ali about 5 years ago
thanks for the explanation ralf. what number does "equal" represents in this cdo trend[,equal] infile outfile1 outfile2 ?
RE: cdo trend - Added by Ralf Mueller about 5 years ago
it's not a number, but a boolean - must be set 'true' or 'false'
RE: cdo trend - Added by Syed Ali about 5 years ago
what is the affect on output by setting it true or false?
RE: cdo trend - Added by Ralf Mueller about 5 years ago
it has to do with the time-axis. Normally the operators expects an equally spaced time-axis. with 'false' given, it can be unequally spaced, like years and months. this triggers another trend-algorithm.
cheers
ralf
RE: cdo trend - Added by rizwan careem about 5 years ago
@ ralf
how would be the trend calculated if we want to do it for a variable like seal level pressure for a month lets say july over a time period of 1980-2016...check the attached file for consideration also.
july-slp.rar (33.8 MB) july-slp.rar |
RE: cdo trend - Added by Ralf Mueller about 5 years ago
the trend
operator is on only useful for time-series data. your input is horizontally distributed - so it doesn't work in that case
RE: cdo trend - Added by rizwan careem about 5 years ago
@Ralf Thehos Mueller
What if i choose single level for the said variable (as this variable is already single level 1000hPa). while time is already mentioned (july month since 1980-2016). then?
RE: cdo trend - Added by Ralf Mueller about 5 years ago
you have to select a single horizontal location or reduce this dimension in any other way (maybe a horizontal mean is suitable, too). I cannot say what is useful for you
RE: cdo trend - Added by rizwan careem about 5 years ago
can you check these files. they are vertically reduced to single level..
RE: cdo trend - Added by Ralf Mueller about 5 years ago
your files have only a single timestep - that's nothing I could create a time-series from, sorry.
cheers
ralf