Wombatlite april2026#99
Conversation
- added logicals for `do_colloidal_shunt` and `do_two_ligands` in iron chemistry - added routine for two ligand complexation of iron and updated conditional stability constant in line with Ye et al. (2020) - added prey switching dynamic for zooplankton grazing - ensured minimum iron concentration is 50 pM
removed unnecessary variable `zno3`
Updates to the documentation - parameter table introduced
…use it's not worth working hard to get the symbols to render
Small change to disscal parameter
dougiesquire
left a comment
There was a problem hiding this comment.
Thanks @pearseb. Some comments/questions below.
I was worried about the cost impact of doing 30 iterations for the two ligand bisection at every grid cell.
I ran 2 x 1 year runs of this configuration with do_two_ligands set to .true. and .false..
do_two_ligands = .false.
$ grep -r "payu_model_run_duration_seconds" payu_jobs/
payu_jobs/0/run/165895773.gadi-pbs.json: "payu_model_run_duration_seconds": 1450.404177219607,
payu_jobs/1/run/165902070.gadi-pbs.json: "payu_model_run_duration_seconds": 1430.7093261787668,
do_two_ligands = .true.
$ grep -r "payu_model_run_duration_seconds" payu_jobs/
payu_jobs/0/run/165895774.gadi-pbs.json: "payu_model_run_duration_seconds": 1625.5848535923287,
payu_jobs/1/run/165903936.gadi-pbs.json: "payu_model_run_duration_seconds": 1521.5471708243713,
So there is a pretty significant cost (~10%).
I think we could improve this using the Newton-Raphson method which I think suits the problem and will require much fewer iterations. I'll try to implement and test while you address my comments below.
|
I rewrote and tested the two ligand bisection code to use Newton-Raphson. I tested across 10,000 sets of parameters across the ranges: With 8 Newton-Raphson iterations, the solution for all sets of parameters produces a relative residual less than 1e-6, or an absolute residual that is less than that from 30 bisection iterations. The timings (as above) for 8 Newton-Raphson iterations are:
So ~3% slower (as expected). As we discussed, let's make this change and default to I'll push these changes now. |
See #99 (comment) for justification/testing
Co-authored-by: Dougie Squire <dougie.squire@anu.edu.au> Co-authored-by: Pearse J Buchanan <pearseb@users.noreply.github.com>
When `do_two_ligands` == FALSE, made the bulk ligand binding strength a weight average of strong and weak ligand binding Updated docs to refelct above changes, and also including new tables at the start for logicals, diagnostics and tracers
…scription.md Co-authored-by: Dougie Squire <dougie.squire@anu.edu.au>
…scription.md Co-authored-by: Dougie Squire <dougie.squire@anu.edu.au>
Co-authored-by: Pearse J Buchanan <pearseb@users.noreply.github.com>
Hey @dougiesquire
These are small additions to WOMBAT-lite. Since I have been working on WOMBAT-mid a lot, some of the advances in WOMBAT-mid are transferable to WOMBAT-lite and probably should be the same. these include:
Sorry to add to your mountain of work but this should be quite simple and easy to merge with main.