Hello devs,
I have a raster time series derived from MODIS VI products which granularity is 16-days. When I use either t.rast.aggregate or t.rast.aggregate.ds with default sampling method (i.e., contains) to create a monthly time series, I get 2 maps less than I should (106 instead of 108 which would correspond to 12 months * 9 years). I found out that the problem appears with maps from november in leap years. Here an extract of t.rast.list from the 16-days time series:
t.rast.list -u EVI_16day_lwr_filt where=“start_time >= ‘2012-10-01 00:00:00’”
EVI_lwr_filt_088|ghana|2012-10-15 00:00:00|2012-10-31 00:00:00
EVI_lwr_filt_089|ghana|2012-10-31 00:00:00|2012-11-16 00:00:00
EVI_lwr_filt_090|ghana|2012-11-16 00:00:00|2012-12-02 00:00:00 <<-- here
EVI_lwr_filt_091|ghana|2012-12-02 00:00:00|2012-12-18 00:00:00
EVI_lwr_filt_092|ghana|2012-12-18 00:00:00|2013-01-01 00:00:00
…
EVI_lwr_filt_180|ghana|2016-10-15 00:00:00|2016-10-31 00:00:00
EVI_lwr_filt_181|ghana|2016-10-31 00:00:00|2016-11-16 00:00:00
EVI_lwr_filt_182|ghana|2016-11-16 00:00:00|2016-12-02 00:00:00 <<-- here
EVI_lwr_filt_183|ghana|2016-12-02 00:00:00|2016-12-18 00:00:00
EVI_lwr_filt_184|ghana|2016-12-18 00:00:00|2017-01-01 00:00:00
Using the following command (by default sampling=contains):
t.rast.aggregate input=EVI_16day_lwr_filt output=bla
method=average granularity=“1 months” basename=bla suffix=gran
I get no aggregated maps for november in 2012 and 2016 (leap years):
bla_2012_09|ghana|2012-09-01 00:00:00|2012-10-01 00:00:00
bla_2012_10|ghana|2012-10-01 00:00:00|2012-11-01 00:00:00
bla_2012_12|ghana|2012-12-01 00:00:00|2013-01-01 00:00:00
bla_2013_01|ghana|2013-01-01 00:00:00|2013-02-01 00:00:00
…
bla_2016_09|ghana|2016-09-01 00:00:00|2016-10-01 00:00:00
bla_2016_10|ghana|2016-10-01 00:00:00|2016-11-01 00:00:00
bla_2016_12|ghana|2016-12-01 00:00:00|2017-01-01 00:00:00
bla_2017_01|ghana|2017-01-01 00:00:00|2017-02-01 00:00:00
I thought it had to do with the sampling method, so I tried systematically with all of them. No one creates maps for nov2012 or nov2016. I thought sampling=starts or started would do, but no…
Is this a bug or no topological relation can actually handle this case?? What are the possible solutions? Manually aggregate per year and month ? Manually change the time stamp of the problematic map ?
Thanks much in advance!
Vero
ps: I use grass trunk, r72636. I attach my tests in a text file. I can share the time series if needed.
(attachments)
tests_aggr.txt (3.63 KB)