Closed yantosca closed 2 years ago
Hi @RolfSander and @jimmielin, I can add the other ARR functions but I thought let me just do the ones that were already present in the UserRateLaws.f90. I agree, we should rectify these. That might also require editing the sample mechanisms since some of them use ARR etc.
We could create a new branch cleanup_util
for this purpose while continuing on the autoreduce merge at the same time?
Cleanup_util sounds like a good idea
This PR modifies the rate-law functions in
util/UserRateLaws.f90
as follows:Each rate law function such as
ARR
:Has now been split into 2 rate-law functions: one that takes single-precision arguments and one that takes double-precision arguments:
This allows us to remove the calls to
DBLE()
in the functions that take double-precision arguments (which avoids unnecessary CPU cycles).A new include file
util/UserRateLawsInterfaces.f90
has also been introduced. This contains theINTERFACE
statements that overload the separate single-precision and double-precision functions. These interfaces have to be placed into a separate file so that they can be inlined into theKPP_ROOT_Rates
module file above the 'CONTAINS` statement:Running C-I tests on this branch gives identical results to C-I tests run on the
cleanup_int
branch.NOTE: I have the target branch for this PR as
cleanup_int
. After we merge this intocleanup_int
we should be able to mergecleanup_int
intodev
.