The Community Vertical Mixing Project (CVMix) is a portable vertical mixing software package providing an extensible framework for the development of first-order closures. It can be downloaded via the links at the left or cloned directly from github:
$ git clone email@example.com:CVMix/CVMix-src.git
The scientific description of the project and data needed for some of the stand-alone test cases provided are available from the CVMix project page on github.
The primary goal of the model is to provide a selection of vertical mixing libraries for use in ocean general circulation models (OGCMs). This only requires building libcvmix.a, which can be done by running
src/shared/directory. When you run
make, you must pass the name of the compiler to use via the
$(FC)variable to the
Makefile; you can also pass compiler flags in the
$(FCFLAGS)variable. Further, you can specify four directories (default value of each is the current directory):
SRC_DIR-- directory containing the mixing modules (
OBJ_DIR-- directory to store
.modfiles when compiling.
INC_DIR-- directory to store
.modfiles. When you compile your OGCM, you want to compile your model with the
-I$(INC_DIR)option. This directory can be the same as
LIB_DIR-- directory to store
libcvmix.afile. When you compile your OGCM, you want to link your model with the
For example, in CESM the POP ocean model build is launched from a c-shell script that reads in CESM environment variables; the CVMix library is built by running
gmake -f $CODEROOT/ocn/pop2/source/cvmix/Makefile \ SRC_DIR=$CODEROOT/ocn/pop2/source/cvmix \ FC=$FC FCFLAGS="$FFLAGS $FREEFLAGS" \ LIB_DIR=$LIBROOT
$CODEROOT/ocn/pop2/source/cvmixis a copy of the
src/shared/directory of the CVMix repository.
CVMix also provides a stand-alone mode to test the library on new machines and to aid in development. There is a simple I/O routine that can be compiled with or without netCDF support and some NCL scripts to produce plots for comparison. Developers wishing to add a mixing module to the library must also provide a stand-alone driver for regression testing.
The executable for the stand-alone driver is
bin/cvmix, which can be built by running
src/directory. The first time you try to build the driver, you will be prompted to enter your compiler (there is no parallel code at this time, so a serial compiler is fine) and the location of netcdf (which is only used if you build the
netcdftarget). At this time, the following compilers are supported:
ftn, provided the environment variable
PE_ENVis one of the following:
Given one of the above compilers, the compiler flags will be set as specified in
bld/CompileFlags.mak. The supported compilers put object and module files in
bld/objand build at the
O2optimization level. The GNU and Intel compilers will also exit on warnings.
This project is a collaboration driven mainly by the Geophysical Fluid Dynamics Laboratory, Los Alamos National Laboratory, and the National Center for Atmospheric Research. The main contributors are Stephen Griffies, Alistair Adcroft, and Robert Hallberg from GFDL; Todd Ringler and Douglas Jacobsen from LANL; Gokhan Danabasoglu, William Large, and Michael Levy from NCAR.