The bindings to libcloudph++ allow using the library from Python, without requiring the user to interact with the native C++ interface. They are implemented using the Boost.Python C++ library and NumPy arrays. The Python bindings significantly facilitate the use of the library and add relatively little runtime overhead. Python has simpler syntax than C++, it is known to be an efficient “glue” language for coupling codes written in different programming languages, and it is already widespread across the atmospheric science community. Arguably, the embraced approach makes the best out of salient features of two languages. C++ is used for implementing numerically-intensive concurrency-enabled algorithms for both CPU and GPU. Python is used for equipping the library with rapid-development features and for interfacing with other languages.
In my presentation I will present the main concept of the bindings using Boost.Python, examples of use of selected library components from Python environment. I will also cover an example solution for using the Python bindings to access libcloudph++ from Fortran.
The talk will cover the content described in a technical note http://arxiv.org/abs/1504.01161.