SPMODEL: A Series of Hierarchical Spectral Models for GFD << Prev | Index| Next >>

1. Introduction: toward a shared understanding with numerical calculations instead of mathematical manipulations

Before computers were developed and became widely available as they now are, "equations and their mathematical manipulations" were the main theoretical tools for obtaining physical descriptions of natural phenomena of the earth and planets. In order to obtain the governing equations of the system of interest by applying physical laws expressed as mathematical formulas, and to understand the behavior of the system, there was no choice but to solve the governing equations analytically by hand. Although the number of problems that could actually be solved by such methodology were quite limited, the understanding of the phenomena achieved by the original researcher could be shared relatively easily with others, since it only involved following the procedures from the formulation to the results by reproducing the "equations and their mathematical manipulations" with pen and paper. This may be regarded as the most delightful nature of theoretical thinking.

Nowadays, assisted by the advanced computer resources, numerical methods have become the popular method for obtaining solutions of the governing equations. The spectrum of solvable problems has expanded dramatically as a result. On the one hand, however, it has become increasingly difficult to share the results and understanding with others. The delightful nature of theoretical thinking are now becoming lost. It is quite difficult to achieve the same level of understandings as the authors only by consulting the figures presented in a paper for some of the results produced by the numerical model. If the reader wishes to achieve a similar level of understanding, they are now generally required to gain experiences to an extent similar to the authors by following the numerical calculations and performing additional experiments by changing parameters, model setups and so on. In order to achieve the level of shared understandings that had been traditionally achieved by theoretical thinking, we need to carry out the reexamination procedures similar to those provided by "equations and their mathematical manipulations" on computers. However, an independent execution of follow-up numerical calculations is generally difficult. Development of a numerical model from scratch is a time-consuming process, while the use of a ready-made model as a black-box does not necessarily provide the desired level of understanding of the results, because it is difficult to figure out what exactly is taking place.

For the purpose of addressing those circumstances and promoting shared understandings in the era of numerical calculations, we are now developing and presenting a series of spectral models suitable for performing standard numerical experiments of geophysical (earth and planetary) fluid dynamics problems (SPMODEL [1]). The following three principles were given priority in designing the program source codes:

  1. Allowing anyone to read, use, and modify the source codes
  2. Readability and understandability of the source codes to permit easy re-building and/or modification
  3. Ease in visualization and post-processing

In this paper, we explain the Fortran90 programming style used in the SPMODEL project, which gives special emphasis on the readability and variability of the programs. Some examples of the actual models developed in SPMODEL and their numerical results are also presented. In Section 2, we explain the array-operation features enhanced in Fortran90 which we utilize for the improvement of readability and variability of program source codes, that is,

In Section 3, we describe the SPMODEL library that provides fundamental array-valued functions for spectral models, such as spatial derivatives and transformations between spectral and grid space. They are constructed by wrapping the subroutines of the FORTRAN77 library for spectral calculations ISPACK [2] with Fortran90 array-valued functions. Section 4 gives an explanation of the programming style of SPMODEL. It is shown that, by the use of the array-valued functions of SPMODEL library, a program can be written in a natural form similar to the mathematical expressions of the governing equations, and the resulting program source codes can be highly readable. In Section 5, we show some examples of the models developed in SPMODEL so far and their numerical results. Finally, Section 6 summarizes our proposition.


SPMODEL: A Series of Hierarchical Spectral Models for GFD << Prev | Index| Next >>