wiki:SoftwarePackage

Version 37 (modified by lnerger, 9 months ago) (diff)

--

The Software package

Getting the code package

A package archive with the source code of PDAF and its test suite can be downloaded after registration from the download page.

Structure of the package

The software package contains the following directories:

  • lib/
    • This is the directory in which the library object file of PDAF is created upon compilation.
  • make.arch/
    • This directory contains machine-specific include files for the Makefile.
  • modelbindings/
    • This directory contains the PDAF bindings for real simulation models (starting with PDAF 1.13 for MITgcm)
  • models/
    • This directory contains fully implemented toy models for assimilation experiments with PDAF (added in PDAF 1.15)
  • src/
    • This directory contains the source code of the core routines of PDAF. In addition, a Makefile is included to compile the PDAF library file.
  • templates/
    • This directory contains stubs for all user-supplied routines required by the different filters. These files can be used for the own implementation (alternatively one can base on the routines of the example implementations in testsuite/.)
  • testsuite/
    • This directory contains the test suite of PDAF including example implementations. For more details see the section on the test suite
  • tutorial/
    • This directory contains example implementations of the analysis step in the online and offline modes of PDAF
  • external/
    • From PDAF V2.0, this directory contains external libraries, in particular solver methods used in 3D-Var

Compiling the PDAF library

The library file of PDAF can be compiled on its own or in connection with an example implementation from tutorial/, models/, or testsuite/. Here, we describe the stand-alone compilation. In order to build the library file, you need a Fortran-2003 compatible compiler and 'make'. In addition, the libraries 'BLAS', 'LAPACK', and 'MPI' are required.

The compilation itself is described on the page on compiling PDAF.

Tutorial Implementations

The directory tutorial/ contains different example implementations as well as inputs file used to run the examples (from Version 1.9 of PDAF). They are the recommended starting point to study the online and offline implementations of PDAF.

  • offline_2D_serial
    • This directory contains the example implementation of the offline mode without parallelization
  • offline_2D_parallel
    • This directory contains a parallel example implementation of the offline mode
  • online_2D_serialmodel
    • This directory contains an example implementation of the online mode with a serial model
  • online_2D_serialmodel_2fields
    • This directory contains an example implementation of the online mode with a serial model using multivariate assimilation
  • online_2D_parallelmodel
    • This directory contains an example implementation of the online model with a parallelized model

Please see the tutorial page for the tutorials describing these implementations.

Models

The following example implementations are included in the directories in models/ (from PDAF 1.15; before they were included in testsuite/):

  • lorenz63
    • This directory currently the Lorenz-63 model. In PDAF V1.14 we also added the data assimilation. Because of its small size, this model an be e.g. used with the Particle Filter. Compiling and running this model is described in detail on the page on the Lorenz-63 model.
  • lorenz96
    • This directory contains the Lorenz-96 model as well as a full data assimilation implementation of the model with PDAF. This model can be configured to have a sufficiently large state dimension to test low-rank filter algorithms like the SEIK filter. (We have using this model for example in the study: Janjić, T., Nerger, L., Albertella, A., Schröter, J., Skachko S. (2011). On domain localization in ensemble based Kalman filter algorithms. Monthly Weather Review, 139, 2046-2060 ( doi:10.1175/2011MWR3552.1).) Compiling and running this model is described in detail on the page on the Lorenz-96 model.
  • lorenz2005b
    • Added in PDAF V2.0, this directory contains the Lorenz-2005 model variant II as well as a full data assimilation implementation of the model with PDAF. It is considerd as an improved variant of the Lorenz-96 model.
  • lorenz2005c
    • Added in PDAF V2.0, this directory contains the two-scale model Lorenz-2005-III (introduced by Lorenz(2005), there called model variant III) as well as a full data assimilation implementation of the model with PDAF.

The Test Suite

The test suite of PDAF is included in the directory testsuite/. It is rather intended for our internal verification tests. It contains the following sub-directories:

  • bin/
    • This directory will contain the executable program when an example case is compiled
  • src/
    • This directory contains the example implementations. In addition the Makefile to compile the examples is included.
  • tests_dummy1D/
    • This directory contains scripts to run a series of test runs with the example implementation from testsuite/src/dummymodel_1D. In addition example outputs are included in the sub-directories. These outputs can be used to compare your own test runs with existing outputs. (The example outputs in out.linux_gfortran are from test runs on a Linux PC using the gfortran compilers both with and without parallelization. The example outputs in out.cray_xc_hlrn have been produced using a Cray XC40 Supercomputer with parallelization.)

Example Implementations in the test suite

The following example implementations are included in the directories in testsuite/src/:

  • dummymodel_1D
    • This is the example implementation in which PDAF is fully connected to a model. The model is trivial: At each time step simply the time step size is added to the state vector. This example can be used as the starting point for the 'flexible' online implementation variant of PDAF.
  • dummymodel_1D_si
    • This directory contains an analogous example implementation to dummymodel_1D. This variant, however, uses the simplified interface of PDAF. In this case, predefined names of the user-supplied subroutines are used such that there is no need to specify them in the call to the interface of PDAF. (The interface looks simpler in this case, but the subroutine names are fixed)
  • dummymodel_1D_snglprec
    • This directory contains an analogous example implementation to dummymodel_1D. This variant, however, uses single precision (We recommend to use double precision for numerical computation. However, if a model is implemented in single precision PDAF can be used with this model (starting from Version 1.8 of PDAF))
  • offline_1D
    • This example shows the usage of PDAF as an offline tool. In the offline configuration one computes manually the ensemble integrations and supplies this information to PDAF through files. For simplicity, this example does not use files, but generates dummy-information in the code itself.

Compiling test cases and tutorial implementations

To get started with PDAF we recommend to follow the instructions on First Steps with PDAF.