THE YEARS during which John Block has been secretary of agriculture have been disastrous for farmers -- but it has not been John Block's fault. The boyish-looking Illinois hog farmer had the bad luck to hold office in a period when world ability to produce food outstripped world ability to buy it. Adjusted for inflation, net farm income was lower in 1983 than in 1933, in the midst of the Depression. It has risen since but remains below the levels of the 1970s. The secretary now leaves office at the start of an election year having helped bring on a farm bill that may slowly put production back in sync with demand. To do that will mean putting more farmers out of business. It has not been an easy or pleasant process in which to have a role. Not least of Mr. Block's accomplishments t, in personal terms, he has come through it honorably and well.

Agriculture has been like many other issues in the Reagan years; broader economic policy has mattered more than the particulars of farm policy. President Reagan came to office facing the highest inflation rates since 1946, the year that the economy was freed from price controls after World War II. Instead of seeking in the customary way to restrain the economy, the president's response to the inflation was to cut taxes, increase spending, particularly for defense, and run extraordinary deficits. The Federal Reserve Board, fearing that the deficits would fuel the inflation, restricted the availability of credit. This lifted interest rates and helped produce a deep recession. The entire world economy was weak; world demand, including that for food, was low. U.S. farmers lost even more markets because of the strength of the dollar. Held up in part by those high interest rates, it made U.S. products costlier and less competitive abroad.

What can a mere agriculture secretary do in circumstances such as these? Prices fell, farm surpluses and government support costs rose. In 1980 federal farm support costs were $7.4 billion; by 1983 they were $21.3 billion. Mr. Block's department paid farmers not to grow by giving them crops from the storage bins. Farmers still failed; the secretary's own extensive farming operations were curtailed. So many loans went bad that Congress this year had to restructure and bail out the farm credit system.

One response to these losses would have been to increase government supports in this year's bill. The administration moved to lower them instead, on the sound theory that agriculture had to be weaned from the government and returned to the market. The politics of this were difficult. Mr. Block played an important role as broker, helping temper the worst instincts of both sides. The bill that emerged is a healthy compromise between the needs to be merciful and firm. As he leaves, John Block should be proud of that.