Eric, I think r.stats has a -z option that allows you omit cells containg zero values. You can combine r.stats with awk to accomplish what you want to do. EX: To get mean value for entire layer: r.stats -zcq {mapname} | awk '{ prodsum += $1*$2; sum +=$2 }\ > END{Average=prodsum/sum; print "Average= " Average}' Good luck Nalneesh Gaur