was it a clear green or a cloudy green?
the foaming makes me suspect an algae bloom but if the green got worse as the chlorine level went up that could be iron (which colors the water yellow so it looks green against the blue liner) or copper (which colors the water green from the getgo).

My gut level feeling is that you have a algae bloom that that is what is making the water green but a full set of test results would be a good starting place. When you report chlorine readings it would help a lot if you report both FC anc CC since that will tell us what we need to know. I susepct that you have been reporting FC readings and that the CC readings have been much higher.

Algae will not always be on the sides of the pool. Green water is often caused by the free floating algae in the water.