SPMODEL: Hierarchical Spectral Models for Geophysical Fluid Dynamics

SPMODEL project is now developing various hierarchical spectral models for geophysical fluid dynamics which can be easily used for research and education.

News(2022.06.03)

We are now developping a new version SPMODEL library (spml) ver.2.0 using ISPACK ver.3.

  • Since it is still under development, the documentation and module lineup is not complete. Even when you want to use ispack3, you can get its source by git clone it via HTTP as follows.

    % git clone https://dennou-k.gfd-dennou.org/library/spmodel/git_repos/spml.git
    % cd spml
    % git submodule update --init
    % git checkout origin/spml/2.0
    % ./autogen.sh
    % ./configure ...
    % make ; make check ; make install
    • The interface of functions and subroutines of spml ver.2.0 is (almost) the same as that of spml ver.0.8.0, so that you need not to change your program so much.
    • You can also try by installing the Debian package or Ubuntu PPA and then installing the spml2 package.
  • When using spml up to now, please use ISPACK ver.1. In addition, ISPACK ver.2 can also be used at the same time.
    • If you want to use the above Debian or Ubuntu packages, please install spml.

begin JA

SPMODEL の目指すもの

SPMODEL では, 地球流体力学に登場するさまざまなレベルの近似方程式系の数値モデルを, 空間 1 次元モデルから 2 次元あるいは 3 次元モデルまで階層的に整備しています.

このような一連の数値モデルをそろえることで

  • 標準的あるいは重要な GFD のイラストレーションをたやすく再現できるようにしたい → 地球流体力学の理解と普及に役立てる
  • 数値計算による知見を研究者の間で共有したい → 従来の数式による理解から数値計算による理解へ
  • 一連のモデルの振舞の比較をスムーズに行いたい → より複雑なモデルの結果を理解するための道具

といったことを目指しています.

このため, 現在整備しようとしているモデルシリーズの基本方針では「可読性が高く理解しやすく, 変形しやすいこと」を最重点においています. 大名プログラマー主義(CPUは無限に速く, メモリとディスク容量は無限に大きいという環境の下で仕事をする) にしたがって, スピードはとりあえず犠牲にしても構わない, というスタンスです. しかしながらこのモデルシリーズをベースにすることで, 例えば最先端の大計算を行うに耐える高速なモデルの開発などが容易になることも期待しています.

SPMODEL のモデルでは, 格子点とスペクトル空間のデータ変換や空間微分などの基本的な配列関数からなる SPMODEL library (spml) を用いてます. Fortran (>= 90) の配列機能を生かしたこのライブラリの配列関数を用いることで, 時間発展方程式の時間変化項以外の部分を数式の形そのままにプログラミングすることができるようになってます. 支配方式の形をそのままプログラムソースに反映させられるのでプログラムの可読性を向上させることができます. また, spml の配列関数は入出力配列の性質が名前からわかるようにするべく統一的に命名法にしたがっているので, 関数の使い方が機械的になり, プログラムを修正することも容易に行えるようになっています.

SPMODEL のライブラリとサンプルプログラム自体が Modern Fortran のプログラミング書法の一つの実験でもあります. 地球流体力学の問題に限らずさまざまな物理現象のスペクトル法による数値計算の一つのスタイルとして参考にして頂ければと思います.

The goal of SPMODEL

SPMODEL project is developing a series of numerical models based on various systems of approximate equations, that appear in the geophysical fluid dynamics. The model series is arranged hierarchically from simple spartial one-dimensinal models to complex two or three dimensional models.

The aims of the series of numerical models are as follows:

  • Easy reproduction of illustrations of standard or important GFD problems in order to make use of understandings and teaching of geophysical fluid dynamics.
  • Sharing knowledge obtained by numerical experiments with ease: from the era of unserstanding with conventional mathematical equations to the era of understanding through the results of numerical calculations.
  • Smooth comparison bwtween the numerical results of the series of the models: it is helpful in understanding of the results of more complex models.

For such purposes, readability and understandability of the source codes to permit easy re-building and/or modification are given priority in designing the program source codes. This policy might sacrifice calculation speed of the programs, however, we anticipate that on the basis of this model series, advanced models, which can perform leading-edge massive calculations for exapmle, could be developed easily.

The programs of the series of the models use "SPMODEL library (spml)", which provides basic functions for numerical fluid dynamics calculations with the spectral methods, such as conversion between grid and spectral data and spartial derivatives. By using the array-valued functions of SPMODEL library under favor of the array operation features of Fortran (>= 90), the main part of each program source code is written in a similar form to the original mathematical expressions, which contributes to readability and understandability of the program source codes. Moreover, with the help of the introduction of systematic function naming rules of the array-valued functions of SPMODEL library, we can use these functions routinely, and the program source codes can be modified easyly and safely.

The SPMODEL library and the sample programs serve as one of the experiments for Modern Fortran programing style. We are pleased if we colud offer them as references for programing style of several numerical calculations not only in geophysical fluid dynamics but also in other several fields of physics.