In a cavernous shed on an East Lothian farm last week, a group of farmers stamped their sturdy wellies and nursed cups of coffee, hoping to raise a little warmth.

Outside the wind howled around old stone buildings with pantiled roofs. Indoors, every conversation was spelled out in frosted breath. Yet these people had more important things to worry about than chilblains. The irony of standing shivering would not have been lost on anyone, given the subject that had brought them together from all across the county, and beyond.

This meeting was part of Farming for a Better Climate, a government-funded initiative run by the Scottish Rural College (SRUC). We were at Castlemains Farm in Dirleton, near North Berwick, a mainly arable farm which has been in the Simpson family for 123 years. Cows shuffling in their byre stood only yards away from the tumbledown walls of Dirleton Castle, but while it might look picturesque, as the farmer Bob Simpson hinted, the historic location had made getting planning permission for wind turbines difficult.

That, however, is the least of the problems he and others like him face. Castlemains is the latest of the SRUC's focus farms, which are gradually covering the country, from Jedburgh to Sutherland. For three years, every aspect of the way it is run will be scrutinised. The aim is not to point the finger of guilt, but to help Simpson, and others, save money and time as well as reduce their environmental impact.

As the day proceeded, farmers heard talks by specialists addressing such topics as energy efficiency and fertilisers, crop rotation and recycling. It was soon clear that this was no mere outing. A young farmer from Midlothian told me that people like her must embrace new ways of doing things if they are to thrive. "There is no U-turn," she said.

Another spoke eloquently of experimenting with cover crops and machinery on her farm in the Lammermuir hills, both of which are improving the quality of soil and drainage. In the same session, one of East Lothian's farming aristocracy said he found malting barley was good for the nitrogen levels in his fields, while another expressed fears about the weeds more eco-friendly practices might encourage.

I could go on, but I would soon be far out of my technical depth. As was abundantly evident, the modern farm is an intensely scientific and strategic business. Most agriculturalists could out-class a botanist in their understanding of plants, and match a chemistry teacher's knowledge of phosphorous, potassium, lime and nitrogen. And no wonder. According to one SRUC speaker, in terms of global warming farming comes a close second to transport for the size of its carbon footprint. Whereas the main culprit in everyday life is usually carbon dioxide, in farming the true villain is methane, which is 25 times more harmful. Farms produce industrial levels of this greenhouse gas, partly as the result of fertilisers and the fermentation of slurry, and partly from what is politely known as enteric fermentation, namely the methane that cattle emit from both ends.

It seems that 2012 was a watershed for many in the business. The dire effects of this annus horribilis, thought to have been the wettest year in 100 years, were evident to all, and no-one could remain in denial. Keen to reach ambitious targets it has set for carbon footprint reduction, the government is eager to enlist the support of this most crucial community. And on the evidence of the day at Castlemains, the feeling is mutual. Simpson admitted he was initially sceptical about taking part, but was gradually won over. His decision was affirmed the day he signed up to the project, when a newspaper headline announced that eight of the 10 warmest years on record had occurred since the millennium.

For an onlooker, Farming for a Better Climate is an eye-opener. Not only does it show that small changes can make an enormous difference to agricultural performance, but it demonstrates the complexity of farming practice, and the ways in which cutting-edge science can help. One of the oldest occupations in the world, some of its methods have barely changed since the days of Piers the Plowman.

That, however, could soon change. A press release in the hand of one of the SRUC staff caught my attention. Titled 'Sat Nav and the Art Of Ploughing', it suggested that long before driverless cars reach the roads, country fields will be ploughed and sowed, fertilised and harvested by unmanned tractors. It's a long way from a team of Clydesdales pulling a plough, and the prospect of an empty tractor is unsettling. To judge by the Castlemains group, however, such a futuristic advance would not scare them. It would be only one further step in making sure their farms, and the planet, survive.