Last updateFri, 12 Jul 2019 7am

Inventing a computer program to save Mexico’s forests

Not long ago I was told that Javier Vergara, one of my neighbors in Pinar de la Venta, was carrying out a most unusual project inside the Primavera Forest.

pg9a“It has something to do with solving erosion problems caused by heavy rainfall,” I was told. “You ought to interview him.”

So I contacted Vergara, pulled out my recorder and sat down with him.

“I was born in Tlaquepaque,” Vergara told me in excellent English.  “I got a B.A. in computer engineering from ITESO and then I worked for IBM for several years doing Systems Development and Analysis. Then I got an M.A. in Applied Economics at the University of Michigan at Ann Arbor and after that I began a Ph.D. program in Information Technology at the University of Guadalajara.”

“Wait a minute!” I interrupted. “How did the background you just outlined ever lead you to work on solving problems in forests?”

Vergara then told me he had also spent some years in Monterrey doing evaluations of investment projects to determine to what extent the projects were attractive from a financial standpoint. “And then,” he added, “I got a job at the National Headquarters of CONAFOR (the National Forestry Commission) here in Zapopan and worked for them for seven years.”

At CONAFOR, Vergara used his skills to deal with outside organizations contracted to carry out external evaluations of the Commission’s subsidy programs, which promote the development of Mexico’s forests. “After that I got a job working with people doing applied Geophysics and I learned about laser technology for precision mapping not only of the surface of a forest but also of what lies beneath the surface: Is it rocky? Sandy? Full of holes? Is there water there already?”

During his years with CONAFOR, Vergara developed a soft spot for forestry and when he began to think about a project for his Ph.D., he decided to “do my bit for forests.”


For the next five years, Vergara applied his computing skills to create a program system which simulates the effects of a storm event on a hilly forest cut by ravines. As a model, he used an actual 100-hectare section of the Primavera Forest located just west of Guadalajara. New laser-based technology is used to overlay a three-dimensional mesh on this surface, creating cells measuring ten by ten meters. The program takes into account not only the surface, but the subsurface as well. It simulates rainfall and shows how much of this water is retained and how much becomes runoff. It can also show what a storm does to the very same area after a forest fire has swept through it.

“Look,” said Vergara, “I’ll show you a simulation of an actual event, a particularly bad storm which hit my hill in the Primavera Forest on June 27, 2016. The storm lasted 92 minutes with an intensity of 50 millimeters, which is considered violent rain.”

On the computer screen I saw a mesh representation of the hill and ravines. As minute after minute ticked off at the top of the screen, blue shading appeared, showing water accumulation, movement and flooding.

With only a click, Vergara switched from this simulation of rain and runoff to a view of the same hill protected by what forestry people call “land remediation controls” to minimize rainfall runoff and to maximize rainfall infiltration. These controls, designed by algorithms, could take the form of terraces, retaining walls or strategically placed ditches.  In practical terms, this means that after a forest fire, a ranger could sit down, run Vergara’s program and a few minutes later send out a crew to build stone walls or dig ditches of predefined sizes at strategic points which they can locate out in the forest by GPS. This could minimize the erosion damage that would otherwise occur perhaps several months later when the rainy season arrives.

Vergara’s thesis project was inspired by the work of Jesús León Santos, an indigenous Mixtec farmer who, at the age of 18, decided to change the landscape of his homeland, the barren, dusty Mixteca Alta in Oaxaca, which is “one of the most arid places on earth,” thanks to the deforestation and grazing introduced by the conquistadores.  To remedy this, León employed terracing techniques used by his pre-Hispanic ancestors and when the benefits were seen, more and more local people joined his organization, the Center for Integral Small Farmer Development in the Mixteca (CEDICAM). Over a period of 25 years, León and his friends managed to bring erosion under control and to plant around four million native species of trees that did well in the local climate. They also developed an agricultural system that did not require pesticides.


“Today, the miracle has happened,” notes the organization Proméxico. “The Mixteca Alta is restored. It is green once again. Aquifers have filled up with more water. There are trees and crops. And people remain to live on their land.”

In 2008 León was awarded the Goldman Environmental Prize, the equivalent of the Nobel Peace Prize for work in ecology.

Vergara’s doctoral thesis is entitled “Forest rainfall infiltration and runoff: a simulation and optimization system.” If you’d like to read it (it’s in English), just do a Google search for “Forest rainfall infiltration and runoff.” This will lead you to a University of Guadalajara page where you can access the thesis by clicking on the “Visualizar/abrir” button.

Vergara hopes to find financing to continue his research. He would like to add the removal and redepositing of soil during storms to his simulation and optimization system and to develop it into a program that provides additional support for reforestation projects, which woodland conservationists could adapt to their particular needs.

No Comments Available