Skip to content

Commit

Permalink
upgrade to compatible with PDAF-V2.0 with nearly full subroutine supp…
Browse files Browse the repository at this point in the history
…ort with PDAF.
  • Loading branch information
yumengch committed May 10, 2022
1 parent f4e1f49 commit 52485d1
Show file tree
Hide file tree
Showing 56 changed files with 16,197 additions and 3,216 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/test_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ jobs:
- run: sudo apt install -y liblapack-dev libblas-dev libopenmpi-dev
- name: get PDAF
run: |
wget -O PDAF-D_V1.16.tar.gz "${{ env.PDAF_LINK }}"
tar -zxvf PDAF-D_V1.16.tar.gz
wget -O PDAF_V2.0.tar.gz "${{ env.PDAF_LINK }}"
gzip -d PDAF_V2.0.tar.gz
tar -xvf PDAF_V2.0.tar
env:
PDAF_LINK: ${{ secrets.PDAF116_LINK }}
PDAF_LINK: ${{ secrets.PDAF_V2 }}

- name: Set up Python 3.8
uses: actions/setup-python@v2
Expand Down
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# pyPDAF
A (incomplete) Python interface to the Fortran-written data assimilation library - [PDAF](http://pdaf.awi.de/trac/wiki)
A Python interface to the Fortran-written data assimilation library - [PDAF](http://pdaf.awi.de/trac/wiki)

![GitHub Workflow Status](https://img.shields.io/github/workflow/status/yumengch/pyPDAF/test_build)


## Prerequisite:
- `PDAF-V1.16`
- `PDAF-V2.0`
- `Fortran compiler: e.g.:gfortran/intel fortran`
- `a message passing interface (MPI) implementation: e.g. openMPI/MPICH`
- `Python>=3.8`
Expand All @@ -17,16 +17,12 @@ A (incomplete) Python interface to the Fortran-written data assimilation library

## Run example:
```bash
mpiexec -n 8 python -u example/main.py
mpiexec -n 4 python -u example/main.py
```
Will run the model with 4 ensemble members where each member uses 2 processes.

## Note:
Currently, it only interfaces with limited subroutines of ```PDAF-V1.16``` with an example for online coupling with PDAF using a simple model based on the [tutorial](http://pdaf.awi.de/trac/wiki/FirstSteps) from PDAF. Some interface in Python changes slightly due to different ways to handling return values in Python from Fortran. It is possible to check Python interface [here](https://yumengch.github.io/pyPDAF/index.html). More subroutines will be supported in future release.

## Development
The interface between Fortran and Python relies on [Cython](https://cython.readthedocs.io/en/stable/index.html) and the feature of [iso_c_binding](https://gcc.gnu.org/onlinedocs/gfortran/ISO_005fC_005fBINDING.html) in Fortran.

Currently, it interfaces with subroutines of ```PDAF-V2.0``` with an example for online coupling with PDAF using a simple model based on the [tutorial](http://pdaf.awi.de/trac/wiki/FirstSteps) from PDAF. Some interface in Python changes slightly due to different ways to handling return values in Python from Fortran. Visit [here](https://yumengch.github.io/pyPDAF/index.html) to check more detailed documentation on installation, Python interface, and implementation guide on pyPDAF. The simplified interfaces in PDAF are not supported.

## Contributors:
Yumeng Chen, Lars Nerger
Expand Down
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
291 changes: 0 additions & 291 deletions docs/PDAF/PDAFomi.html

This file was deleted.

263 changes: 0 additions & 263 deletions docs/PDAF/index.html

This file was deleted.

158 changes: 0 additions & 158 deletions docs/UserFunc/c__PDAFomi.html

This file was deleted.

Loading

0 comments on commit 52485d1

Please sign in to comment.