pH bounds for alt_co2 are being set from ph_prev_col instead of ph_prev_alt_co2_col.
I think the following diff, against the development branch, corrects this:
diff --git a/src/marbl_interior_tendency_mod.F90 b/src/marbl_interior_tendency_mod.F90
index 698c80a..3a8a98e 100644
--- a/src/marbl_interior_tendency_mod.F90
+++ b/src/marbl_interior_tendency_mod.F90
@@ -1126,12 +1126,12 @@ subroutine compute_carbonate_chemistry(domain, temperature, press_bar, &
ph_prev_col(k) = pH(k)
if (ph_prev_alt_co2_col(k) /= c0) then
if (domain%delta_z(k) > 1._r8 * unit_system%cm2len) then
- ph_lower_bound(k) = ph_prev_col(k) - del_ph
- ph_upper_bound(k) = ph_prev_col(k) + del_ph
+ ph_lower_bound(k) = ph_prev_alt_co2_col(k) - del_ph
+ ph_upper_bound(k) = ph_prev_alt_co2_col(k) + del_ph
else
! Double initial bracket width for very thin layers
- ph_lower_bound(k) = ph_prev_col(k) - 2._r8 * del_ph
- ph_upper_bound(k) = ph_prev_col(k) + 2._r8 * del_ph
+ ph_lower_bound(k) = ph_prev_alt_co2_col(k) - 2._r8 * del_ph
+ ph_upper_bound(k) = ph_prev_alt_co2_col(k) + 2._r8 * del_ph
end if
else
ph_lower_bound(k) = phlo_3d_init
pH bounds for alt_co2 are being set from
ph_prev_colinstead ofph_prev_alt_co2_col.I think the following diff, against the development branch, corrects this: