Mark Watney is alone, on Mars, four years away from rescue - and with only enough food to last him a quarter of that time. But hope is literally sprouting from the ground: a tiny seedling, the size of his fingernail, is the first sign of life of Mars. "Hey there," he greets it.

As shown in the trailer for The Martian, Watney (played by Matt Damon), who is a trained botanist as well as an astronaut, goes on to triumph: creating a greenhouse in the "Hab", the temporary structure left by Nasa on Mars, generating water by combining hydrogen and oxygen, and using the packeted excrement generated by himself and his colleagues as fertiliser.

What isn't pointed out by Ridley Scott's film – apart from the subsequently discovered existence of water on the planet – is that farming on Mars has been something international space agencies have been working on for years. In The Martian, the plants are there purely to provide Watney with food. But Nasa's reasons for wanting to turn astronauts into gardeners go far beyond mealtime.

On August 1, US astronauts ate red lettuce leaves that had been grown in Veggie, the tiny, temporary greenhouse on the International Space Station, for the first time. It was the second crop they had successfully grown, but the first had to be frozen and returned to Earth to be tested for food safety.

Why was this such an important milestone? There are a number of reasons, but most of them are similar to why we grow crops on Earth: self-sustainability is a good thing whether it's in your home planet or otherwise. If astronauts can grow their own food in space and on other planets, as with Watney, it will allow them to extend their stay away from Earth.

There's practical considerations too. Gioia Massa, the scientist behind the Veggie project told American radio station NPR: "It's expensive to send food, and food is heavy [due to the packaging needed]". With long trips planned to Mars in the future, growing food could cut these costs.

Furthermore, if humans ever wanted to live on another planet, knowing how to farm there would help considerably. As Heather Hava, who works with Nasa at the University of Colorado Boulder to make robots and equipment to grow space crops, says: "If the earth one day is no longer inhabitable, we can still progress by moving off our home planet and into the solar system. The work we're doing now is going to ensure that capability in the future."

But, and almost as important as all of the above, is that it keeps astronauts sane.

An astronaut aboard ISS enjoys freshly grown lettuceCredit:
Nasa

Nasa went to great pains to give the lettuce grown in Veggie look like lettuce, using green LEDs as well as red, even though using solely red lights would be much more efficient. red ones are much more effect

The impact on those actually in space stretches far beyond an improvement on eating re-hydrated broccoli. Ray Wheeler, in charge of the Advanced Life Support department at Kennedy Space Centre told CNet that fresh food could "have a positive impact on people's moods and also could provide some protection against radiation in space."

Reports from the Veggie project found that astronauts enjoyed growing their lettuce plants and found nurturing them a fun interruption in the long, boring stretches of space travel. Many would like to have more plants in space.

Green life (flowers have also been planted in Veggie, as part of an experiment to see how pollination happens in zero gravity) works as a reminder of home within the sterility of a space rocket.

In particular, Hava has found, the smell, touch and sight of growing life is welcome in space: "the sensory enrichment of nature contrast[s] the stark machine environment typical of space habitats."

In short, the simple pleasure of growing your own crops is even more beneficial in space, where it's been achieved against the odds. As Massa says: "The psychology of having something growing you can eat, it's very satisfying." As an added bonus, space habitats stink: plants clean the air and make the place smell good.

But how difficult is it to grow crops in space? The astronauts who are testing farming products are in a simpler position than Watney: they have seeds, for one, and water for another. The Veggie unit, for instance, comes with UV lights you'd find in normal greenhouses and a bellows-style contraption that pumps oxygen our and carbon dioxide in.

Underneath the seedlings are "plant pillows", in which seeds and fertilizer are kept inside wicking material with access to water - this has been a little more temperamental, but basically, all necessary elements of life are there.

Hava's team have been working on two pieces of kit: a kind of space terrarium called Spot, which gives plants their own microclimate and allows data about what's growing to be transmitted, and Rogr, a remotely operated gardening rover robot.

Spot and Rogr work together: the latter has a little forklift-style shelf which allows it to transport Spot around, and can water, inspect and harvest any plants growing inside Spot. Both have been working in conjunction in Antartica, the closest environment to a long space excursion on Earth, where scientists spend months at a time in blizzard-prone isolation.

"If the earth one day is no longer inhabitable, we can still progress by moving off our home planet and into the solar system. The work we're doing now is going to ensure that capability in the future."Heather Hava

The scientists who have been spending winter at the South Pole have been interracting with plants in tktktk, and getting data back on how they are growing thanks to Spot and Rogr. Plus, back at Nasa, scientists will be able to find out how the plants are growing, if the scientists are looking after them, and, if they are, what their favourite bit of gardening is.

There's currently a greenhouse at the South Pole, and scientists there have reported enjoying spending time there: the smell, the rare warm environment, to check up on how things are going.

Before he started offering people more extravagant adventures, Space entrepreneur Elon Musk had a simple dream: Mars Oasis missions: "send a small greenhouse to the surface of Mars, packed with dehydrated nutrient gel that could be hydrated on landing. You’d wind up with this great photograph of green plants and red background— the first life on Mars, as far as we know, and the farthest that life’s ever traveled."