Filter1d with filter width in days or months

Using GMT6:

gmt filter1d [core] 6.1.0_81d4900_2020.04.08 [64-bit] - Time domain filtering of 1-D data tables

I have some data that look like what is posted below. I would like to make a running mean of these data using filter1d with a filter that has width of 1 month (or 30 days).

I’ve tried a few options to the -Fb<width> but the only thing that seems to work is if I specify the filter width in seconds like this:

filter1d -Fb2.592e6 -f0T -E

Can anyone give me an example of how I could specify the filter with in days or months?

Thanks,

Jed

...
1872-10-1 2.9
1872-10-2 4.9
1872-10-3 4.1
1872-10-4 2.9
1872-10-5 5
1872-10-6 4.8
1872-10-7 5
1872-10-8 5.4
1872-10-9 5
1872-10-10 4.3
1872-10-11 5.7
1872-10-12 5.2
1872-10-13 4.2
1872-10-14 3.3
1872-10-15 1.7
1872-10-16 3.2
1872-10-17 2.8
1872-10-18 4.2
1872-10-19 7.4
1872-10-20 7.7
1872-10-21 6.8
1872-10-22 5.1
1872-10-23 6.2
1872-10-24 4.9
1872-10-25 4.8
1872-10-26 6.2
1872-10-27 5.3
1872-10-28 1.7
1872-10-29 3.6
1872-10-30 5.4
1872-10-31 4.8
1872-11-1 -13.7
1872-11-2 -15.6
1872-11-3 -15
1872-11-4 -18.4
1872-11-5 -20.1
1872-11-6 -19.5
1872-11-7 -18
1872-11-8 -14.4
1872-11-9 -14.3
1872-11-10 -10.1
1872-11-11 -8.9
1872-11-12 -7.2
1872-11-13 -5.4
1872-11-14 -1.3
1872-11-15 1.8
1872-11-16 -0.3
1872-11-17 -3.8
1872-11-18 -4.9
1872-11-19 -3.5
1872-11-20 -4.7
1872-11-21 -7.5
1872-11-22 -12.5
1872-11-23 -13.8
1872-11-24 -13.1
1872-11-25 -16.3
1872-11-26 -14.8
1872-11-27 -11.7
1872-11-28 -17.4
1872-11-29 -15.6
1872-11-30 -14.1
1872-12-1 -10.8
1872-12-2 -13.2
1872-12-3 -7
1872-12-4 -7.7
1872-12-5 -10.7
1872-12-6 -8
1872-12-7 -9.4
1872-12-8 -15.8
1872-12-9 -13.5
1872-12-10 -8.5
1872-12-11 -10.2
1872-12-12 -9.5
1872-12-13 -5.1
1872-12-14 -1.8
1872-12-15 -2.2
1872-12-16 4.5
1872-12-17 4.6
1872-12-18 1.2
1872-12-19 -2.4
1872-12-20 -2.9
1872-12-21 3.2
1872-12-22 6.6
1872-12-23 10.6
1872-12-24 9
1872-12-25 16.3
1872-12-26 16.9
1872-12-27 13.3
1872-12-28 17.8
1872-12-29 13.6
1872-12-30 11.2
1872-12-31 11.3
...

Use --TIME_UNIT=d to change the unit of time to days, then -Fb30 means 30 days. [Default is seconds].

2 Likes