The foam is probably Doc's (Dissolved Organic Compounds) In other words too much decayed matter in the pond. It comes from fish spawing, dead algae, plants, leaves decaying etc. I have it going on in my ponds right now as well. Best way to get rid of it, is clean well (the batting works great) and do many small water changes. It will go away.