Construction of Hierarchical Models for Fluid Dynamics in Earth andPlanetary Sciences : DCMODEL projectShin-ichi Takehiro1 , Yoshiyuki O. Takahashi2,8 , Ko-ichiro Sugiyama3 , Masatsugu Odaka4,8 , Masaki Ishiwatari4,8 ,Youhei Sasaki5 , Seiya Nishizawa6 , Keiichi Ishioka5 , Kensuke Nakajima7 , and Yoshi-Yuki Hayashi2,81

1Research Institute for Mathematical Sciences, Kyoto University, Japan
2Graduate School of Science, Kobe University, Japan
3
Institute of Loow Temperature Science, Hokkaido University, Japan
4Graduate School of Science, Hokkaido University, Japan
5Graduate School of Science, Kyoto University, Japan
6
Avanced Institute for Computational Science, RIKEN, Japan
7Graduate School of Science, Kyushu University, Japan
8Center for Planetary Science, Japan

Introduction

In recent researches for fluid motions of planetary atmospheres and in the planetary interiors, numerical experiments and simulations by use of massive computational
resources become a popular approach. Numerical simulation models used in such studies not only calculate pure
fluid motion but also incorporate various kinds of elemental physical processes, such as radiation, subgrid turbulence, phase changes of constituents and so on. However,the simulation models have become so complicated that it
is not easy for a researcher to understand the program asa whole. As a result, it has become increasingly difficult tocheck the validity of the simulation model by recognizing
the effect of a certain elementary physical process, or to reducing the system in order to build up a conceptual model.
This has been recognized as a “model-gap” problem[1]. In
order to fill the gap between high-end complex simulation
models and process studies or simplified conceptual models, it is necessary to prepare a software environment thatenables to perform multiple simultaneous numerical experiments and to compare these results by use of an arbitrary
set of models in a hierarchical fashion with various levelsof complexity ranging from high-end complex simulation
models to simplified conceptual models or process study
models.
In these circumstances, we are now proceeding “dcmodelproject”, where a series of hierarchical numerical models
with various complexity is developed and maintained. In
the followings, we introduce the features and lineup of themodels of dcmodel project.
2Features of the models of “dcmodel”

In “dcmodel project”, a series of the numerical models
are developed taking care of the following points.
• A common “style” of program codes assuring readability of the software• Open source codes of the models to the public• Scalability of the models assuring execution on various scales of computational resources• Stressing the importance of documentation and presenting a method for writing reference manuals

3
3.1

Components of dcmodel
Gtool5Fortran90 library “gtool5”[2] provides data input/output interfaces and various utilities commonlyused in the models of dcmodel project. We adopted
a self-descriptive data format netCDF. The interfacesof gtool5 library can reduce the number of operation
steps for the data IO in the program code of the models
compared with the interfaces of the raw netCDF library.
By use of gtool5 library, procedures for data IO andaddition of metadata for post-processing can be easily
implemented in the program codes in a consolidated form
independent of the size and complexity of the models.
By this feature, readability of the program codes areimproved such that numerical experiments and output
data analyses can be easily performed, and as a result, it
becomes more efficient to compare of numerical results ofthe models with various complexities.
3.2

ISPACK/SPML

ISPACK and SPML are the libraries for spectral transformations for various kinds of spectral models. ISPACK
is a Fortran77 library developed by Keiichi Ishioka in Kyoto University, and provides (possibly) the fastest FFTsubroutines in the world. SPML(SPMODEL library)[3]is a Fortran90 wrapper library of ISPACK. Most prominent feature is a series of array-handling functions withsystematic function naming rules. By use of the functionsof SPML, program source codes can now be written witha form which is easily deduced from the mathematical expressions of the governing equations.
3.3SPMODEL“SPMODEL”[3] is a collection of various sample programs using “SPML”. These sample programs provide the basekit for simple numerical experimentsof geophysical fluid dynamics.
For example, SPMODEL includes 1-dimensional KdV equation model, 2dimensional barotropic, shallow water, Boussinesq models,
3-dimensional MHD dynamo models in rotating sphericalFig. 4. Examples of numerical results with dcpam. Fromleft to right, calculated zonal mean distributions of Venus,
Earth and Mars.
Fig. 1. An example of numerical result of a shallow watermodel on a rotating sphere.

