Version 4 (modified by 3 years ago) (diff) | ,
---|
Compiling the PDAF library
The tutorial implementations in the directory PDAFROOT/tutorial/
(Here PDAFROOT/
is the directory of the PDAF package) and the models implemented with PDAF in PDAFROOT/models/
are configures to also compile the PDAF library when the model or tutorial program is compiled. In these cases, one does not need to compile the PDAF library separately.
The PDAF library, thus the core routines of PDAF and PDAF-OMI, can also be compiled separately. This is the common approach when one implements PDAF with some models in the online-coupled setup (see e.g. the directory modelbindings
).
Compiling PDAF for ensemble filters and smoothers
To compile PDAF for ensemble filters and smoothers, do the following:
cd src/ make PDAF_ARCH=<ARCH>
where <ARCH>
is the filename of the computer-specific settings from the directory PDAFROOT/make.arch/
without .h
. A common choice is <ARCH>=linux_gfortran_openmpi.
The compilation with generate the PDAF library file PDAFROOT/lib/libpdaf-d.a. In addition several Fortran module files *.mod
are generated in the directory PDAFROOT/include/
. These will be used when compiling the application program coupled to PDAF.
Compiling PDAF for 3D-Var methods
The 3D-Var methods implemented in PDAF use solver algorithms from external libraries (from the directory external/
).
To compile PDAF with full support for the analysis with 3D-Var schemes do the following:
cd src/ make pdaf-var PDAF_ARCH=<ARCH>
where <ARCH>
is the filename of the computer-specific settings from the directory PDAFROOT/make.arch/
without .h
. A common choice is <ARCH>=linux_gfortran_openmpi.
The compilation with generate the PDAF library file PDAFROOT/lib/libpdaf-var.a. This library also includes the ensemble filters and smoothers.
In addition several Fortran module files *.mod
are generated in the directory PDAFROOT/include/
. These will be used when compiling the application program coupled to PDAF.
Linking the PDAF library
To point to the PDAF include directory to ensure that pdaf_interface_module
and the PDAFomi
module are found, one should specificy
-I${PDAFROOT}/include
Here ${PDAFROOT}
is the directory of the PDAF package. It can either be directly specified by replacing ${PDAFROOT} or one speficies PDAFROOT as a variable.
For linking the PDAF library for the ensemble schemes use
-L${PDAFROOT}/lib -lpdaf-d
while in case of the PDAF library supporting the 3D-Var schemes use
-L${PDAFROOT}/lib -lpdaf-var
Apart from the PDAF library, one also needs to specify the location of the BLAS and LAPACK libraries (for example by setting -lblas -llapack
if the libraries are installed in standard directories)