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:

  1. Copy the obsvect repository from the workdir your first forward simulation to outdir; rename it to ref_obsvect

  2. 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 are

      • outdir: 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

  3. Run pyCIF based on your Yaml file:

    python -m pycif path-to-your-yaml
    
  4. 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.