In the film "The Martian" (2015), an astronaut played by Matt Damon has to improvise when his crew leaves him behind by accident.

The fictional Ares 3 mission in Andy Weir's novel "The Martian" is based on an actual NASA plan for exploration of the Red Planet. When he is stranded after his astronaut team leaves without him, Mark Watney must struggle to survive. Matt Damon stars as Watney in Ridley Scott’s film of "The Martian."

'The Martian' Movie and NASA: Full Coverage

If you were left on Mars without a spacesuit, you would immediately freeze and choke, then die. The air on Mars is toxic: It’s more than 95 percent carbon dioxide with just a trace of oxygen (0.13 percent). Air pressure on Mars is equivalent to that at about 21 miles altitude (38 kilometers) on Earth. It's cold: planetwide, about minus 67 degrees Fahrenheit (minus 55 degrees Celsius), although it may get up to almost room temperature at the equator, on the hottest summer day.

The Ares mission strategy is to land an empty habitation module (Hab) with supplies and a Mars Ascent Vehicle (MAV) first, before sending humans. Automatic equipment chemically breaks down Martian air into breathing oxygen and fuel for the return trip. Only when the tanks are full does the first expedition leave Earth. This is called in-situ resource utilization, or "living off the land."

The Hab module in the film carries only enough supplies to support Watney for about 300 days, but it will be years before a rescue from Earth is possible. His equipment can make breathable air from the local atmosphere, but food is a problem. Watney, a botanist, figures out how to grow crops on Mars to keep himself alive.

Starting in 2014, real-life astronauts on the International Space Station used the "Veggie" plant growth system to grow edible greens in space.

A proof-of-concept experiment called MOXIE (Mars Oxygen In-Situ Resources Utilization Experiment) will ride aboard NASA's Mars 2020 rover (inset, below). Carbon-dioxide-rich Martian air is flowed over a sandwich of anode and cathode plates. A process of solid oxide electrolysis splits the air into oxygen and waste carbon monoxide gas, which can be dumped back into the atmosphere.

Some of the Ares mission's equipment is powered by a radioisotope thermoelectric generator (RTG). This nuclear generator releases 100 watts of power by means of the heat generated by the radioactive decay of plutonium. Similar generators were used by the New Horizons Pluto probe and on the moon by Apollo astronauts.

The Ares 3 habitat is located on Mars' Acidalia Planitia, a vast plain in the Martian northern hemisphere. Although author Weir describes the plain as flat and easily traversed, satellite photos taken recently by NASA have revealed terrain on the real Acidalia Planitia to be rugged and hard to navigate.

Watney's Ares 3 camp is about 500 miles (800 km) north of the robotic Mars Pathfinder lander that landed in 1997. The one vehicle that is capable of taking Watney off the planet is at the Ares 4 site, 2,000 miles (3,200 km) away in the crater Schiaparelli. Once in orbit, Watney would still be stranded because the Hermes, the Ares 3 mission's mother ship, had already departed.

Watney's Ares 3 base is equipped with two pressurized, electric-powered rovers. Actual NASA plans include a very similar rover, the 14.7-foot-long (4.5 meters) Space Exploration Vehicle (SEV).

The rover's pressurized cabin can hold up to four astronauts in shirtsleeves. A side hatch allows the SEV to dock to another rover or to a habitat module. Two "suit port" hatches allow two astronauts to slide into their spacesuits from the rear.

The wheeled chassis can be used by itself as an unpressurized, stand-up roving vehicle.

The Mars program depicted in the film and in the book features a reusable, International-Space-Station-size mother ship, the Hermes.

In the film, the Hermes is an ion-drive interplanetary spacecraft powered by a nuclear reactor. An external carousel spins to produce artificial gravity for the crew. Solar panels turn sunlight into electricity to run shipboard systems.

A NASA design for a Mars ship uses a bimodal nuclear thermal rocket. "Bimodal" means that the nuclear engine is used for both propulsion and electric power generation. The crew resides in a hab module at the front of the spacecraft. The entire ship is rotated end over end to provide artificial gravity.

The proper alignment for an energy-efficient flight between Earth and Mars occurs every 2.13 years.

Six astronauts are launched from Earth in an Orion crew vehicle. Their capsule intercepts Hermes in "parking orbit" around Earth.

Hermes' ion-drive engines use electricity to propel argon atoms out of the back of the vehicle to create forward thrust. The acceleration is tiny, but the engines fire continuously all the way to Mars, a trip of 124 days.

After arriving in Mars orbit, the crew transfers to a Mars Descent Vehicle (MDV). The crew lands near a Hab module containing supplies prepositioned by previous unmanned missions. Two surface exploration vehicles (SEVs, or rovers) are available for wide-ranging exploration of the Martian surface.

The crew can stay on Mars either 30 days or 500 days, depending on the mission plan. The Ares 3 mission depicted in "The Martian" is a 30-day "short stay" mission.

When the alignment between Earth and Mars is again correct, the crew boards a Mars Ascent Vehicle (MAV) and blasts off. In orbit, the crew catches up to the Hermes and powers up its ion engines for the return to Earth.

When Hermes returns to Earth orbit, the crew disembarks. Another crew boards the Hermes to prepare the ship for another trip to Mars.

Follow us @Spacedotcom, Facebook or Google+.