Skip to content

Commit

Permalink
Bug fix: Make sure FIX is the 2nd arg to Fun in gckpp_Integrator.F90
Browse files Browse the repository at this point in the history
KPP/carboncycle/gckpp_Integrator.F90
- Added a kludge: In routine FunTemplate, we now pass FIX (and not VAR)
  as the 2nd argument to Fun.  This error was causing the F variable
  within Fun to be corrupted, which was propagating negatives through
  the code.
- NOTE: We have patched this file for KPP 2.5.0, but a final fix will
  be issued in KPP 3.0.0.  We will eventually rebuild all mechanisms
  with KPP 3.0.0 anyway.
- See KineticPreProcessor/KPP#6 for more info.

Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
  • Loading branch information
yantosca committed Oct 18, 2022
1 parent bec5519 commit 63e3fa2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion KPP/carboncycle/gckpp_Integrator.F90
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,13 @@ SUBROUTINE FunTemplate( Y, Ydot )
REAL(kind=dp) :: Ydot(NVAR)

!~~~> Compute equation rates and time derivative of variable species
CALL Fun( Y, VAR, RCONST, Ydot )
!### KLUDGE: FIX must be the 2nd argument to FUN
!### See https://github.com/KineticPreProcessor/KPP/issues/60
!### We will fix this locally in the KPP-2.5.0 generated code
!### but a final fix will be made in KPP 3.0.0.
!### -- Bob Yantosca (18 Oct 2022)
!###CALL Fun( Y, VAR, RCONST, Ydot )
CALL Fun( Y, FIX, RCONST, Ydot )

END SUBROUTINE FunTemplate

Expand Down

0 comments on commit 63e3fa2

Please sign in to comment.