Implementation of lognormal prior error variance specification for iterative calculation of the nonlinear optimization problem through the Levenberg–Marquardt method (Rodgers, 2000). This adds two new config variables: LognormalErrors, a boolean for whether to use lognormal errors for the inversion, and PriorErrorBufferElements, which specifies the prior error in relative percentage for buffer elements. The latter is necessary because we only impose lognormal errors for the domain of interest. Buffer elements and optimized boundary condition elements continue to use normal error specification.
The implementation provides a separate script from lognormal_invert.py script to calculate xhat. Notably, rather than reading in the jacobian piece by piece and performing the inversion (like in invert.py), we read in the full jacobian. This significantly eases the implementation due to the iteration needed to solve for xhat.
Additionally, when using lognormal errors we add in a new "background" jacobian simulation with no emissions specified. This allows us to get a clean background and simply do F(xhat) = ybkg+ K(xhat) rather than needing to recalculate F(xhat) for each iteration of xhat.
TODOs:
change back config.harvard-cannon.yml file to default values
Remove sed hack for background simulation once geoschem emissions toggle is fixed
After fairly extensive testing of interaction with lognormal errors on OH, BC optimization, and global inversions from @eastjames and myself, we are merging this branch to dev
Name and Institution (Required)
Name: Lucas Estrada Institution: Harvard ACMG
Describe the update
Implementation of lognormal prior error variance specification for iterative calculation of the nonlinear optimization problem through the Levenberg–Marquardt method (Rodgers, 2000). This adds two new config variables:
LognormalErrors
, a boolean for whether to use lognormal errors for the inversion, andPriorErrorBufferElements
, which specifies the prior error in relative percentage for buffer elements. The latter is necessary because we only impose lognormal errors for the domain of interest. Buffer elements and optimized boundary condition elements continue to use normal error specification.The implementation provides a separate script from
lognormal_invert.py
script to calculate xhat. Notably, rather than reading in the jacobian piece by piece and performing the inversion (like ininvert.py
), we read in the full jacobian. This significantly eases the implementation due to the iteration needed to solve for xhat.Additionally, when using lognormal errors we add in a new "background" jacobian simulation with no emissions specified. This allows us to get a clean background and simply do
F(xhat) = ybkg+ K(xhat)
rather than needing to recalculateF(xhat)
for each iteration ofxhat
.TODOs: