Hi,
I’m searching for a GRASS command that is able to “accumulate” a raster following the flow accumulation output obtained by r.watershed.
In other words if I have a temperature raster I would like to accumulate the temperature values following the drainage direction. The final results would to get the mean of the uppers stream temperature (so accumulation_temperature / flowaccumulation).
r.accumulation input=temperature flowaccumulation=flow accumulation output=acc_temperature
It is something that exist?
Thank you
Giuseppe
···
Giuseppe Amatulli, Ph.D.
Research scientist at
Yale School of Forestry & Environmental Studies
Yale Center for Research Computing
Center for Science and Social Science Information
New Haven, 06511
Teaching: http://spatial-ecology.net
Work: https://environment.yale.edu/profile/giuseppe-amatulli/
Hi:
There’s an option to the r.univar module that takes a “zones” raster, and calculates univariate statistics for each zone. Statistics like mean, max, count, etc are calculated from the input raster for each category in the zones file. The zones, in your case would be basins from r.watershed, So you could do:
r.univar map=temperature zones=basins output=temperature_stats
I’m not sure this is what you want, but it might get you started…
···
On 05/05/2018 09:51 PM, Giuseppe Amatulli wrote:
Hi,
I’m searching for a GRASS command that is able to “accumulate” a raster following the flow accumulation output obtained by r.watershed.
In other words if I have a temperature raster I would like to accumulate the temperature values following the drainage direction. The final results would to get the mean of the uppers stream temperature (so accumulation_temperature / flowaccumulation).
r.accumulation input=temperature flowaccumulation=flow accumulation output=acc_temperature
It is something that exist?
Thank you
Giuseppe
–
Giuseppe Amatulli, Ph.D.
Research scientist at
Yale School of Forestry & Environmental Studies
Yale Center for Research Computing
Center for Science and Social Science Information
New Haven, 06511
Teaching: http://spatial-ecology.net
Work: https://environment.yale.edu/profile/giuseppe-amatulli/
_______________________________________________
grass-user mailing list
[grass-user@lists.osgeo.org](mailto:grass-user@lists.osgeo.org)
[https://lists.osgeo.org/mailman/listinfo/grass-user](https://lists.osgeo.org/mailman/listinfo/grass-user)
--
Micha Silver
Ben Gurion Univ.
Sde Boker, Remote Sensing Lab
cell: +972-523-665918
Thank Johannes!!!
right! I make some test and yes if you provide the flow=temp the output accumulation will be the accumulation of the temp weighted by the area of each cell.
So if i divide temp_accumulation / flowaccumulation i get the upper-stream mean temperature.
Thank you very much
Giuseppe
···
On 5 May 2018 at 16:21, Johannes Radinger <johannesradinger@gmail.com> wrote:
Giuseppe,
you could use the “flow” option in r.watershed: flow=temperature (result=accumulative temperature in drainage basin upstream). And then you could calculate another run of r.watershed with a flow map with values =1 (result = accumulative drainage basin upstream, cell count). Dividing both maps provides a map of average temperature upstream.
HTH
J
–
On Sat, May 5, 2018 at 8:51 PM, Giuseppe Amatulli <giuseppe.amatulli@gmail.com> wrote:
Hi,
I’m searching for a GRASS command that is able to “accumulate” a raster following the flow accumulation output obtained by r.watershed.
In other words if I have a temperature raster I would like to accumulate the temperature values following the drainage direction. The final results would to get the mean of the uppers stream temperature (so accumulation_temperature / flowaccumulation).
r.accumulation input=temperature flowaccumulation=flow accumulation output=acc_temperature
It is something that exist?
Thank you
Giuseppe
–
Giuseppe Amatulli, Ph.D.
Research scientist at
Yale School of Forestry & Environmental Studies
Yale Center for Research Computing
Center for Science and Social Science Information
New Haven, 06511
Teaching: http://spatial-ecology.net
Work: https://environment.yale.edu/profile/giuseppe-amatulli/
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user
Giuseppe Amatulli, Ph.D.
Research scientist at
Yale School of Forestry & Environmental Studies
Yale Center for Research Computing
Center for Science and Social Science Information
New Haven, 06511
Teaching: http://spatial-ecology.net
Work: https://environment.yale.edu/profile/giuseppe-amatulli/