IN Costa Rica's damp forests, parrot calls stir up a racket as bright green birds traverse the trees. Monkeys howl warnings from above, and butterflies create a multicolor extravaganza. Under the intense tropical sun, crops of rice and sugar cane are maturing, cattle are fattening, and men swing machetes in the endless effort to keep the encroaching vegetation away from roadways and front yards.
This tiny Central American nation - about the size of Denmark - contains nearly as many bird species as all of North America, more species of insects, and nearly half the number of plant species. Its tropical forests, climbing from sea level to mountain tops, offer a stunning variety of environments and habitats.
In such a riot of life, ``ecological crisis'' seems a ridiculous concept. But economic problems, including one of the largest per-capita foreign debt burdens in any country, combined with a growing population, have led an assault on the forests. The desire to clear land for farming and cattle-grazing spurred, until very recently, one of the world's highest rates of deforestation.
Costa Rica is responding to the crisis - a response that is attracting worldwide interest. The nation has brought 25 percent of all land under government protection, about half of that under absolute control.
``We feel that we are in many ways a global pilot project,'' says Alvaro Umana, Costa Rica's minister of natural resources, energy, and mines. ``We have a bigger responsibility to make it because if it doesn't work here, it may not work anywhere.''
One of the oldest democracies in the world, Costa Rica has a peaceful, healthy, and well-educated populace - mortality and literacy rates similar to those of the United States. The country disbanded its military in 1948 and remains demilitarized.
Starting in the 1950s, Costa Rican leaders decided that large pieces of land had to be protected to meet the country's development goals, says Alvaro Ugalde, who headed the nation's National Parks Service for 12 years.
Watersheds, possible sites of tropical forest research, and useful plants and animals needed protection. Protected areas could also attract tourists and, leaders were convinced, produce more economic benefits for local people than farms and ranches. And protection would conserve the national heritage and give local people ``recreation and intellectual stimulation,'' says Mr. Ugalde.
The economic and cultural tie-ins are ``what's unique about what Costa Rica is doing,'' Mr. Umana says.
Rodrigo Gamez, special adviser on natural resources to Costa Rica's President, Oscar Arias, puts it this way: ``There is no future, in our opinion, for these [protected] areas if they do not fulfill a function that is immediately perceived as favorable by ... the people who live nearby. The moment people are starving, the moment they have needs, they'll start turning to the parks to meet those needs.''
The nation is rapidly moving toward consolidation of about two dozen protected areas into seven ``megaparks'' over the next five years, says Mr. Gamez.
Local residents are being incorporated into park operations as rangers, biologists, teachers, and in some cases homesteaders. It is hoped that local people will build, own, and operate tourist facilities. Educational programs targeted mostly at the young seek to instill an understanding of ecological interdependence.
The international community, recognizing the combination of biological diversity, political support, and favorable research conditions, has poured money and talent into Costa Rica.
Dan M. Martin, director of the World Environment and Resources Program of the John D. and Catherine T. MacArthur Foundation in Chicago, which has donated nearly $2 million to Costa Rica, says the country merits the money because ``you can get things done there. Scientists are not interfered with.''
Costa Rican money has been the major source of funds needed to implement the plan, but officials have multiplied its power in recent years through the mechanism of the Debt Swap for Nature Program.
It works like this: International conservation organizations purchase some of Costa Rica's $4 billion external debt from foreign banks at less than 20 percent of face value (reflecting bankers' judgments of how likely they are to be repaid). The Central Bank of Costa Rica then buys the debt from these groups with short-term interest-bearing government bonds, provided the money is used to purchase land for preservation.
The result is that Costa Rica retires some of its debt, roughly quadruples the value of the debt purchase, applies it to preservation of its own land, and does it all in Costa Rican currency - not scarce US dollars.
More than $40 million has been invested in this manner so far. Umana calls it ``a critical input at a critical time.''
The success of Costa Rica's environmental program is by no means assured. The economic crisis has worsened. War in Nicaragua to the north, plus drug-running and money laundering to the south, has brought refugees and corruption, which add further burdens.
Net forest cover in the country has declined steadily despite all efforts, and though decline may have been halted this year for the first time, loss of biological diversity continues.
President Arias, winner of the 1987 Nobel Peace Prize for his Central American peace plan, has warned that no country in the region can meet its goals without a lessening of regional social, economic, and political tensions. But Costa Ricans remain confident.
``The commitment of Costa Ricans is very strong,'' says Stephen Viederman of the Jessie Smith Noyes Foundation in New York. ``Short of an economic disaster, I think they can hold onto their gains.''
Ugalde, now a San Jos'e-based consultant for the Nature Conservancy in Washington, D.C., stresses that the Costa Rican formula, important because it comes from a developing nation, can work elsewhere in the tropics if adapted to local conditions.
``Somehow, if you start creating good precedents, you can build on them,'' he says.