jpmattern / dualnum

dual number-based example implementation of tangent linear and adjoint model

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dualnum

An example implementation of dual number-based tangent linear and adjoint models. This repository contains the code for a simple nutrient-phytoplankton-zooplankton (NPZ) model, including its nonlinear code and dual number-based tangent linear and adjoint code. It also includes a code to test the consistency between models.

Getting Started

All that is needed is a Python 3 installation with numpy and (optionally) matplotlib.

Running the tests

To see if it is all working, try running the NPZ nonlinear and tangent linear model (requires matplotlib):

python3 NPZmodel.py

or perform a series of dot-product tests:

python3 dotproduct_test.py

Authors

License

This project is licensed under the Apache License - see the LICENSE.md file for details.

About

dual number-based example implementation of tangent linear and adjoint model

License:Apache License 2.0


Languages

Language:Python 100.0%