MCT is one of several libraries that CCSM uses during execution. MCT is used
to transfer data between models like CAM and POP and the CCSM coupler. MCT is also
used within the coupler for interpolation and intra-coupler data transfer operations.
MCT is distributed as part of the CCSM source code. You can find the MCT
source in $CCSMROOT/models/utils/mct.
Follow these steps to upgrade the version of MCT in CCSM or CESM.
cd to $CCSMROOT/models/utils
rename old version of mct:
>mv mct mctold
download a new version of MCT and place the tar file in $CCSMROOT/models/utils
untar the file.
rename the directory:
>mv MCT mct
save space by deleting some unused directories:
>rm -rf examples protex
You can now go back to your case directory and rebuild CCSM. You should rebuild
the entire application.
Unless stated otherwise, when substituting the version of MCT in CCSM3/CCSM4/CESM1 with the current version,
the answers produced by the model will not change.
The MCT and CCSM build systems
MCT is built as one of the external libraries of CCSM. It is compiled before any
of the executables. If MCT is not built successfully, the CCSM build will fail.
MCT uses autoconf as its build tool. Autoconf requires you to first run "./configure" before
typing "make". This is what the mct.buildlib script does. "./configure" searches your
system for Fortran compilers and MPI libraries and sets default compilation flags according
to what it finds.
Changing the MCT build options
The MCT build options can be changed by adding options to the "./configure" command
in the mct.buildlib script. It is possible to change the optimization level, etc.
See $CCSMROOT/models/utils/mct/README for more information. Also see the examples
for Linux-ia64 and UNICOS in mct.buildlib.
To get a list of possible configure options, type "./configure -help" in $CCSMROOT/utils/mct.
Common MCT build problems
MCT and CCSM compiled with different compilers
One problem is when "./configure" finds a Fortran compiler which is different from the one used
This is only a problem on systems that have more than one Fortran compiler.
If the compiler "./configure" found works, then MCT will build without error but the CCSM
build will fail later when trying to link an application to the MCT library. The same Fortran compiler must
be used throughout the CCSM build process.
"./configure" will use the first Fortran compiler it finds in your path. To get around this problem, you can
specify which compiler to use with the F90 option:
If you have a special compiler for compiling MPI programs, such as mpif90 or mpxlf90, use the MPIF90 command:
./configure F90=xlf MPIF90=mpxlf90
Another option would be to alter your $PATH so the appropriate compiler is found first.