Smoothing time series with filter1d
I am trying to smooth my monthly time series using filter1d. The first column
is my time stamp with the calender format and the second column is the values
- 1988-01-01T00:00:00 -7.2
- 1988-02-01T00:00:00 -8.5
- 1988-03-01T00:00:00 -8.1
- 1988-04-01T00:00:00 -12.2
- 1988-05-01T00:00:00 -12.7
- 1988-06-01T00:00:00 -13.6
- 1988-07-01T00:00:00 -12.2
- 1988-08-01T00:00:00 -11.3
Here I would like to filter every 36 months
gmt set FORMAT_DATE_IN=yyyy-mm-dd
filter1d -fT -Fb36 input_time_series -N0 --TIME_UNIT=o -V -E > out_put_time_series
Where --TIME_UNIT=o , tells filter1d as a monthly time stamp and -fT to specify absolute calendar time.
I wounder this is the correct way of filtering with the intended length of filter, i.e. 36 months ?
filter1d: Read 1000 records from table 0, segment 0
filter1d: F width: 36 Resolution: 0.999989 Start: -840.001 Stop: 538.984
PS. I use the latest GMT version
RE: Smoothing time series with filter1d - Added by Paul 8 months ago
It should work, but note that a month duration in GMT is simplified to be 1/12 of a year and does not vary in length (yet). So all months are equally long as far as the filter width is concerned.