Coupling ParFlow and the latest Common Land Model
Decide where to install ParFlow and associated libraries.
Set the environment variable PARFLOW_DIR
to the chosen location:
For bash:
export PARFLOW_DIR=/home/snoopy/parflow
Extract the source files from the compressed tar file.
CMake is a utility that sets up makefiles for building ParFlow. CMake allows setting of compiler to use and other options. First create a directory for the build. It is generally recommend to build outside of the source directory to make it keep things clean. For example, restarting a failed build with a separate build directory simply involves removing the build directory.
Building a parallel version of ParFlow requires the communications layer to use must be set. The most common option will be MPI. Here is a minimal example of an MPI build with CLM:
cd parflow
mkdir build
cd build
cmake .. \
-DCMAKE_INSTALL_PREFIX=${PARFLOW_DIR} \
-DPARFLOW_HAVE_CLM=ON \
-DPARFLOW_AMPS_LAYER=mpi1
Once CMake has configured and created a set of Makefiles; building is easy:
make
make install