GFD-Dennou Club
DCMODEL projectShin-ichi Takehiro
Research Institute for Mathematical Sciences, Kyoto University

February 4th, 2013
with Y. O Takahashi(Kobe Univ.), K. Sugiyama (Hokkaido Univ.), M. Odaka(Hokkaido Univ.), M. Ishiwatari (Hokkaido Univ.), Y. Sasaki (Kyoto Univ.), S.
Nishizawa (RIKEN), K. Ishioka (Kyoto Univ.), K. Nakajima (Kyushu Univ.),
Y.-Y. Hayashi (Kobe Univ.), GFD-Dennou Club(http://www.gfd-dennou.org/)
Shin-ichi Takehiro (RIMS, Kyoto Univ.)

DCMODEL projectFebruary 4th, 20131 / 19Introduction
The simulation models have become socomplicated...
Simple calculation of fluid motion + many kinds ofphysical processes (e.g. radiation, turbulence, clouds,precipitation, phase changes...)Not easy to understand the program
Diﬃcult to check the validity of the simulation model
Comparison with elementary process models
Reduction of the system in order to build up a conceptualmodel⇒ “model-gap” problem (Held 2005)
Shin-ichi Takehiro (RIMS, Kyoto Univ.)

DCMODEL projectFebruary 4th, 20132 / 19Introduction
In order to fill the “gap”,
Necessary to compare these results by use of an arbitrary
set of models in a hierarchical fashion with various levelsof complexity
Software environment that enables to perform multiple
simultaneous numerical experiments

DCMODEL projecta series of hierarchical numerical models with various
complexity is developed and maintained
http://www.gfd-dennou.org/library/dcmodel/
Shin-ichi Takehiro (RIMS, Kyoto Univ.)

DCMODEL projectFebruary 4th, 20133 / 19Features of the models of DCMODEL
Model series with various complexities
From simple models (elementary process models,conceptual models) to complicated simulation models
To understand various phenomena and check validity ofthe models

A common “style” of program codes⇒ increase of readability of the software
Common programing style, naming rules, input/output
routines, data format
Build up various models and perform experiments
eﬃciently
Learning one of the models ⇒ quick understanding of theother models

Readability is important also for model users
To understand how the source codes of the models realize
the original physical systems
Shin-ichi Takehiro (RIMS, Kyoto Univ.)

DCMODEL projectFebruary 4th, 2013

4 / 19Features of the models of DCMODEL
Open source codes of the models to the public
Anyone can use and modify the models/programs
Important to perform follow-up experiments

Scalability of the models
Execution on various scales of computational resources
Students can use the same models for forefront studies
after graduating schools

Documentation and presenting a method for writingreference manuals
Tutorials, references, instruction manuals in a commonstyle
Important not only for using models but also fordevelopment and maintenanceShin-ichi Takehiro (RIMS, Kyoto Univ.)

DCMODEL projectFebruary 4th, 2013

5 / 19Main components of dcmodelInput/Output librarygtool5
Libraries for spectral transformations
ISPACK/spml
Various models
spmodeldeepconv
dcpam
Tool for documentation
rdoc-f95
Shin-ichi Takehiro (RIMS, Kyoto Univ.)

DCMODEL projectFebruary 4th, 20136 / 19

gtool5
Fortran90 library providing data input/output
interfaces and various utilities
Data format : NetCDF
Conventions suitable for numerical research in fluid
dynamics in the Earth and planetary sciences (gtoo4
netCDF conventions)

Procedures can be easily implemented in a sameway independent of the scales of the programs
Data input/output
Addition of meta-data for post-processing⇒ readability of the program codes improved
Simultaneous numerical experiments and post-analyses
with multiple programs can be performed easily
Comparison and examination of the calculation results
eﬃciently
Shin-ichi Takehiro (RIMS, Kyoto Univ.)

DCMODEL projectFebruary 4th, 20137 / 19ISPACK/spml
Libraries for spectral transformations
ISPACK : Fortran77 library(Possibly) the fastest FFT subroutines in the world

SPML : Fortran90 wrapper library of ISPACK
Array-handling functions with systematic naming rules⇐ one of the features of Fortran90
Similar to the contraction convention of the tensor
calculusg_e(e_Data)!conversion from spectral to grid data
e_g(g_Data)!conversion from grid to spectral data
e_Dx_e(e_Data) !differentiation on the x coordinate
g_Data2 = g_e(e_Dx_e(e_g(g_Data1)))

Source codes can be written with a form easily deduced
from the math. expressions of the governing eqs.
Shin-ichi Takehiro (RIMS, Kyoto Univ.)

DCMODEL projectFebruary 4th, 20138 / 19

Example of spml modules
module nameae module
at modulel module
aq moduleee module
esc module
et module
eq module
w module
wa module
wt module
wq module
wtq module

geometry
1-dim. cyclic domain
1-dim. finite domain
1-dim. finite domain
1-dim. finite domain
2-dim. double cyclic domain
2-dim. channel domain
2-dim. channel domain
2-dim. disk domain
2-dim. spherical domain
2-dim. spherical domain(multiple layers)
3-dim. spherical shell domain
3-dim. sphere domain
3-dim. sphere andspherical shell domainfunction series for transformation
FFT
Chebyshev
LegendreMatsushima Marcus polynomials
FFT
FFT + sin, cos
FFT + Chebyshev
FFT + Matsushima Marcus polynomials
Spherical harmonics
Spherical harmonics
Spherical harmonics + Chebyshev
Spherical harmonics+ Matsushima Marcus polynomials
Spherical harmonics + Chebyshev+ Matsushima Marcus polynomials

Table: Modules of spml and geometries
Shin-ichi Takehiro (RIMS, Kyoto Univ.)

DCMODEL projectFebruary 4th, 20139 / 19SPMODEL
Collection of sample programs using “spml”
Providing the base-kit for simple numerical experimentsof GFD
Programing style for spml ⇐ program source codes canbe written with a form easily deduced from the math.
expressions of the governing eqs.

E.g. : 1-dim. KdV equation∂ζ∂ 3ζ∂ζ= −ζ−∂t∂x ∂x3
SPMODEL programing code becomes
e_DZetaDt = -e_g(g_e(e_Zeta)*g_e(e_Dx_e(e_Zeta)))-e_Dx_e(e_Dx_e(e_Dx_e(e_Zeta)))
Shin-ichi Takehiro (RIMS, Kyoto Univ.)

DCMODEL projectFebruary 4th, 201310 / 19

Sample output of SPMODEL

Soliton solution of KdV equation

Kelvin-Helmholtz instability

Propagation of Rossby waves on a rotating sphere

MHD dynamo in a rotating spherical shell

Shin-ichi Takehiro (RIMS, Kyoto Univ.)

DCMODEL projectFebruary 4th, 201311 / 19

Deepconv
Non-hydrostatic cloud resolving model for planetaryatmospheres
Chemical reaction and phase changes of multiple
constituents of the atmospheres are implemented ⇒simulate various clouds of planetary atmospheres
2-dim. and 3-dim. calculations are easily switched
Dynamics

Turbulence
Precipitation

Radiation
Surface fluxes

Quasi-compressible system (Klemp and Wilhelmson, 1978)
Horizontal grids : regular intervals
Vertical grids : irregular intervals
1.5-order closure (Klemp and Wilhelmson, 1978)
Multiple condensation constituents
Condensation of the major component
Parameterization of Kessler (Kessler 1969)
Diﬀusive growth of cloud droplets
Homogeneous cooling/heating
Radiation model for the earth’s atmosphere
Bulk method and/or simple diﬀusion

Table: Major specifications of cloud resolving model “deepconv”
Shin-ichi Takehiro (RIMS, Kyoto Univ.)

DCMODEL projectFebruary 4th, 201312 / 19

Sample output of deepconv
Cloud convection of Jovian atmosphere
Upper panel: active period. Lower panels: quiet period

Mixing ratio of the clouds
Shin-ichi Takehiro (RIMS, Kyoto Univ.)

Mixing ratio of the vapors
DCMODEL project

Vertical velocity
February 4th, 201313 / 19

Sample output of deepconv
Cloud convection of Martian atmosphere in thepolar region

Shin-ichi Takehiro (RIMS, Kyoto Univ.)

DCMODEL projectFebruary 4th, 201314 / 19

dcpamGeneral circulation model (GCM) of the planetaryatmospheres
Earth, Mars, and (simplified) Venus can be treated.
Dynamics

Radiation

Turbulence
Condensation

Surface
CloudsPrimitive equation system
Horizontal : spectral method (ispack/spml)
Vertical : finite diﬀerence method (Arakawa Suarez 1983)
Earth : CO2, H2O, O3, water cloud (Chou et al, 1996)
Mars : CO2, dust
Grey atmosphere
Turbulent mixing : Mellor and Yamada lelel 2 (Mellor and Yamada 1974, 1982)
Surface flux scheme by Louis (Louis et al. 1982)
Relaxed Arakawa-Schubert (Moorthi and Suarez, 1992)
Large scale condensation : Manabe et al. (1965)
CO2 condensation
Bucket model (Manabe, 1969)
Thermal conduction model in the ground
Simple prediction of cloud water density
Disregard of cloud ice
Elimination with constant lifetime,
Considering turbulent mixing,
Disregard of sub-grid scale partial clouds

Table: Major specification of dcpam
Shin-ichi Takehiro (RIMS, Kyoto Univ.)

DCMODEL projectFebruary 4th, 201315 / 19

Sample output of dcpam
General circulations of the terrestrial planets
Upper panels:longitudinal wind. Lower panels:
temperature
Mars

Shin-ichi Takehiro (RIMS, Kyoto Univ.)

Venus

Earth

DCMODEL projectFebruary 4th, 201316 / 19

Sample output of dcpam
Sample calculation of general circulation ofsynchronously rotating planet

Surface temperatureShin-ichi Takehiro (RIMS, Kyoto Univ.)

Precipitation

DCMODEL projectFebruary 4th, 201317 / 19

rdoc-f95
Automatic generator of reference manuals ofFortran90/95 programs
Dependency of modules, functions, and subroutines in
the multiple program are analyzed
list up the namelist variables

The reference manual of dcpam generated by rdoc-f95
Shin-ichi Takehiro (RIMS, Kyoto Univ.)

DCMODEL projectFebruary 4th, 201318 / 19

Summary
DCMODEL project
A series of hierarchical numerical models with various
complexity is developed and maintained

Simultaneous numerical experiments of simple
programs with common “style” and high-end
complicated models⇐ Deeper understanding of various phenomena in planetaryatmospheres and interiors

Trial for conquest of diﬃculties with “expanded”
source codes
Can we overcome the diﬃculties with hierarchicalmodels?

DCMODEL project home page:
http://www.gfd-dennou.org/library/dcmodel/
Shin-ichi Takehiro (RIMS, Kyoto Univ.)

DCMODEL projectFebruary 4th, 201319 / 19