Setup of Flexpart WRF installation requirements

This document addresses the system environment typically needed to install the Flexpart WRF distribution, and the setting of environment variables used by this component.


System environment

Installation of Flexpart WRF requires the presence of suitable executables and libraries. This component has been developed and tested in the RHEL 7 environment of CTBTO’s devlan, as well as a Virtual Box VM set up with CentOS 7 to almost exactly mimic the CTBTO environment. Although this should work well in many other Linux environments, as the libraries are all fairly standard, it hasn’t yet been tested elsewhere. Compilation has been with gfortran v4.8.5 (old, I know, but that’s what is used on these systems!). Since Flexpart WRF is used on many other systems, I don’t anticipate problems elsewhere. W

Within each of the Flexpart WRF install directories (for example, install-flxwwrf/flxwrfv3.3_2023-05-07) is a shell script for setting the needed environment variables for the Flexpart WRF build, setup_install_env.sh. The contents are displayed below and, again, have been suitable in the CTBTO-like environments

#!/bin/bash

# Set of system-specific (mostly) environment variables used by the
# installation routines to compile, setup and test a FLEXPART-WRF distribution

################################################################
#   These have been tested in the CTBTO-like CentOS 7 VM
#   and will likely be the same on devlan (not yet tested there)
################################################################
###export PATH=/usr/lib64/openmpi/bin:$PATH
export MPIF90=/usr/lib64/openmpi/bin/mpif90
###export MPICC=/usr/lib64/openmpi/bin/mpicc

# This is needed for running post-install test cases
export MPIRUN=/usr/lib64/openmpi/bin/mpirun

# Note that the netcdf.mod file in CentOS 7 seems not to be in same place
# as typical netcdf includes
export NETCDF=/usr
export NETCDF_MOD_INC=/usr/lib64/gfortran/modules
export NETCDF_classic=1

So, before running the installation script, the environment can be setup as follows, within the desired distribution directory. Of course, one would want to ensure that the paths are correct for their particular system.

$ . setup_install_env.sh

Summary

Once the system environment variables have been set up correctly, it should be possible to run the installation program to build and install the distribution in (for example) ~/FLEXWRF3.3-Distribution as follows

$ ./flxwrfinstall.py --baseinstalldir ~/FLEXWRF3.3-Distribution

More details on the flxwrfinstall.py program are presented in Technical notes on the Flexpart WRF installation program.