Testing and Validating the Climate Portion of the Code

As noted in class, test and validation of code involves many different aspects of the code. First, testing the code is done to determine if the code actually works. We will test to see if the code actually compiles. If not, there may be syntax errors due to either typographical errors or there may be logic errors which cause compiler errors. There may also be algorithm errors, such as division by zero.

Once the code is compilable, it should be tested to follow the mathematical model. A number of tests are feasible for the climate model portion of our code. First and foremost is a simple test to see what happens if the solar constant is set to zero. Without any solar output, there should be no temperature (or temperatures of absolute zero) at the Mars position.

Another situation that presents a feasible is to set the albedo of Mars to 1 such that all of the solar flux is reflected back to space. This should also lead to an absolute zero temperature on the surface.

Another test feasible for the climate model deals with the atmosphere model. If the optical thickness of the atmosphere is infinite, all of the solar energy should be absorbed in the atmosphere and there should be no surface temperature.

Also, the presence of a CO2 atmosphere, should actually make the temperatures higher than with no atmosphere at all. This is a good test of the atmosphere transfer code adapted from the thesis noted in the numerical model discussion.

Part of code validation is the determination as to whether or not the code successfully models the scientific phenomenon. This presents two mechanisms for our code. One approach will be to compare out code output to the implicitly derived solutions in the references used for this portion of the project, i.e. compare our outputs to the published output of the models used.

Another approach is to compare our outputs to the measurements made by some of the many instruments that have visited Mars in the past 30 years, i.e. compare to the Viking Landers' in situ measurements.

In conclusion, the following test and validation procedures will be used with the climate portion of our code: