-
Notifications
You must be signed in to change notification settings - Fork 11
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
Are we using Update_RCONST() correctly? #93
Comments
@adrian-sandu: Can you help us with this question? |
Hello, This is from the legacy code design (one set of coefficients is fixed during each time step, except for the time dependent photolysis rates). Perhaps we need a version Update_RCONST(Y) that takes current concentrations as argument, with |
Hello Adrian, Thanks for confirming that we should use A colleague of mine (Simon Rosanka) has already written some code to |
Hello @adrian-sandu, I have a related question: Is it correct that calling If that is true, KPP should print a warning if a user sets the |
I've added @srosanka as an "Outside Collaborator" to our KPP repo. He |
Update_RCONST now uses variable concentrations for rate constants that depend on species concentrations. To ensure backwards compatibility, YIN is an optional input. If YIN is not passed to Update_RCONST, concentrations from the global C array are used instead.
Thanks @RolfSander @adrian-sandu @srosanka for looking into this. FYI, in GEOS-Chem, we only update rate constants before calling the integrator (otherwise it would be too time consuming) by setting We can also get a sense of what impact this change would have by looking at the output of the C-I tests. |
Hi, I just pushed the required changed to the |
@yantosca That is good to know. As far as I recall, the default option in MESSy also only updates all rate constants before calling the integrator. I think that this is a valid approach for most gas phase mechanisms, especially when considering the performance improvement in global model applications. However, when we implemented aqueous phase chemistry in deliquescent aerosols in MESSy (AERCHEM), we noticed that not updating rate constants that depend on variable species during the integration can significantly influence the predicted results. |
Hi Bob, Rolf, Simon, It makes sense to call Update_RCONST every time we call the function/Jacobian for non-autonomous systems. Perhaps very important for wet chemistry. The shortcut with calling it every operator split time step works well for gas phase, and it saves a ton of computations in 3D. So keeping both options is good. |
Thanks @adrian-sandu. I think so too! |
We can now close this issue now that PR #106 has been merged. |
Hello,
The switch
ICNTRL(15)
allows us to callUpdate_RCONST()
several timesduring the KPP sub-timesteps. Some of the rate constants depend on other
concentrations. In GEOS-Chem for example, k(IONO+BrSALA) depends on
C(ind_IONO)
.Why is
Update_RCONST()
using concentrations from theC
array, whichstill has the old values before the integration started? Don't we have
to use the intermediate values from the
YNEW
arrray insideUpdate_RCONST()
?The text was updated successfully, but these errors were encountered: