Fixed bug with plot names

Fixed a bug where re-use of variable "i" in subscripts lead to incorrect
plot names (and possibly other issues as well).  Also added calculation of
hardness & pH to criteria calculation script.