I wish to carry out a raster calculation on a batch of rasters.
I want to add rasters by month, as identified by their file name.
I.e. all rasters within the month of January should add together and output a single jan.png/raster file. Then all the rasters within Feb should add together and produce a single FEB.png.
Rather than manually write a new rast calc expression for each month, I would prefer to automate it via either python or modelbuilder.
My plan outline is as follows:
Input Files. 36 Weekly raster files
(raster1+raster2+raster3+raster4)/(raster1+raster2+raster3+raster4) = month.png
output. 12 rasters for each month.
is it possible to write a python expression or create a modelbuilder which will add rasters by month using their filename?
I have built a model, however this only runs on the rasters I provide it, requiring me to write a new expression each time. In other words it's the same as manually running raster calculator and writing a new expression for each month, I wish to automate this via modelbuilder.