The dust kicked up during the presidential campaign has obscured this hard fact about the readiness of the American military to go to war:

The Army, Navy, Air Force and Marine Corps today are all in the midst of the biggest peacetime modernization program ever funded.

Congress and the Pentagon, after years of division, are allied in the drive to force the services to fix up the weapons on hand, even if this means foregoing the pet projects of generals, admirals and politicians.

The Joint Chiefs of Staff last month get the key to readiness they have been requesting for years -- more pay for the troops and bonuses for the specialists who keep tanks rolling, ships steaming, planes flying.

The mountain of ammunition shot up during the Vietnam war, including tons that were supposed to stay in Europe to stop a Soviet attack, is building up again.

The report cards showing how ready an outfit is for war are paper estimates which do not tell how the troops would fight when the shooting actually starts. w

"My battalion in one of the hottest fire fights in Vietnam went C-4 during the firefight," recalls Lt. Gen. P.X. Kelley, now commander of the Rapid Deployment Force. "I didn't tell the troops because they were doing so well." A C-4 rating means the unit "cannot effectively perform the wartime mission for which it is organized," to quote the Pentagonese.

And finally, it is a fact obscured by the campaign rhetoric that no army, including the Russian one, can be kept raring to go in peacetime. The troops know the enemy is not at the gate no matter how much their sergeants and officers scream at them to shape up.

So what is all this gloom and doom about readiness, the term applied to the World War II type forces, not the nuclear missiles and bombers that constitute the "strategic" part of the arsenal?

Is it not true that American troops facing the Russians along the NATO front have only enough ammunition to fight full blast for a few weeks? That half the first-line fighter planes are not ready to fight for want of spare parts? That some warships stay tied up at the dock for lack of sailors skilled enough to sail them? That Marines are short of ships for taking them from here to there? That the Army chief of staff has called his Army "hollow?" That the Pentagon's bean counters have rated six of the nation's stateside divisions far from ready to fight?

All true. Some of the news is bad and getting worse. But more of it is getting better.

Take ammunition. "We shot up all our ammunition in Vietnam," said one top Army general in a bit of overstatement, "but now we're getting it back."

Thousands of antitank missiles and tons of ammunition have been sent to Europe since Vietnam. True, there is still not enough there. But the campaign has focused only on the empty half of the glass, not the full half.

Go to almost any Air Force F15 or Navy F14 fighter squadron and the pilots will complain about "hangar queens" -- planes waiting month after month for the parts to make them flyable again. Combat readiness is indeed poor here. Air Force, Navy, Pentagon civilians, White House budget overseers, Congress and the aerospace industry are all to blame.

The services insisted on buying the hottest planes the industry could build, leading to complicated engines like the F100, which powers the F15 and F16 Air Force fighters. The engine proved delicate, prompting the Air Force to acknowledge that it had asked for too much. The older, $25 million a copy F14 is complicated, too, one reason so many of them are down at one time.

But the biggest reason for hangar queens is that executive branch decision-makers allowed the services to buy new planes at the expense of spare parts to keep ones already built flyable. As for Congress, many senators and representatives have forced the Pentagon through the years to buy planes it did not want, like the Vought A7 and two-seater version of the Fairchild A10, to keep factories back home humming. This left less money for the unglamorous spare parts account.

Today, a new emphasis is evident. Congress this year put additional billions in the heretofore stepchild readiness accounts in the Pentagon budget, partly at the insistence of Rep. Jack Edwards of Alabama, ranking Republican on the House Appropriations subcommittee on defense. In preparing the fiscal 1982 budget, the one going to Congess in January, Pentagon civilians put so much money in readiness accounts -- spare parts, training, fuel -- that generals and admirals are now complaining in secret memos that they will not be able to afford to buy as many new weapons as they need.

"We are beginning to turn the corner on this issue," said Edwards in hailing the turnaround on readiness. "More must be done, but we are headed in the right direction. The trend is good."

The news, if not the trend yet, is also good in getting more Navy ships in first-class fighting condition. The problem is not enought skilled boiler tenders, machinists, firemen and supervising petty officers and chiefs to keep warships steaming without accidents. Congress, over President Carter's initial opposition, just passed a 11.7 percent pay rase for sailors and everybody else in the military, sweetened benefits and provided bonuses and more sea pay.

If Adm. Thomas B. Hayward, chief of naval operations, is right in saying more pay was the key to solving his readiness problem, the roughest sailing is behind the Navy. It is too early to cheer, but not too early to be hopeful.

Marine leaders have been complaining for a decade that they need more ships that can take their troopers across the ocean and land them on an unfriendly beach. The new focus on the need to get to the Persian Gulf in a hurry to protect oil fields and straits has loosened the purse strings for both Marine "lift" and high-speed cargo ships.

This still leaves the fact that Gen. E. C. Meyer, Army chief of staff and thus the nation's top soldier, has called today's Army "hollow." Republican challenger Ronald Reagan has hit President Carter over the head with Meyer's characterization several times during this campaign. But Reagan has not gone on to say that Meyer explained that the stateside Army is hollow because it has been stripped of the sergeants and technical specialists needed to keep U.S. forces in NATO up to full strength. This past robbing of Peter to pay Paul is being slowed down to beef up stateside units. Meyer also believes the pay rise will induce more sergeants to stay in the Army, filling in more of the hollowness.

Where the glass is less than half full and worse than half empty is in the Persian Gulf area where Carter, in this year's State of the Union address, pledged to go to war if necessary to protect oil supplies. The United States is still near the bottom of the glass as it equips existing forces to back up Carter's words. There are no allies with big bases the United States could use as launching pads near the Persian Gulf. Egypt will help fill the void, but this will take time. However, the process is under way. It will continue no matter who is elected next Tuesday.

Army Gen. Volney F. Warner, head of the U.S. Readiness Command, recently warned in a tape-recorded interview with The Washington Post that the United States may have to risk losing the 18,000-man 82nd Airborne light infantry division and an especially configured Marine brigade of about 16,000 men to superior Soviet forces to make a stand in the gulf between now and 1985. "That's the kind of thing we ought to think about," he said.

As the military's Mr. Readiness, Warner was asked if the armed services are to blame for the readiness problems that have been in the headlines of late or whether he considered that a bad rap.

"It's a bad rap, and it's not a bad rap. It's a bad rap in the sense that we haven't been getting enough money and have been forced to live off the shelf. So the Air Force lives off its war reserve spares" in peacetime even though those parts are set aside for war. The other services have done the same thing, he added.

"In recent years, in the absence of funds, benign neglect or whatever you want to call it, commanders have been forced into going through heroics just to keep their heads above water and keep operational. That's forced pilots and aircraft maintenance guys to go into war reserve stocks," emergency fuel reserves and other places "just to keep going, and then figure out how to budget it next year to bring emergency stocks back up. It's a regrettable state of affairs, but I wouldn't say the forces are totally unready to go."

Now that the armed services are getting more money than previously to replenish emergency stocks and fix broken weaponry, readiness is almost certain to improve. But it is still an open question of whether the services will spend the money they get for new weapons on the right ones. The record is not reassuring in this regard.