geoschem / integrated_methane_inversion

Integrated Methane Inversion workflow repository.
https://imi.readthedocs.org
MIT License
25 stars 19 forks source link

Feature/optimize domain edges #169

Closed laestrada closed 10 months ago

laestrada commented 10 months ago

Name and Institution (Required)

Name: Lucas Estrada Institution: Harvard ACMG

Describe the update

This update implements boundary condition optimization as part of the inversion, making use of the new boundary condition perturbation options from @nicholasbalasus in geoschem 14.2.1.

This is done by effectively increasing the number of state vector elements by 4, and performing 4 additional perturbation simulations. Notably, we do the inversion calculations for these final 4 elements in concentration space instead of calculating a correction factor. The calculated increase/decrease in ppb is then applied in the posterior simulation.

These changes have been tested using our standard 1-week test case, but the differences are minimal when using buffer cells and BC optimization. Additional testing was done for 1-month over Tasmania to see the effect of having no buffer cells for the domain with and without BC optimization. Visualization notebooks are attached for this case.

In the tasmania case the posterior BCs are increased/decreased by [-9.202384948730469, 9.279534339904785, 0.21053607761859894, -2.070218324661255] ppb in NSEW domain edges.

This reduces the bias in the posterior from -5.65 (in the inversion with no bc optimization) to -5.35 ppb when compared to the tropomi observations. It should be noted that there are only 300 observations in the domain, so we are unable to diverge too much from the prior.

tasmania_1mon_bc_opt.html.txt tasmania_1mon_no_bc_opt.html.txt

nicholasbalasus commented 10 months ago

Hi @laestrada - I added a feature to make sure the GC perturbation is working as intended. Daniel V. would be better suited to review the inversion methodology.

test-imi.txt was run with sbatch test-imi.sh to test the feature I added. If we merge this into dev-2.0, we should keep in mind that perturbing boundary conditions won't work until we clone a version of GC with that feature available (I can make a PR for this once 14.2.1 is released).

If the test fails, it would fail into the .err file in the inversion folder. This doesn't crash the entire IMI (probably not desirable), but that's true for other errors here as well.

visualization_notebook 2.html.zip has the results for the successful run.