I have MODIS NDVI images, which needs to be masked with VI_Quality. I am using GRASS software and executing GRASS commands using shell scripts. I need to perform raster calculation (multiplication) for NDVI images with the VI_Quality. I want to multiply ith NDVI image with the ith image of VI_Quality. I have used the following codes :
for file in $NDVIFILES; do r.mapcalc "$file = $NDVIFILES * $QAFILES; done i=1 for file in $NDVIFILES; do r.mapcalc "file $((i++)) = NDVIFILES $((i++)) * QAFILES $((i++))"; done
I am unable to do this raster multiplication in a loop. Please let me know the correct syntax to do this operation.