Skip to the content
logo mainlogo darklogo light
  • HOME
  • Project
  • EXPERIMENTS
  • PLAY
  • Credits
logo main
  • HOME
  • Project
  • EXPERIMENTS
  • PLAY
  • Credits
HomeExperimentsCoding Mars: temperatures on the surface of Mars

Coding Mars: temperatures on the surface of Mars

OK, did you like coding with Scratch? Let us go to some more serious stuff: Python is a very widely used programming language in science. It is open-sourced, multiplatform very flexible. It is based on commands, but these are very close to human language and its use is quite intuitive.

 

TIME

4-6 hours

MATERIALS 

  • Computer
  • Internet connection
  • Python script provided (plot_GCM_temperature.py)

OBJETIVES

  • Getting comfortable installing software
  • Understanding the general flow of a program/script
  • Making simple changes to code
  • Interpreting a scientific plot
  • Learning about seasons on Mars
  • Learning about day/night temperatures on Mars

INSTRUCTIONS

1. Install Pycharm community free version https://www.jetbrains.com/pycharm/download.

2. Start Pycharm.

3. At the bottom of window, select “Python Packages”, search for ‘matplotlib’ and install the package, check to ensure the ‘numpy’ package is also installed

4. Select ‘open file’ and open the provided script

5. Check it out, there are some comments inside (lines starting with #) explaining what it is doing.

6. Run the script using the green triangle play button at the top right, a plot should appear.

Analyse the plot, what is it showing,

7. Discuss results, the difference between winter and summer, night and day.

8. Perhaps change the temperature scale from Kelvin to Celsius and compare with typical Earth values.

Mars’ orbit around the Sun.

EXTRA

Mars Facts

  • Mars is tilted on its rotational axis (like the Earth), and its orbit around the Sun is more eccentric than the Earth
  • One Martian day (called a sol) is 24.66 Earth hours long
  • One Martian year is 668.6 sols long, which is 687 Earth days, almost 2 Earth years
  • We use the term “Solar Longitude (Ls)” to describe the path of the planet around the Sun starting at Ls=0 marking the spring equinox in the Northern Hemisphere. So, Ls=90 is Northern summer, Ls=270 is Northern winter.
  • Mars is furthest from the sun at aphelion, at Ls=71 and closest at perihelion, Ls=251.

What is a Global Climate or General Circulation Model (GCM)?

The surface temperatures provided in this exercise come from a computer simulation of the Martian atmosphere using a General Circulation Model (GCM), which is like a weather forecast model. We divide the globe into latitude, longitude and height boxes and compute the evolution of temperature, winds, and atmospheric composition in each box, and on the surface. The surface temperatures given were computed at the equator, at longitude 0 degrees.

The Mars’ atmosphere divided into grid boxes.

Mars’ topography, the star marks the point where the simulated temperatures are from.

You have managed to complete all of the experiments! This is the end of your trip. There is a message for you from Mars.

Message from Mars

Download the instructions for this experiment in Spanish, French and Dutch

Instructions ES / FR / NL
Date:

30 de agosto de 2022

Category:
Experiments
Prev Next

This project has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement No 101004052

marsinabox@iaa.es

Aviso legal · Política de privacidad · Política de cookies

MARS IN A BOX
Gestionar el consentimiento de las cookies
Para ofrecer las mejores experiencias, utilizamos tecnologías como las cookies para almacenar y/o acceder a la información del dispositivo. El consentimiento de estas tecnologías nos permitirá procesar datos como el comportamiento de navegación o las identificaciones únicas en este sitio. No consentir o retirar el consentimiento, puede afectar negativamente a ciertas características y funciones.
Funcional Siempre activo
El almacenamiento o acceso técnico es estrictamente necesario para el propósito legítimo de permitir el uso de un servicio específico explícitamente solicitado por el abonado o usuario, o con el único propósito de llevar a cabo la transmisión de una comunicación a través de una red de comunicaciones electrónicas.
Preferencias
El almacenamiento o acceso técnico es necesario para la finalidad legítima de almacenar preferencias no solicitadas por el abonado o usuario.
Estadísticas
El almacenamiento o acceso técnico que es utilizado exclusivamente con fines estadísticos. El almacenamiento o acceso técnico que se utiliza exclusivamente con fines estadísticos anónimos. Sin un requerimiento, el cumplimiento voluntario por parte de tu Proveedor de servicios de Internet, o los registros adicionales de un tercero, la información almacenada o recuperada sólo para este propósito no se puede utilizar para identificarte.
Marketing
El almacenamiento o acceso técnico es necesario para crear perfiles de usuario para enviar publicidad, o para rastrear al usuario en una web o en varias web con fines de marketing similares.
Administrar opciones Gestionar los servicios Gestionar proveedores Leer más sobre estos propósitos
Ver preferencias
{title} {title} {title}