FLEXPART Model/FLEXPARTCompilerSettings
This is the README file included now with the FLEXPART distribution
Compiling FLEXPART in a 64-bit environment
This file describes the required compiler flags for compiling FLEXPART in a 64-bit computing environment for the gfortran compiler (version 4.2 and onward) and absoft compiler (version 10.1).
Using 64-bit environment brings the advantage of using >2GB main memory for FLEXPART data arrays. However, this requires certain adjustments to the compilation settings of FLEXPART and the external libraries GRIB_API and JASPER (the latter as required by GRIB_API).
The main point to be considered for running FLEXPART in a 64-bit environment is the possiblity to allocate data arrays >2GB. This requires to use the compiler flag -mcmodel=medium. Note that this memory model slows down calculations, if data arrays of less than 2GB are allocated, the use of -mcmodel=small is said to provide slightly better performance.
An additional requirement is that the external libraries must be compiled with the flag -fPIC to allow for the libraries to be located at any position in the computer's main memory. Without this flag, a 'relocation truncated to fit' error will result when linking FLEXPART.
If the compilers are not set to generate 64-bit binaries by default, the flag -m64
should be included for FLEXPART and the external libraries.
All of the required settings for FLEXPART are already made in the cmake configuration files (cmake directory) included in the FLEXPART distribution.
Recommended compilation steps using the gfortran or absoft compiler
- JPEG compression is used FLEXPART WINDFIELDS and this requires to compile GRIB-API with jpeg support (JASPER library). On UIO servers GRIB-API and Jasper are already installed.
To set-up your environment:
module load grib_api
Please note that grib_api will be loaded automatically when loading flexpart.
- FLEXPART:
Flexpart has already been compiled on sverdrup.uio.no and Abel.
To check which version is available on abel:
module avail flexpart
To set-up your environment on Abel:
module load flexpart
This will load the default version of flexpart. The default version of flexpart may not be the latest version. If you start new development, we advice you to load the latest version (highest version number!):
module load flexpart/9.2
FLEXPART_HOME: directory where flexpart has been compiled/installed. You will find the source code for FLEXPART.
FLEXPART_WINDS: directory where FLEXPART windfields are stored. This directory contains windfields necessary to run all our tutorials/examples.
FLEXPART_EXAMPLES: directory where FLEXPART examples can be found.
Running tutorials
To run FLEXPART examples, the best is to copy them in your own directory:
cp -R $FLEXPART_EXAMPLES . cd HelloWorld FLEXPART
The name of the main executable is FLEXPART. FLEXPART uses an input file called pathnames where you shall specify the options directory, the output directory and the location of AVAILABLE file for WINDFIELDS.