2002 Annual

Wednesday, 16 January 2002
Development for scientific analysis and visualization with the object-oriented language Ruby
Naoki Kawanabe, Kyoto University, Kyoto, Japan; and T. Horinouchi, M. Shiotani, and T. Sakakima
Poster PDF (55.6 kB)
Kinds and size of data an atmospheric scientist deals with have been increasing rapidly as global research corporation and computer power grow. The companion paper by Horinouchi and Kawanabe propose a method to facilitate consolidated handling of data in various formats. It also presents its realization as a class library for the object-oriented language Ruby. The library requires a computationaly efficient numerical array class and a visualization library, which are not included in the original distribution of Ruby. This paper presents our development of these basic libraries.

Ruby has a pre-defined array class, but it is not suitable for large computing. This is because the elements of an array can be any ruby objects, which hinders efficient computation. We have instead developed a multi-dimensional array class specialized in handling numeric data. It is written in C and the contents of an array are stored under a C pointer. Thanks to the flexibility of Ruby's syntax we could legitimately incorporate advanced features that are available in limited languages such as Yorick. It is worth noting that to extend Ruby by C is well established and the extension libraries can be linked dynamically without recompiling Ruby itself under many operating systems. Further, we are planning to port Ruby on super computers and adapt the array class for vector processors.

The scientific visualization library is based on Dennou Club Library (DCL). DCL covers 1D and 2D graphics in depth with strong capability for layout and coordinate transformation including map projection. It also has limited 3D graphic functions. It is written in FORTRAN77 and is translated into C. First, we made a "wrapping" interface for Ruby to the C version. The interface consists of functions that correspond one by one to functions in DCL. Upon this interface, we are developing a user-friendly graphic library that is suitable for interactive use as well as for programming. Furthermore, we are planning to develop graphical user interface that can be used both on UNIX platforms and Windows. It is also envisioned further to incorporate fully functional 3D graphics.

Supplementary URL: