SCOTTISH farming, which enjoyed record returns last year, has been warned to prepare itself for difficult times ahead as a number of hazards emerge which could pose a threat to profitability.

Dairy farmers in particular may be in for a rough ride, with falling milk prices, rising costs and more pressure to comply with ever higher environmental demands.

A projected fall of between 2p and 3p a litre in the price the farmer gets for milk would translate into a fall in income of about #12,000 a year for a dairy farmer milking 100 cows, says Mark Wilken, a senior adviser with the Laurence Gould partnership of agricultural consultants.

While last year showed farm incomes up by more than 30%, he believes there are a lot of changes which have still to show up in farm accounts - beef prices down 20% or more on pre-BSE levels, cereal prices #24 a tonne lower, and potato prices down by as much as #80 a tonne, a disastrous level for producers.

That is before we even turn to the dilemma of the strong pound. There was a time when governments fought hard to promote the worth of sterling on the international front. Now, ironically, the strong pound seems always to be spoken of as a problem.

Recent revaluations - 11% since last July - have eroded the value of the green pound in which European Union subsidy payments are calculated. That, says Mr Wilken, amounts to an effective capping of UK commodity prices. The industry was a big beneficiary of Golden Wednesday when Britain withdrew from the ERM but that honeymoon period is over.

Beef producers have been through a traumatic year with BSE but, broadly speaking, they have been cushioned by the various compensation schemes implemented by the Government. In the months ahead, however, the argument will be that the industry has been given adequate opportunity to adapt to the crisis and must be more self-reliant. That hard-nosed attitude will be no comfort at a time when beef prices have been as low as 90p a kilo liveweight, the lowest level since 1981.

Feed prices remain high, although there is some sign of them beginning to edge down. The most recent wages order represented a 5.4% increase for workers. All of these changes will put pressure on farm profitability.

So the advice from Mr Wilken, given at a farming update in Edinburgh organised jointly with estate agents Savills, is to keep a careful eye on labour and machinery costs, which typically account for about 40% of farming inputs. ''Use contractors where possible and if specialist staff are to be employed ensure that the enterprise is big enough to justify it.''

Expansion of the business to gain economies of scale is not suggested as an easy option, with high rental values and scarcity of land to purchase. ''No-one will be able to expand unless they already have a profitable business. Only about the top 25% of farmers would be justified in considering new farming ventures.''

There may be reservations about farming incomes for the coming year but Charles Dudgeon of Savills is in no doubt that land values are at their highest level for 35 years, with bare land averaging #2000 an acre. Best arable land can fetch #3000 and dairy farms between #1600 and #2000 an acre. He also sees rents at record levels with stock farms on traditional agricultural tenancies realising up to #60 an acre. Farm business tenancies in England and contract arrangements in Scotland could see figures of #100 an acre being achieved for the best arable land.

In the midst of this plethora of record-breaking figures, concerned was expressed that in only three years out of the last 11 have net farm incomes exceeded the amount of grants and subsidies pumped into agriculture.

John McGregor, the senior member of the Laurence Gould team in Scotland, sees the outcry about separate businesses being rolled together for grant purposes as a symptom of a ''modern disease brought about by our dependence on subsidies''.

William Henry, of the Kirkcudbright legal firm of Williamson & Henry, reminded farmers that they should consider themselves to be in an agricultural business which happened to be supported by grants - not a grant-seeking business which incidentally involved farming.