An Earth System Model coupler
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
grids
include
lib
test
.gitignore
.gitmodules
LICENSE
Makefile
README.md

README.md

Tango

An Earth System Model coupler.

This is a new coupler, it is intended to very very easy to use and understand. Some good things about it:

  • The configuration is trivial.
  • C/C++, Python and Fortran interfaces. This means that you can spec out your coupling scheme quickly using Python, or couple together models written in different languages.
  • Regridding weights are made offline using ESMF, this can be run in parallel - essential for large grids.
  • Fully distributed, i.e. N-to-N coupling of independent MPI processes.
  • Excellent performance, all fields between any two models are bundled together and then sent, rather than each field going through MPI individually.
  • Can be used as a general purpose regridding tool offline. The good thing about this is that you can explore the interpolation schemes without actually having to run a model.
  • About 1000 lines of code, so if something goes wrong you have a hope of figuring out what's happening.

Getting started

Tango is in development. It uses libraries extensively in an attempt to reduce the amount of source code. This has worked well, the core library is around 1000 lines of code (LOC). However:

$ sudo apt-get install libnetcdf-c++4-dev
$ sudo apt-get install libboost-dev (for now, newer versions of libyaml-cpp will not need this).
$ sudo apt-get install libyaml-cpp-dev
$ sudo apt-get install libpython-dev

Download and install ESMF, in particular the ESMF_RegridWeightGen program is needed.

tango can then be built with:

$ make

To run the tests:

$ export LD_LIBRARY_PATH=/usr/local/lib:$HOME/tango/lib:$LD_LIBRARY_PATH
$ export PYTHONPATH=$HOME/more_home/tango/lib:$PYTHONPATH
$ mpirun -n 2 ./bin/python-mpi test/test_basic_decomposition.py
$ cd test
$ mpirun -n 2 tango_test.exe

Concepts

There are several key concepts that are needed to understand the source code.

Grid:

Mapping:

Tile:

Peer:

Transfer: