First inversion with the toy-gaussian model#
After running a first forward run with perturbed outputs from known emissions
with the the Toy Gaussian Model,
it is possible to carry out an academic inversion using these “true” observations.
Below are the steps to run a variational inversion with the minimizer M1QN3
:
Copy the
obsvect
repository from theworkdir
your first forward simulation tooutdir
; rename it toref_obsvect
Set up a Yaml configuration:
copy the content of the reference Yaml file available here to a directory of your choice
- modify paths to fit your own configuration:
rootdir
: path where the CIF sources areoutdir
: where the outputs will be generated
please note that they should be consistent with the parameters used in first forward run as the
obsvect
with perturbed observations is retrieved from the forward
Run pyCIF based on your Yaml file:
python -m pycif path-to-your-yaml
Explore the results in
workdir
:$workdir/controlvect/fluxes/controlvect_fluxes_CH4.nc
: the optimized fluxes$workdir/controlvect/simulator/cost.txt
: the value of the cost function at each iteration$workdir/controlvect/simulator/gradcost.txt
: the norm of the gradient of the cost function at each iteration
You just carried out an inversion using the minimizer M1QN3
.
The configuration set-up used a Monte-Carlo approach to compute posterior uncertainties, this can be switched off by commenting the line mode/montecarlo
Note
It is very likely that your inversion did not succeed in capturing the target text to retrieve. You can play with the number of stations to test how many are needed to retrieve the ‘truth’ with a very bad prior.