t.rast.aggregate

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

t.rast.aggregate

Veronica Andreo
Hi all,

I have this MODIS time series of 8-day composite of chlorophyll
concentration from 2003 to 2013. I've already aggregated it by month
(average), so from 506 images I now have 132 (12 x year, 11 years)

but what I need doing now is to aggregate months over the years, what
i want are 12 summary images (one for each month over the 11 years).
How do i do that with t.rast.aggregate?

Thanks a lot in advance! And CONGRATULATIONS on GRASS 7 release!! :)

Vero
_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: t.rast.aggregate

Sören Gebbert
Hi Veronica,
you can use t.rast.series for this kind of task. Use a SQL expression
to select only specific months of a year. Please try this code
(untested, may contain errors):

# January averages
t.rast.series input=monthly_aggregates \
    output=jan_average method=average \
    where="start_time = datetime(start_time, 'start_of_year', '0 month')"

# February averages
t.rast.series input=monthly_aggregates \
    output=feb_average method=average \
    where="start_time = datetime(start_time, 'start_of_year', '1 month')"

# March averages
t.rast.series input=monthly_aggregates \
    output=mar_average method=average \
    where="start_time = datetime(start_time, 'start_of_year', '2 month')"

...


Best regards
Soeren

2014-03-31 17:43 GMT+02:00 Veronica Andreo <[hidden email]>:

> Hi all,
>
> I have this MODIS time series of 8-day composite of chlorophyll
> concentration from 2003 to 2013. I've already aggregated it by month
> (average), so from 506 images I now have 132 (12 x year, 11 years)
>
> but what I need doing now is to aggregate months over the years, what
> i want are 12 summary images (one for each month over the 11 years).
> How do i do that with t.rast.aggregate?
>
> Thanks a lot in advance! And CONGRATULATIONS on GRASS 7 release!! :)
>
> Vero
> _______________________________________________
> grass-user mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/grass-user
_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: t.rast.aggregate

Veronica Andreo
Hi Soeren,

2014-03-31 13:05 GMT-03:00 Sören Gebbert <[hidden email]>:
> Hi Veronica,
> you can use t.rast.series for this kind of task. Use a SQL expression
> to select only specific months of a year. Please try this code
> (untested, may contain errors):
>
> # January averages
> t.rast.series input=monthly_aggregates \
>     output=jan_average method=average \
>     where="start_time = datetime(start_time, 'start_of_year', '0 month')"

Thanks so much for your help! Worked perfectly just removing the
underscore in 'start of year'

Have one question though: is there a way to check which maps were used
to estimate the average (or whatever operation t.rast.series perform)?
Is that information stored somewhere? or is there a way to check prior
to t.rast.series??

Thanks again!
Best,

Vero
_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: t.rast.aggregate

Sören Gebbert
Hi Veronica,

2014-04-01 16:07 GMT+02:00 Veronica Andreo <[hidden email]>:

> Hi Soeren,
>
> 2014-03-31 13:05 GMT-03:00 Sören Gebbert <[hidden email]>:
>> Hi Veronica,
>> you can use t.rast.series for this kind of task. Use a SQL expression
>> to select only specific months of a year. Please try this code
>> (untested, may contain errors):
>>
>> # January averages
>> t.rast.series input=monthly_aggregates \
>>     output=jan_average method=average \
>>     where="start_time = datetime(start_time, 'start_of_year', '0 month')"
>
> Thanks so much for your help! Worked perfectly just removing the
> underscore in 'start of year'

Ooops, sorry for the underscore's.

>
> Have one question though: is there a way to check which maps were used
> to estimate the average (or whatever operation t.rast.series perform)?
> Is that information stored somewhere? or is there a way to check prior
> to t.rast.series??

You can use the same SQL expression in any other temporal command that
support SQL where expressions. For example t.rast.list:

{{{
t.rast.list input=precipitation_1950_2013_monthly_mm@soeren
where="start_time = datetime(start_time, 'start of year', '0 month')"

precipitation_monthly_mm_0 soeren 1950-01-01 00:00:00 1950-02-01 00:00:00
precipitation_monthly_mm_12 soeren 1951-01-01 00:00:00 1951-02-01 00:00:00
...
precipitation_monthly_mm_732 soeren 2011-01-01 00:00:00 2011-02-01 00:00:00
precipitation_monthly_mm_744 soeren 2012-01-01 00:00:00 2012-02-01 00:00:00
precipitation_monthly_mm_756 soeren 2013-01-01 00:00:00 2013-02-01 00:00:00
}}}


Best regards
Soeren

>
> Thanks again!
> Best,
>
> Vero
_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: t.rast.aggregate

Veronica Andreo
Great!!

Obviously I didn't think about that :P

THANKS!!!

Vero

2014-04-01 11:13 GMT-03:00 Sören Gebbert <[hidden email]>:

> Hi Veronica,
>
> 2014-04-01 16:07 GMT+02:00 Veronica Andreo <[hidden email]>:
>> Hi Soeren,
>>
>> 2014-03-31 13:05 GMT-03:00 Sören Gebbert <[hidden email]>:
>>> Hi Veronica,
>>> you can use t.rast.series for this kind of task. Use a SQL expression
>>> to select only specific months of a year. Please try this code
>>> (untested, may contain errors):
>>>
>>> # January averages
>>> t.rast.series input=monthly_aggregates \
>>>     output=jan_average method=average \
>>>     where="start_time = datetime(start_time, 'start_of_year', '0 month')"
>>
>> Thanks so much for your help! Worked perfectly just removing the
>> underscore in 'start of year'
>
> Ooops, sorry for the underscore's.
>
>>
>> Have one question though: is there a way to check which maps were used
>> to estimate the average (or whatever operation t.rast.series perform)?
>> Is that information stored somewhere? or is there a way to check prior
>> to t.rast.series??
>
> You can use the same SQL expression in any other temporal command that
> support SQL where expressions. For example t.rast.list:
>
> {{{
> t.rast.list input=precipitation_1950_2013_monthly_mm@soeren
> where="start_time = datetime(start_time, 'start of year', '0 month')"
>
> precipitation_monthly_mm_0 soeren 1950-01-01 00:00:00 1950-02-01 00:00:00
> precipitation_monthly_mm_12 soeren 1951-01-01 00:00:00 1951-02-01 00:00:00
> ...
> precipitation_monthly_mm_732 soeren 2011-01-01 00:00:00 2011-02-01 00:00:00
> precipitation_monthly_mm_744 soeren 2012-01-01 00:00:00 2012-02-01 00:00:00
> precipitation_monthly_mm_756 soeren 2013-01-01 00:00:00 2013-02-01 00:00:00
> }}}
>
>
> Best regards
> Soeren
>
>>
>> Thanks again!
>> Best,
>>
>> Vero
_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user