[mpas-developers] proposed changes for trunk

Michael Duda duda at ucar.edu
Tue Dec 20 15:44:30 MST 2011

Hi, All.

I've been making a few minor improvements in a branch along the way to
integrating the non-hydrostatic atmoshpere core in CAM, and since these
changes are generally applicable, I'd like to propose adding them in the
trunk, too.

The first set of changes affects the way that the RKIND value is
defined.  Currently in the trunk, we use cpp with -DRKIND=8 to change
the types of reals throughout the code; however, this approach doesn't
allow us to type literal constants (e.g., to change 0.0_RKIND to 0.0_8
due to the way cpp works), and it also ignores the fact that different
compilers are permitted to define the double-precision kind differently
(in other words, usind kind=8 is not universally guaranteed to give us
double-precision reals). To address these issues, I've added a new
module, src/framework/mpas_kind_types.F, that defines RKIND using the
intrinsic SELECTED_REAL_KIND. Now, we can be sure that the value of
RKIND is a value that will give double-precision, and we can also define
literal constants like 0.0_RKIND. I've gone through all of the cores and
updated them so that they compile with this new module. An added bonus
is that we can remove one more macro definition (-DRKIND=8) from the
Makefile, and we can in theory get rid of compiler options like -r8,
-qrealsize=8, etc. (although in practice, the physics routines we've
inherited from WRF still require these compiler options, so I've left
them in the Makefile for now).

The second change is in the dmpar module, and simply makes it possible
to use an externally-supplied MPI communicator, which might come, e.g.,
from CESM.

All and only these changes are in branches/cam_mpas_nh, so I'd like to
propose at this point to merge this branch to the trunk. If there are
any questions, suggestions for improvements, or concerns, just let me


More information about the mpas-developers mailing list