The bubbles you see is are the formation of a crude soap on the bark of a White Pine. During dry periods salts, acids and other particles from the air coat the surface of the bark. When it rains, these mix with the water and form a solution. The foam is from the agitation of the mixture when it encounters a barrier (bark) during its flow toward the ground.
As to why this occurs primarily on pines, botanist Ken Sytsma states, “Pines produce a whole array of natural hydrocarbons for herbivory defense. One set of these is “pine tars” that have been used in the past to make soap. As precipitation works its way down trunks of pines, they accumulate these compounds. What you may be seeing is natural pine soap in the making.” (Thanks to Brenda & Steve Hillier for Mystery Photo idea.)
The female, or seed, cones of most pines take two seasons to mature, and the cones of White Pines are no exception. While their tiny male cones live only a few months in the spring, until their pollen has been dispersed and they drop to the ground, White Pine seed cones develop over two summers. This means that both last year’s cones as well as this year’s can be seen on a White Pine right now. After the seeds in last year’s cones have been dispersed (some time this fall or winter), the cones fall off the tree. In late winter, you will find mostly year-old cones on White Pines; new cones will develop next summer to replace the cones that fall off the tree this winter.
Naturally Curious is supported by donations. If you choose to contribute, you may go to http://www.naturallycuriouswithmaryholland.wordpress.com and click on the yellow “donate” button.
When a white pine has been infected with white pine blister rust (a fungus), cankers appear on the branches and sometimes the trunk of the tree. A large amount of sap-like ooze flows from the cankered areas, sometime drying and resembling a sugary-looking crust or film. These areas are, in fact, high in sugar content, and rodents frequently chew them. It’s likely that a red squirrel visited and sampled the infected white pine in the photograph, leaving a freshly-gnawed patch in the bark.