Prerequisites
You should have completed the installation of grib_api, FCM and downloaded and unpacked the OpenIFS data files and OpenIFS source code.
Reminder: FCM is the name of the build software used to compile OpenIFS.
Build configuration
Before compiling the OpenIFS model, the build configuration must first be set by several environment variables:
OIFS_ARCH - This sets the architecture of the computer. By default, the FCM build configuration assumes x86_64 (i.e. Linux).
OIFS_COMP - This sets the choice of compiler. The default is 'gnu' which means the gfortran/gcc compilers will be used.
OIFS_BUILD - This sets the type of build. Several choices can be build; fully optimized (opt), debugging/unoptimized (noopt), debugging with array bound checking (nansC) mode.
These environment variables directly correspond to the names of the FCM configuration files in the oifs/make/fcmcfg/ directory in the OpenIFS source. Please see this directory for the possible choices supported.
e.g.
export OIFS_ARCH=x86_64 export OIFS_COMP=intel export OIFS_BUILD=opt
means using the Intel ifort compiler on a x86_64 computer architecture and the model will be compiled with full optimization compiler settings. Also the FCM build system will expect to find a file:
make/fcmcfg/x86_64-intel-opt.cfg
Setting:
export OIFS_ARCH=aix_pwr6 export OIFS_COMP=xlf export OIFS_BUILD=noopt
means FCM will look for a file:
make/fcmcfg/aix_pwr6-xlf-noopt.cfg
suitable for building on IBM Power6 architecture using the XLF/XLCC compilers using non-optimized settings.
Building for other systems/environments
As the environment variables refer to the corresponding filename in the make/fcmcfg config directory it is straightforward to create a build configuration for other environments. Take a copy of an existing file and modify it as necessary. It's also possible to alter compile options by the use of additional environment variables (see below). Which approach you use depends on your personal preference.