Washingtonians have been flocking to the Mall for 99 years to watch their beloved cherry trees blossom. Thousands of tourists flood the city to picnic beneath the low-hanging branches. Their children frolic in the fallen pink petals, and National Park Service employees scold the naughty ones who pluck a fresh souvenir. And yet with all the merriment, probably very few wonder just how the floral extravaganza reproduces itself biologically year after year.

For the scientifically inclined,research by Ove Nilsson of Sweden’s Umea Plant Science Center has revealed a genetic basis for when a plant blooms; he notes that, in a sense, the blossom festival started way back last June.

“The buds that open in the spring and produce these beautiful flowers were actually initiated the year before,” says Nilsson. “The flower initiation takes place in the summer, and the flowers develop through the fall.”

Here’s how it works. Every morning when the sun breaks over the horizon — no matter what time of year it is — a clock starts ticking inside the trees. After a specific number of hours, the plants’ cells start producing high levels of a molecule known as the FT protein. This protein is responsible for initiating processes that help the plant grow.

But the FT protein has a curious property: In the absence of sunlight, it curls up and dies. So when the sun sets, it degrades rather quickly and becomes useless to the plant.

Nilsson thinks this peculiarity is the key to the seasonality of certain flowering plants, including most trees that blossom in the spring.

If a plant is genetically programmed to produce lots of FT protein starting, say, 13 hours after dawn, the molecule will be abundant during the last few hours of daylight in the longer days of summer. And those few hours are enough to kick-start crucial growth processes. So the cherry trees do most of the heavy lifting for the spring festival — bud and flower formation — way back in the summer and early fall.

As autumn progresses and the days shorten, that same 13-hour clock — the number of hours will vary by species and even by individual plant — means that the FT protein will be produced in darkness, and it will degrade before it can work its magic. The trees take this as a signal to drop their leaves and stop generating new buds.

When winter arrives, day length and temperatures both reach their annual nadir. At this point, the plant goes through vernalization, a dormancy period that has enormous importance in protecting the trees, for reasons explained below.

In springtime, one might imagine that the FT protein process would reverse: The days get longer, the FT protein is produced during daylight hours, and the plant kicks off its growth process. Surprisingly, that’s not what happens.

While the cherry trees recognize the arrival of winter by sensing a decline in daylight, they detect the arrival of spring based on temperature. They wait for what’s called a “temperature sum”— basically a bunch of warm days in a row. (The precise temperatures and durations required vary by plant.) When the temperature sum is reached, the blossoms open. Of course, since the National Park Service can’t control the weather, peak blossoming doesn’t always coincide with the Cherry Blossom Festival’s lighting of the stone lantern and the Japanese taiko drummers.

The cherry trees’ habit of marking the start of winter by daylight and the end of winter by temperature is reversed in some other plants. Plant biologists, for example, base much of their genetic research on Arabidopsis thaliana, or mouse-ear cress, a small plant that belongs to the same family as cabbage. (“It’s the laboratory rat of the plant world,” says Nilsson, because its small genome enables researchers to closely observe its genetically based behaviors. ) The plant measures the arrival of winter by a drop in temperatures and decides when to flower in spring by day length.

While Washington’s cherry trees have managed to mark the change of seasons using light and temperature for nearly a century, global climate change offers a potential challenge to the system because it could undermine the vernalization process.

You know those heat waves that sometimes occur in January, when the mercury rises above 70 for a few blissful days? They — much more so than the snow flurries that show up surprisingly in March — are exceedingly dangerous for the cherry trees. If it gets too warm too early for too long during the winter, a tree could take it as a sign that spring is here. The buds would start to open, and they would offer up their fleshy seeds to birds, which would digest and scatter them on the ground. However, when the temperatures drop, as they always do at the end of an oasis of winter warmth, the seeds would fail to germinate and grow, foiling the trees’ reproductive process.

That’s where vernalization comes in. While they’re in this dormancy period caused by the cold and shortened days, the trees know not to crack open their buds in response to a few warm days.

But rising global temperatures could prevent appropriate vernalization. If the plants never go dormant, they would interpret spring as an unexpected winter warmth and refuse to open their buds. Their reproductive processes, therefore would never get off the ground.

Even if it never gets warm enough to foil vernalization, there are other possible problems associated with climate change. Many plants rely on pollinators to spread their genetic seed around. But those bats, birds and bees might not react to climate change in the same way as the plants they interact with, and the calendars of the plants and pollinators could go completely out of sync. If that happens, it could mean trouble.

So when you’re eating your pretzel and enjoying the show on the steps of the Jefferson Memorial this week, don’t be too hard on the kids who can’t resist grabbing a blossom or two from the cherry trees. The real threat to the festival may be the adult driving a car in from the suburbs.

Palmer is a freelance writer based in New York. He is a frequent contributor to The Post and to Slate.com.