namelist variables. Vertical 1-dimensional and axisymmetric 2-dimensional calculations are also possible.
3.6

Fig. 2. An example of numerical benchmark of MHD dynamo in a rotating spherical shell. Left and right panels
show the radial component of magnetic field at the outerboundary and radial velocity in the middle of the shell.

shells. These models are written in the common style inharmony with SPML functions. As a result, we can catchup the governing equations easily from the program codes.
3.4

Deepconv“Deepconv”[4] is a non-hydrostatic model for the purpose of applications to the planetary atmospheres. The
quasi-compressible system is adopted, and chemical reactions and phase changes of multiple atmospheric constituents are included in order to simulate the clouds in
the Jovian and Martian atmospheres. 2-dimensional and3-dimensional calculations are easily switched.
3.5

Rdoc-f95“Rdoc-f95” is a automatic generator of reference manuals of Fortran90/95 programs, which is an extension ofruby documentation tool kit “rdoc”. It analyzes dependency of modules, functions, and subroutines in the multiple program source codes. At the same time, it can list
up the namelist variables in the programs.
4Conclusion

We have introduced the features and lineup of the models of dcmodel project, where a series of hierarchical numerical models with various complexity is developed andmaintained. The series of hierarchical models enable us
to conduct multiple numerical experiments with multiple
models easily, which will lead to a deeper understandingof various phenomena in planetary atmospheres and interiors.
As is stated in “Introduction”, one of the problems on
the simulation models utilized in the research of the fields
is that the source codes become so large that not only
model users but also model maintainers cannot catch up
what are realized by the model calculations. Expanded
source code causes an “information explosion” for model
developers and users. Development of hierarchical models
represents one approach to overcoming such difficulties.

Dcpam“Dcpam”[5] is a general circulation model (GCM) of theplanetary atmospheres. It is based on the primitive equation system, and its dynamical part is calculated with aspectral method by use of ISPACK/SPML. Physical processes implemented are radiation, turbulent mixing, precipitation and simplified ground surface processes. The
atmospheric circulations of the Earth, Mars, and (simplified) Venus can be calculated selectively with change of theReferences[1] Held, I. M.: The gap between simulation and understanding in climate modeling. B. Am. Meteorol. Soc., 86, 1609–1614, 2005.
[2] Ishiwatari, M., Toyoda, E., Morikawa, Y., Takehiro,S., Sasaki, Y., Nishizawa, S., Odaka, M., Otobe, N.,
Takahashi, Y. O., Nakajima, K., Horinouchi, T., Shiotani, M., Hayashi, Y.-Y., Gtool development group,”Gtool5”: a Fortran90 library of input/output interfaces for self-descriptive multi-dimensional numerical data,Geosci. Model Dev., 5, 449-455, 2012.
[3] Takehiro, S., Odaka, M., Ishioka, K., Ishiwatari, M.,
Hayashi, Y.-Y., and SPMODEL Development Group: SPMODEL: A series of hierarchical spectral models for geophysical fluid dynamics, Nagare Multimedia, available
at: http://www2.nagare.or.jp/mm/2006/spmodel/index.
htm, 2006.
[4] Sugiyama, K., Odaka, M., Yamashita, T., Nakajima, K.,Hayashi, Y.-Y., and deepconv Development Group, Nonhydrostatic model deepconv, http://www.gfd-dennou.
org/library/deepconv/, 2010.

Fig. 3. Examples of the calculations of deepconv. Leftand right panels show convection in a Jovian and Martian
atmospheres, respectively.

[5] Takahashi, Y. O., Ishiwatari, M., Noda, S., Odaka,M., Horinouchi, T., Morikawa, Y., Hayashi, Y.-Y., andDCPAM Devlopment Group: DCPAM: planetary atmosphere model, http://www.gfd-dennou.org/library/dcpam/, 2010.