-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
inverse emissions calculation unstable with current parameters #137
Comments
The width of the guess should be a free parameter, that seems a bit weird, this is the most like random starting point for solution iteration, it being a free parameter seems strange...? Also, can we just require that the minimal guess be larger than zero? Did you encounter this from back-calculating with a very flat emissions profile? |
Yes - flat emissions profile (is this a divide by zero issue?). The problem with requiring that the minimal guess be larger than zero is that the algorithm is calculating the emissions, not the concentrations. The condition would need to be slightly more complex - that the lower bound on the emissions guess can’t be more than all the carbon in the atmosphere….
… On 10 Jun 2024, at 09:44, Marit Sandstad ***@***.***> wrote:
The width of the guess should be a free parameter, that seems a bit weird, this is the most like random starting point for solution iteration, it being a free parameter seems strange...? Also, can we just require that the minimal guess be larger than zero? Did you encounter this from back-calculating with a very flat emissions profile?
—
Reply to this email directly, view it on GitHub <#137 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AENSZZHDXOFTB2U6ZH3X2C3ZGVKNNAVCNFSM6AAAAABJBHFFQ2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJXGU3TCOJVGM>.
You are receiving this because you authored the thread.
|
Is there somewhere that you have your setup for this that I can have look at, maybe I can think about a slightly less ad hoc solution... |
Current implementation of inverse carbon calculation can fail due to negative CO2 concentrations generated in bisection algorithm.
convergence fails when the log is taken in the npp calculation:
np.log(self.co2_hold["xCO2"] / 278.0)
(line 308, carbon_cycle_mod)
Propose reducing the width of the initial window:
from current
to the following:
min_guess = self.simplified_em_backward(co2_conc_now / 1.2, co2_conc_zero)
max_guess = self.simplified_em_backward(co2_conc_now * 1.2, co2_conc_zero)
This is still wide enough to accommodate vast annual +ve or -ve emissions, but seems in practise less likely to blow up.
Ideally, on the medium term to-do list, this should be a free parameter.
The text was updated successfully, but these errors were encountered: