All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Added
Rodas3_1integration method (with updated coefficents by @msl3v) torosenbrock_autoreduce.f90,rosenbrock.{c,f90,m},rosenbrock_adj.{c,f90},rosenbrock_tlm.f90 - Added the
#GRAPHcommand to create graph-based representations of the chemical mechanism - Added the
F90_graphC-I test to test the#GRAPHcommand - Added Obin Sturm to the list of important contributors in
src/code.c
- Updated package versions for RTD documentation builds; Also use
myst_parserinstead of obsoleterecommonmark - Updated
util/Makefile*files to remove*.csvwhen runningmake cleanormake distclean - Updated
.gitignoreto ignore*.csvfiles generated by KPP in theci-testsfolders
- Fixed incorrect comment in
int/rosenbrock_autoreduce.f90:10*Hshould be0.1*H - Fixed several issues in the
int/runge_kutta.cintegrator
- Added GitHub Action to run C-I tests with GCC compilers v9, v10, v11, v12, and v13
- Added "Lint" GitHub Action to check other actions for security issues
- Added new example files:
rkadj.kpp,sd4.kpp,sdtlm.kpp - Added new C-I tests:
F90_rkadj,F90_sd4,F90_sdtlm - Added
docs/read_the_docs_environment.yml
- Updated ReadTheDocs documentation to reflect that C-I tests are now done as a GitHub Action
- Updated the
docs/source/reference/editing_these_docs.rstinstructions for clarity - Updated GitHub Actions to the latest versions
- Moved the
which kppinstruction to the end of the "Build the KPP executable" section in the installation guide on ReadTheDocs - Updated rules to ignore files in
.gitignoreand updated comments accordingly - Fixed a bug that prevented
.ci-pipelines/ci-cleanup-script.shfrom removing KPP-generated files for MCM mechanisms - Fixed typo in error message in
int/rosenbrock_autoreduce.f90 - Fixed a bug in Makefile template that caused
KPP_ROOT_Stoichiom.f90not compiled if#STOICMAT ONand#HESSIAN OFF
- Removed C-I tests on Microsoft Azure Dev Pipelines
- Replaced BLAS functions (
WAXPY,WCOPY,WSCAL,WADD,WLAMCH,WDOT) with pure F90 code fromint/*.f90integrators (thanks to AI for the help)
- New integrator:
rosenbrock_h211b_qssa.f90 - New C-I tests:
F90_ros_h211b,F90_mcm_h211b run_example.cshandrun_example.shscripts for themcmandmcm_h211bexamples
- Added documentation in the
#INITVALUESsection about using Fortrand(double precision) exponents - Added C-I test
F90_feuler, using the Forward Euler integrator - Added carbon gases mechanism (
models/carbon.*)
- Updated
.ci-pipelines/build-testing.ymlto useubuntu-24.04instead ofubuntu-20.04container for Azure C-I tests - Updated
jinja2to version 3.1.6 (for ReadTheDocs) to fix a security issue identified by @dependabot
- Fixed parsing of
#INITVALUESsection to allow Fortrand(double-precision) exponents - Updated
int/feuler.f90to return theTexitvalue asRSTATUS(1)(this was not being done)
- Added new inline key
F90_RCONST_USEinsrc/gdata.handsrc/scanner.c - Added documentation about
F90_RCONST_USEfor ReadTheDocs - Added
F90_RCONST_USEinlined code toUpdate_RConstandUpdate_Photoroutines - Added warning that LSODE is not thread-safe to ReadTheDocs documentation
- Updated
Update_RCONSTto useYinstead ofCto account for updated variable species concentrations - Updated C-I tests to print the compiler versions that are used
- Updated routine
GenerateUpdateRconstto manually write theSUBROUTINEandEND SUBROUTINElines (F90 only) - Updated routine
GenerateUpdateRconstto inline code from#INLINE F90_RCONST_USEbefore any other F90 variable declarations or statements - Updated
.gitignoreto ignore all executable files - Changed
Begin INLINED RCONST - F90 USE STATEMENTStoBegin inlined code from F90_RCONST_USEinsrc/gen.c - Changed inlined code comments to be more precise (e.g.
Begin inlined code from F90_RCONST) insrc/gen.c - Updated Flex library installation example on ReadTheDocs
- Renamed
int/beuler.f90to theint/sdirk.f90, as this is a newer version of the SDIRK integrator - Updated documentation for Backwards Euler to instruct user to select
#INTEGRATOR sdirkwithICNTRL(3) = 6 - Updated ReadTheDocs dependency
jinja2to version 3.1.5 (fixes a security issue)
- Added
char* rootFileNameto functions and function prototypes forUse_C,Use_F,Use_F90,Use_MATLAB, andGenerate - Updated
docs/requirements.txtto usejinja2==3.1.4(fixes a security issue) - Moved
USE constants_mcmfromF90_RCONSTtoF90_RCONST_USEinexamples/mcm/mcm_isoprene.eqn - Fixed MacOS-specific handling for x86_64 or arm64 in
src/Makefile.defs
- Removed
int/beuler.f90 - Removed
int/beuler.def
- Updated Python package versions for ReadTheDocs in
docs/requirements.txt - Now request Python 3.12 for ReadTheDocs builds in
.readthedocs.yaml - Updated
MAX_NO_OF_LINESto 2000 to parse the MCM mechanism - Updaeed
MAX_EQNto 18000 to parse the MCM mechanism
- Now only add tha extra
Aoutargument toFunandFun_Splitfor F90 (see issues #56, #96)
#AUTOREDUCEhas been added to the list of KPP commands in the ReadTheDocs documentaton- Added
examples/mcmfolder with minimal example for the Master Chemical Mechanism - Added C-I test for MCM, based on the minimal example
TRANSPORTandTRANSPORTALLinput options; these were obsoleteLUMPinput option; this was obsoleteDEFRAD,SETRAD,INITIALIZE,XGRID,YGRID,ZGRID,WRITE_OPT,RUN,USE,USES; these were obsolete
- Added
.readthedocs.yamlfor configuring ReadTheDocs builds - Added a ReadTheDocs badge in
README.md - State that
#INTEGRATOR nonestatements should be removed in RTD documentation
- Added pybtex and pybtex-docutils to the
docs/requirements.txt
- Minor issues in
site-lisp/kpp.elfile for Emacs
CITATION.cfffile which will activate the "Cite this repository" option.
- Fixed a segmentation fault when using #STOICHMAT by using dynamically-sized variables
EqnNrandVarNrrather than static variablesMAX_EQNandMAX_SPECIES.
- C-language updates
- Restored driver programs
general.candgeneral_adj.c - Updated rate-law functions in
util/UserRateLaws.c - Added C-I tests for C-language integrators (using the
small_stratomechanism - Now use
//instead of/* */comment strings
- Restored driver programs
- ReadTheDocs documentation updates:
- Authors in the reference page are now listed alphabetically
- In-text citations now use the :cite:t style (e.g. "Smith et al [2000]")
- Corrected several omissions
- Removed table numbers from tables (to reduce confusion)
- Now document additional installation steps for MacOS X
- Added documentation about
KPP_FLEX_LIB_DIR - Added badges for release, release date, and Azure pipelines to index.rst
- All authors from the Lin et al [2022] paper about KPP 3.0.0 have been added to the front page of ReadTheDocs and .zenodo.json
- C-I test additions
- Added a C-I test for the
rosenbrock_autoreduceintegrator
- Added a C-I test for the
- C-I test updates
- Renamed CI-test folders for clarity (
C_*,F90_*, 'X_*') - Abstracted reusable code into the
ci-common-defs.shscript - Replaced
ci-manual-testing-script.shwithci-testing-script.sh(which now works both locally and on Azure Dev Pipelines) - Renamed
ci-manual-cleanup-script.shtoci-cleanup-script.sh - Updated docs accordingly
- Renamed CI-test folders for clarity (
- Makefile changes
Makefile.defsnow uses environment variableKPP_FLEX_LIB_DIRwhen it cannot find the flex library file in standard locations v- Removed host-specific if blocks from
Makefile.defs
- Other changes
- DOUBLE_COMPLEX is now replaced by COMPLEX(kind=dp)
- Fixed incorrect license string in .zenodo.json
- Added extra
free()statements insrc/gen.cto avoid memory leaks
- Bug fix in int/feuler.f90: FIX must be the 2nd argument passed to routine Fun (from routine FunTemplate)
- bibtex.json (no longer needed w/ Sphinx 3.5.4)
- Fun() no longer uses Vdotout since it can be retrieved from
Vdot
- New integrator: rosenbrock_autoreduce.f90
- Also added corresponding documentation for ReadTheDocs
- The
ICNTRL(5)option in the LSODE integrator is nowICNTRL(10).
- New integrators
- feuler.f90
- New C-I tests
- ros_minver
- ros_upcase
- Added scripts to run C-I tests manually (for development/debugging)
- Brought updates for GEOS-Chem into the main line of development
- Added #MINVERSION switch to force KPP to stop unless a minimum version is used
- Added #UPPERCASEF90 to generate F90 code with the .F90 suffixes
- Removed EQUIVALENCE statements from F90-generated code; VAR and FIX now point to C witihin integrators. This is to ensure thread-safe operation when using KPP-generated code in an OpenMP parallel environment.
- Bug fixes:
- Make sure to inline parameter "sp" into the _Global.F90 file when the "#DOUBLE off" option is used.
- Code updates
- Rewrote code to remove compiler warnings
- Fortran-90 makefiles now use GFORTRAN as the default compiler option
- Added ReadTheDocs output
- Updated top-of-file comment headers to point to the KPP Github site and to acknowledge new authors
- Routine Fun() now returns optional arguments Aout and Vdotout
- Updates for building on MacOS
- Reduce size of MAX_EQN and MAX_SPECIES to get KPP to run within 65532 kb of stack memory
- Brought updates from the MECCA branch into the main line of
development:
- new integrators: beuler.f90, rosenbrock_mz.f90, rosenbrock_posdef.f90, rosenbrock_posdef_h211b_qssa.f90
- several memory sizes (MAX_EQN, ...) increased to allow large chemical mechanisms
- new Makefile target: list
- LaTeX User Manual added
- Now use ICNTRL(15) to decide whether or not to toggle calling the Update_SUN, Update_RCONST, and Update_PHOTO routines from within the integrator
- Workaround for F90 derived-type objects in inlined code (i.e. properly parse State_Het%xArea, etc).
- Write global variables NUMDEN, MW, SR_MW, SR_TEMP, TEMP_OVER_K300, K300_OVER_TEMP to gckpp_Global.F90
- Documentation for ReadTheDocs (in the docs folder)
- Github issue templates
- MAX_INLINE (max # of inlined code lines to read) is now 200000
- Version number in gdata.h is now 2.3.2
- README.md now contains the ReadTheDocs badge
- README.md now points to kpp.readthedocs.io for documentation
- Comment out the Update_Sun() functions in update_sun.F90, update_sun.F
- Default rate law functions are no longer written to gckpp_Rates.F90
- Documentation for ReadTheDocs (in the docs folder)
- Github issue templates
- Version number in gdata.h is now 2.3.1
- README.md now contains the ReadTheDocs badge
- README.md now points to kpp.readthedocs.io for documentation
- Added README.md for the GC_updates branch
- Added MIT license for the GC_updates branch
- Add Aout argument to return reaction rates from SUBROUTINE Fun
- Rename KPP/kpp_2.2.3_01 folder to KPP/kpp-code
- Now write gckpp_Model.F90 and gckpp_Precision.F90 from gen.c
- Do not write file creation & time to KPP-generated files
- Now create Fortran-90 source code files with *.F90 instead of *.f90
- Remove calls to UPDATE_SUN and UPDATE_RCONST from all *.f90 integrators
- Increase MAX_INLINE from 20000 to 50000
- Add MIT license files and update README.md accordingly
- Create README.md for main branch
- Set FLEX_LIB_DIR using FLEX_HOME env variable if it is defined
- Added an exponential integrator
- Added array to *_Monitor for family names (FAM_NAMES) string vector
- Added functionality for Prod/Loss families using FAMILY token
- Add scripts necessary to build a new mechanism for GEOS-Chem
- Completed the prod/loss option (token: #FLUX [on/off])
- Added OMP THREADPRIVATE to LinearAlgebra.F90
- Added rosenbrock_split.def integrator definition
- Added OMPThreadPrivate function for F77
- Added declaration of "A" in *_Function.F90
- Added OMPThreadPrivate Functionality to F90 output
- Completed the split-form Function for f90
- Increase maximum number of equations
- Increase MAX_FAMILIES parameter from 50 to 300
- Extend equation length limit to 200 characters.
- Also changed the species name for a family to the family name itself.
- Modified Families to minimize the number of additional species created
- Rename and change indexing convention
- Remove unnecessary files
- Remove files for GEOS-Chem from top-level directory; these are now in the GEOS-Chem source code
- Delete the old name directory
- Fix to add coefficients to *_Monitor.f90
- Fixed a pad processing of terms leading to LOSS fam also generating PROD terms.
- Fix input argument to ComputeFamilies() from VAR to V - MSL
- Parameter NFAM was not defined. This is fixed. (MSL)
- Added fix to camculate NET rather than GROSS prod/loss families - MSL
- Add fix to calculate NET rather than GROSS prod/loss families - MSL
- Re-fixed the equivalence statement needed for GEOS-Chem to work. MSL
- Corrected miniterpretation of the split-form Function for f90.
- several int/*.f90: TABs converted to spaces
- several dvode files converted to unix file format
- kpp/int/beuler.f90:
- factor 101 added to Hstart
- description of the error numbers IERR added
- kpp/int/rosenbrock_posdef_h211b_qssa.f90: USE KPP_ROOT_Function, ONLY: Fun_Split
- several limits increased:
- src/gdata.h: #define MAX_K 1000
- src/scan.l: char crtToken[1000]; char nextToken[1000]; char crtFile[1000]; char crt_rate[1000];
- src/scan.y: %union{char str[1000];};
- new integrator beuler.f90 (based on sdirk.f90)
- src/gen.c: bug fix in GenerateParamHeader(): char name[MAX_SPNAME] instead of name[20]
- kpp.el updated: #REPLACE, #ENDREPLACE, uncertainty of rate coefficient
- Makefile.defs.Linux: compiler option -Wno-implicit-function-declaration
- upgrade to the official KPP version 2.2.3
- rosenbrock_mz.f90-orig deleted
- new function StoichNum to get stoichiometric numbers:
- src/gen.c: new function GenerateFun_Split()
- kp4.sh: GenerateStoichNum added to KPP_SUBROUTINE_LIST
- src/code_f90.c: Maximum number of continuation lines MAX_NO_OF_LINES increased again, now to 250
- src/gdata.h: info adjusted
- src/gen.c: "USE kpp_Parameters" added to SUBROUTINE Initialize to allow species-specific code in #INLINE F90_INIT
- several int/*.f90: TABs converted to spaces
- int/rosenbrock_mz.f90: loop fusion according to BULL
- new file Makefile.m
Changes by Domenico Taraborrelli:
- option for faster chemistry calculation by alternative time stepping
(integrator rosenbrock_posdef_h211b_qssa)
- modified files:
- src/gen.c: new function GenerateFun_Split
- kp4.sh: GenerateFun_Split added to KPP_SUBROUTINE_LIST
- new integrator files: rosenbrock_posdef_h211b_qssa.def, rosenbrock_posdef_h211b_qssa.f90
- modified files:
- src/gdata.h: several limits increased to allow larger mechanisms: #define MAX_EQN 11000 #define MAX_SPECIES 3500 #define MAX_EQNTAG 32 #define MAX_K 300
- src/gen.c:
- crow and diag deleted because they are not used
- Fortran90 double precision changed to SELECTED_REAL_KIND(12,307)
- src/Makefile: PHONY target list added to list the configuration
- src/scan.h: MAX_INLINE increased to 100000
- src/scan.l: several limits increased to allow larger mechanisms: char crtToken[300]; char nextToken[300]; char crtFile[300]; char crt_rate[300];
- src/scan.y:
- "char" increased to 300 (must be the same as MAX_K)
- util/sutil.f90: TABs converted to spaces
- Makefile, Makefile.defs, Makefile.defs.*, src/Makefile: changes to allow compilation on different machines
- src/code_matlab.c: "#include <time.h>" added because it is necessary for time_t, see: http://en.wikipedia.org/wiki/Time_t
- src/scanutil.c:
- "#include <malloc.h>" removed because it comes from <stdlib.h> (this had caused a problem on MAC-OSX)
- src/scan.y:
- "#include <malloc.h>" removed because it comes from <stdlib.h> (this had caused a problem on MAC-OSX)
- using GNU Bison 2.3 now instead of 2.1
- src/code_f90.c and src/gdata.h: changes in MAX_EQNTAG etc. to avoid problems with long equation tags
- kpp_lsode.f90, kpp_seulex.f90, rosenbrock.f90, rosenbrock_posdef.f90, runge_kutta.f90, and sdirk.f90: IERR_NAMES (for error messages) adapted to correct syntax
- src/code_f90.c:
- Maximum number of continuation lines increased to 100. If MAX_NO_OF_LINES is too small, kpp may split lines incorrectly.
- code_f90.c: added FlushBuf() to F90_DeclareData (otherwise MAX_OUTBUF would have to be very large for large reaction mechanisms)
- gen.c: The declaration of RTOLS was deleted because it is not needed by the integrators. If the driver programs need it, they can define it themselves.
- Makefile: new option maintainer-clean is now consistent with src/Makefile
- src/code_f90.c: string length of F90_types and in subroutine F90_DeclareData increased from 12 to 32 to avoid problems with long species names and long equation tags
- It looks like the model is hypersensitive to negative concentrations; many times when small negative concentrations are produced the entire future trajectory is put in jeopardy. In the new integrator rosenbrock_posdef.f90, this is fixed by changing "CALL WCOPY(N,Ynew,1,Y,1)" to "Y = MAX(Ynew,ZERO)".
- rosenbrock_soa deleted
- util/sutil.c: new subroutine KppDecompCmplxR
- new files: examples/cell.kpp, examples/saprc2006.kpp, int/runge_kutta.c, and int/sdirk.c
- int/kpp_lsode.f90: like all other integrators, kpp_lsode now also returns IERR==1 after successful completion
- src/Makefile, scan.l, scan.y: yacc replaced by bison, implementing the bug fixes suggested by Jason Lander
- models/CMAQ added
- changes in int/runge_kutta_adj.f90 and int/runge_kutta_tlm.f90
- util/blas.c: new subroutines Set2Zero and WADD
- util/blas.f90: new subroutines WGEFA and WGESL
- util/sutil.f90: new subroutines KppDecompCmplxR, KppSolveCmplxR, and KppSolveTRCmplxR
- new integrators kpp_sdirk4, rosenbrock_soa, runge_kutta, and sdirk
- integrators rosenbrock, rosenbrock_tlm, and rosenbrock_adj: completely revised
- new kpp command #DECLARE [SYMBOL|VALUE]
- util/blas.f90: new subroutine WADD
- util/sutil.f90: new subroutines KppSolveTRIndirect and KppSolveTRCmplx
- several files examples/* added
- changes in drv/general_adj.f90 and drv/general_tlm.f90
- examples/mimi* deleted