A Python interface to the Fortran-written data assimilation library - PDAF
PDAF-V2.1
Fortran compiler: e.g.:gfortran/intel fortran
a message passing interface (MPI) implementation: e.g. openMPI/MPICH
Python>=3.8
- Currently, Fortran-written PDAF is compiled together with pyPDAF. Hence, the Fortran compiler options need to be specified in the PDAF section of
setup.cfg
. - Options in pyPDAF section of
setup.cfg
are related to the current pyPDAF directory (pwd
) and C compiler used by Cython, e.g. (CC=mpicc
for GNU compiler orCC=mpiicc
for Intel compiler) - It is recommended to use a clean conda environment to install pyPDAF to avoid any package conflicts
- Install Python package:
pip install .
mpiexec -n 4 python -u example/main.py
Will run the model with 4 ensemble members where each member uses 1 process.
Currently, it interfaces with subroutines of PDAF-V2.1
with an example for online coupling with PDAF using a simple model based on the tutorial from PDAF. Some interface in Python changes slightly due to different ways to handling return values in Python from Fortran.
This documentation contains more details on installation, Python interface, and implementation guide on pyPDAF. The simplified interfaces in PDAF are not supported.
Yumeng Chen, Lars Nerger
pyPDAF is mainly developed and maintainde by National Centre for Earth Observation and University of Reading.