As Tanzania is plunged into an unwanted war with Uganda, spirits are high but the economic realities are much more gloomy.

"I could weep," commented an American nun who has worked here for eight years. "The economy was just beginning to pick up. This war will be disastrous."

Tanzania, one of the world's poorest countries, has little play in its economy. The strains of this week-old war are aready being felt, most noticeably in the transport system. Trucks, buses, trains and airplanes have been commandeered to carry men and armaments to the war front.

Dares Salaam's public transporation, never very good, has declined, causing people to wait hours or walk miles to get to work. Some airline flights have been canceled or closed to civilians.

Anticipating that the situation will worsen, city dwellers have begun stockpiling basic foodstuffs and gasoline, thus causing shortages. Residents are resigned to doing without fruits and vegetables which will no longer be transported to the capital.

In the countryside the economic impact will undoubtedly be more severe, if not as immediate. The country's overtaxed and unreliable transport system is, even without the war, hard put to handle collection and distribution.

Important exports crops such as cotton, cashew nuts and coffee, have been lying in villages for months, often poorly protected from rain and rodents, awaiting transport to the Dar es Salaam port. Peasants are also waiting to be paid for the crops. The planting season is just beginning, but vital supplies of fertilizer are still lying in Dar es Salaam. Wwith war, these conditions can only worsen.

Industries, also, are bound to suffer.In the past nine months there has been something of an economic revitalization after five years of recession, brought on by poor harvests and skyrocketing costs of imports.

Early this year Tanzania's socialist President Julius Nyerere announced a more liberal policy toward private investment. Since then enormous amounts of local - but not much foreign - capital has been brought into circulation. Dozens of new factories have opened and many more are on the drawing board.

Then, about a month ago, the Bank of Tanzania found that the country's foreign reserves were almost depleted. Import licenses were sharply restricted and many new industries have ground to a halt. The reasons for the crisis are unclear, probably a combination of miscalculations and falling world prices for exports like coffee and tea.

With the war, what appeared to be just a temporary financial setback may turn into a more permanent problem. Knowledgeable observers predict that if the conflict with Uganda continues, all foreign exchange will have to be used to fuel the war machine.

One Western economist residing in Tanzania noted that wars fought by European and American countries have stimulated industrial production and could do the same here. But this seems unlikely, for conditions in a Third World country are so different. Tanzania is capable of producing little, except food, that is necessary to fight a war. The choice between importing guns or butter is very clear: The country cannot afford both.

One sector already feeling the impact of the war is tourism. In the past year Tanzania has poured tremendous resources into tourism hoping to build it into a major foreign exchange earner. Just last week Tanzania negotiated a $20 million loan to improve and expand tourist facilities.

Tanzania is entering what should be its big tourist season. But tourists are wary of trouble spots. Already some tourists in Dar es Salaam's beach hotels have left early. Undoubtedly many others will decide to take their winter vacations elsewhere.

The effect of the war on foreign aid and loans is more difficult to predict. Tanzania is one of the world's largest recipients of foreign of World Bank loans. According to one expert, even without the war Tanzania will need $200 million in 1979 for balance of payment financing. Negotiations for aid are currently under way with the international monetary fund.

One international aid agency official commented: "If it continues to be clear that Uganda is the aggressor, then the war might make donors more willing to contribute to Tanzania. but if Tanzania does not stop at the Ugandan border, this could change the picture very quickly."