Mars Climate Model Software Implementation

Code Documentation

To understand the numerical methods approach and the programming approach to the Mars Climate Model, the reader is referred to the appropriate web pages dealing with this matter. This includes the numerical model for Mars atmosphere, the Mars climate code introduction with block diagram and pseudocode, and the testing and validating of the Mars climate code.

The Mars climate code was written in FORTRAN and compiled on a Silicon Graphics, Inc. (SGI) Indigo at the computer laboratory of the Institute for Computational Sciences and Informatics (CSI) at George Mason University (GMU). The code was based on a FORTRAN program by Harold Geller, originally written for a CSI class in Earth atmospheric physics. The code was modified for the simulation of the Martian atmosphere by its author.

The Mars climate code can be run on the CSI SGI Indigos by executing the appropriate file. Currently, the user can execute the code by entering "science.gmu.edu/~hgeller/marsm2.out" at the SGI UNIX prompt.

The program queries the user for a Sun/Mars elipse angle, i.e. the angle of the Martian orbital ellipse with the solar equator. Once this is entered, the program will display the calculated parameters based on this user input. A complete session is depicted in the file available at http://www.science.gmu.edu/~hgeller/proj4arun.html within the authors public HTML directory.

After display of the parameters calculated based upon the user input, the program queries the user to enter one of four choices. In this case, the choices are numbered 1,3,5 and 7. Entering choice 1 displays the physical characteristics of Mars as entered in the simulation program. These parameters, fixed in the program include the diameter, radius, mass, density, length of day, obliquity, eccentricity, solar orbit period, scale height, albedo, and semi-major axis.

By entering choice 3, the user will get an ASCII numerical display of the calculated values for the temperature of the surface of Mars for each degree of latitude of Mars. The output is printed in a tabular form from 0 degrees to 90 degrees North latitude, to -1 to -90 degrees, which represents the degrees South latitude of Mars.

By entering menu choice 5, the user will get an ASCII numerical display depicting the surface temperature of Mars over a five billion year period, one complete temperature listing for each billion years prior to the current era. This simulation run of the software assumes an increased amount of energy available to the surface. Furthermore, this simulation uses the assumption that "dry ice" formation is the point at which the albedo changes, i.e. more reflection of energy.

By entering menu choice 7, the user will get another ASCII numerical display depicting the surface temperature of Mars over a five billion year period, one complete temperature listing for each billion years prior to the current era. Assumptions and conclusions from these runs will be discussed in the final paper and presentation associated with this effort.

Code Function

The FORTRAN code executed in the sample run http://www.science.gmu.edu/~hgeller/proj4arun.html performs the functions depicted in the block diagram in the Mars climate code introduction with block diagram and pseudocode sections of the project input.

In brief, the program takes user input for the Mars/Sun angle between the Mars orbital ellipse and the Solar equator. It then calculates several parameters from this input, including the semi-major axis, the mean Sun/Mars distance, and the Mars solar constant for this particular simulation run.

Once these parameters are calculated, the program can examine a simulation case study for the surface of Mars, based upon the stored parameters as required by the model. The user then selects what is to be calculated in a particular simulation run.

If the user chooses to display and run the simulation for the current Mars surface, the choice is entered ('3') and the program then calculates the solar energy arriving at Mars, derives a temperature based on the assumptions discussed in the numeric model paper. The values of temperature are then displayed. These values are used by another module of the program to calculate the values over the entire longitudinal constituency of the planet. These values are then used with a visualization program for display purposes and saved in a file for use in the simulation of life portion of this effort.

Code Trials

As stated previously, The FORTRAN code executed in the sample run http://www.science.gmu.edu/~hgeller/proj4arun.html file is an example of runs of each of the four menu choices.

As can be seen in this file captured from a session with the computer via a telnet connection on a Windows '95 telnet terminal emulator, the FORTRAN program provides the output as expected.

Code Validation

As noted in the plan for validation in the file available on the web at "http://www.science.gmu.edu/~hgeller/proj3c2.html", the FORTAN code was tested and validated based upon a number of criteria. These were to include elimination of the solar radiation, setting Mars albedo equal to one, increasing optical thickness to infinity, and comparisons to the outputs from the literature based on models and Viking measurements.

Initial experimental runs setting the solar radiation to zero led to results of temperatures uniformly across the surface of Mars to be roughly -136 degrees Celsius. This is of course not reasonable and the cause of this was investigated. Ultimately it was discovered that the reason for this development was the use of a linear curve fit for the infrared cooling. This linear curve fit for the infrared cooling did not lead to bad results in either the original Earth model nor the runs of the Mars model, however, performing this test, led to unrealistic results.

Work was done on the model to modify the infrared cooling curve of the simulation so that it would be more like an exponential curve-fit. This exponential curve fit of the infrared cooling was implemented. After the implementation of the exponential curve-fit of the infrared cooling, the simulation was run with a setting of zero for the Qm (i.e. solar output) and a value of some -273 degrees Celsius was obtained. This was felt to be sufficiently close to absolute zero as to keep in the model. The results with the sun turned off now can be found in the following file http://www.science.gmu.edu/~hgeller/proj4azero.html.

Initial experimental runs were also done on the albedo setting. If the albedo of Mars is set to one, that is all of the radiation is reflected back out to space, then the expected temperature should be close to absolute zero. This was found not to be the case, and a similar situation as that mentioned for the solar radiation was discovered, and a similar fix put into place in the software implementation. Now when the albedo of Mars is set to one, the surface temperature across Mars is uniformly close to absolute zero. This file of results when albedo is equial to one can be found in the following file: http://www.science.gmu.edu/~hgeller/proj4azero.html.

Finally, comparisons were made between this simulation model software implementation and findings from other models as well as measurements made on the surface of Mars by the Viking Lander.

The findings from other investigators' simulation runs is represented in outputs that will be handed into class and become part of the presentation to the class. In general, while the model output is not in complete agreement with these other outputs, it is within an order of 10-20 degrees Celsius as compared to these other models. Reasons for this will be discussed as part of the final report and within the class presentation of the effort.