About the code

FlexInvert is a software for the optimisation of surface to atmosphere fluxes of various species. It is based on Bayesian statistics and finds the most probable estimate of the fluxes, that is, the one that best fits the atmospheric observations within specified ranges of uncertainty about both the observations and the prior estimate of the fluxes. The fluxes are compared to observations using a model of atmospheric transport. In FlexInvert, the transport is based on the Lagrangian Particle Dispersion Model, FlexPart.

FlexInvert can be used to estimate fluxes from global to regional scale and it can be used for any atmospheric species as long as the chemistry or decay (if any) can be described as a first-order process.

The software is modular and includes modules to read the observations, prior fluxes, and FlexPart output, as well as different options for the optimization algorithm. The optimization can be performed using analytical, conjugate gradient or quasi-Newton approaches. FlexInvert is coded in Fortran90 using object oriented programming (in Fortran this is called Derived Data Types). For details about the code please refer to the full documentation.

FlexInvert has already been used to estimate fluxes of CO2, CH4, N2O, black carbon, as well as various halogen species (SF6, HFC-125, and HFC-134a). The software has also been used in numerous European and Norwegian research projects.

Development

FlexInvert was developed in 2014 by Rona Thompson at the Norwegian Institute for Air Research (NILU). In 2017, FlexInvert was rewritten to make it more modular and to include a special treatment for CO2 fluxes. This update also included changes to make it possible to solve the inversion using gradient methods. Since this is a totally new version of the code it is referred to as FlexInvert+. If you are interested in using FlexInvert and/or contributing to its further development, please contact Rona Thompson.