Skip to content

Commit

Permalink
KPP 3.1.1 release
Browse files Browse the repository at this point in the history
This is the release commit for KPP version 3.1.1.
Please see CHANGELOG.md for a list of updates.

Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
  • Loading branch information
yantosca committed Apr 30, 2024
2 parents 5a28a0d + 68d4014 commit cd03fe0
Show file tree
Hide file tree
Showing 11 changed files with 87 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.7"
python: "3.12"
nodejs: "14"
rust: "1.55"
golang: "1.17"
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.1.1] - 2024-04-30
### Changed
- 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_LINES` to 2000 to parse the MCM mechanism
- Updaeed `MAX_EQN` to 18000 to parse the MCM mechanism

### Fixed
- Now only add tha extra `Aout` argument to `Fun` and `Fun_Split` for F90 (see issues #56, #96)

<!-- Version numbers must be synchronized in CHANGELOG.md, -->
<!-- src/gdata.h, and docs/source/conf.py-->
## [3.1.0] - 2023-12-20
Expand Down
21 changes: 13 additions & 8 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
# Requirements for building the KPP documentation
# ======================================================================
# ReadTheDocs requirements file
#
# These Python package versions have been proven to work:
# If you wish to install the dependencies for building the ReadTheDocs
# ReadTheDocs documentation from PyPI (the Python Package Index), use:
#
sphinx==3.5.4
sphinx_rtd_theme==0.5.2
sphinxcontrib-bibtex==2.2.0
recommonmark
docutils==0.16
jinja2==3.0.3
# $ pip install -r requirements.txt
# ======================================================================
sphinx==7.2.6
sphinx_rtd_theme==2.0.0
sphinxcontrib-bibtex==2.6.2
sphinx-autobuild==2021.3.14
recommonmark==0.7.1
docutils==0.20.1
jinja2==3.1.3
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# The full version, including alpha/beta/rc tags
# (version numbers must be synchronized in CHANGELOG.md, src/gdata.h,
# and docs/source/conf.py)
release = "3.1.0"
release = "3.1.1"


# -- General configuration ---------------------------------------------------
Expand Down
25 changes: 25 additions & 0 deletions docs/source/getting_started/00_revision_history.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,31 @@ Only the major new features are listed here. For a detailed description
of the changes, read `CHANGELOG.md
<https://github.com/KineticPreProcessor/KPP/blob/main/CHANGELOG.md>`_.

.. _kpp311:

=========
KPP 3.1.1
=========

.. _kpp310:
- Use newer Python packages to build ReadTheDocs documentation (see
:file:`docs/requirements.txt`)
- Increased :code:`MAX_NO_OF_LINES` and :code:`MAX_EQN` in order to
parse the entire MCM mechanism
- Now only add the extra `Aout` argument to `Fun` and `Fun_Split` for
target language :literal:`Fortran90`. This fixes a Matlab build error.

=========
KPP 3.1.0
=========

- Added :literal:`#AUTOREDUCE` to the list of KPP commands in the
ReadTheDocs documentaton
- Added :file:`examples/mcm` folder with minimal example for the
Master Chemical Mechanism
- Added C-I test for MCM, based on the minimal example
- Removed obsolete input options from the code and documentation

.. _kpp302:

=========
Expand Down
4 changes: 2 additions & 2 deletions docs/source/using_kpp/04_input_for_kpp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -929,8 +929,8 @@ or define variables directly, e.g.:
Note that the :code:`USE` statements must precede any variable
definitions.

The inlined code will be placed directly into the :code:`UPDATE_RCONST`
routine in the :ref:`Rates` function.
The inlined code will be placed directly into the subroutines
:code:`UPDATE_RCONST` and :code:`UPDATE_PHOTO` in the :ref:`Rates` file.

.. _f90-util:

Expand Down
4 changes: 2 additions & 2 deletions examples/mcm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ degradation mechanism is used as an example.
1. Browse through the [MCM](https://mcm.york.ac.uk/MCM/browse) and
select a Subset of the mechanism.

2. Go to the [export page](https://mcm.york.ac.uk/MCM/export) and
choose KPP as the output format.
2. Go to the [export page](https://mcm.york.ac.uk/MCM/export) and choose
KPP as the output format.

3. Click on the `Download` button and rename the downloaded file to
`mcm_isoprene.eqn`.
Expand Down
2 changes: 1 addition & 1 deletion src/code_f90.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ int first;
int crtident;

/* if MAX_NO_OF_LINES is too small, KPP will split lines incorrectly */
int number_of_lines = 1, MAX_NO_OF_LINES = 250;
int number_of_lines = 1, MAX_NO_OF_LINES = 2000;

/* Operator Mapping: 0xaa = '*' | 0xab = '+' | 0xac = ','
0xad = '-' | 0xae ='.' | 0xaf = '/' */
Expand Down
7 changes: 5 additions & 2 deletions src/gdata.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

// Version numbers must be synchronized in CHANGELOG.md, src/gdata.h,
// and docs/source/conf.py
#define KPP_VERSION "3.1.0"
#define KPP_VERSION "3.1.1"

#ifndef _GDATA_H_
#define _GDATA_H_
Expand All @@ -57,11 +57,14 @@
// problems on MacOS then consider reducing MAX_EQN and MAX_SPECIES
// to smaller values than are listed below.
// -- Bob Yantosca (03 May 2022)
// (3) The large value of MAX_EQN = 18000 is necessary to run the
// complete MCM mechanism in KPP.
// -- Rolf Sander (2024-01-03)
#ifdef MACOS
#define MAX_EQN 2000 // Max number of equations (MacOS only)
#define MAX_SPECIES 1000 // Max number of species (MacOS only)
#else
#define MAX_EQN 11000 // Max number of equations
#define MAX_EQN 18000 // Max number of equations
#define MAX_SPECIES 6000 // Max number of species
#endif
#define MAX_SPNAME 30 // Max char length of species name
Expand Down
34 changes: 26 additions & 8 deletions src/gen.c
Original file line number Diff line number Diff line change
Expand Up @@ -652,24 +652,42 @@ int F_VAR, FSPLIT_VAR;
// Note: When changing the FunctionBegin declarations below,
// the number of arguments minus one must be changed in DefFnc here
// as well. (hplin, 7/6/22)
F_VAR = DefFnc( "Fun", 5,
"time derivatives of variables - Aggregate form");

FSPLIT_VAR = DefFnc( "Fun_SPLIT", 7,
"time derivatives of variables - Split form");

//
// For F90, add an extra argument to Fun and Fun_Split to return
// the Aout array. (hplin, bmy, 30 Apr 2024)
if (useLang == F90_LANG) {
F_VAR = DefFnc("Fun", 5,
"time derivatives of variables - Aggregate form");
FSPLIT_VAR = DefFnc("Fun_SPLIT", 7,
"time derivatives of variables - Split form");
} else {
F_VAR = DefFnc("Fun", 4,
"time derivatives of variables - Aggregate form");
FSPLIT_VAR = DefFnc("Fun_SPLIT", 6,
"time derivatives of variables - Split form");
}

// We have added the capability to return equation rates and the
// time derivative of variable species from Fun via optional arguments
// Aout and VdotOut (when z_useAggregate=1)
// -- Bob Yantosca (03 May 2022)
//
// Vdotout functionality can be accomplished using Vdot (hplin, 7/6/22)
//
// F90 needs Fun to have an extra argument for Aout (hplin, bmy, 30 Apr 2024)
if( z_useAggregate ) {
FunctionBegin( F_VAR, V, F, RCT, Vdot, Aout );
if (useLang == F90_LANG) {
FunctionBegin( F_VAR, V, F, RCT, Vdot, Aout );\
} else {
FunctionBegin( F_VAR, V, F, RCT, Vdot );
}
}
else {
FunctionBegin( FSPLIT_VAR, V, F, RCT, Vdot, P_VAR, D_VAR, Aout );
if (useLang == F90_LANG) {
FunctionBegin( FSPLIT_VAR, V, F, RCT, Vdot, P_VAR, D_VAR, Aout );
} else {
FunctionBegin( FSPLIT_VAR, V, F, RCT, Vdot, P_VAR, D_VAR );
}
}

if ( (useLang==MATLAB_LANG)&&(!z_useAggregate) )
Expand Down
2 changes: 1 addition & 1 deletion util/Makefile_f90
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ FC_HPUX = f90
FOPT_HPUX = -O -u +Oall +check=on

FC_GFORTRAN = gfortran
FOPT_GFORTRAN = -cpp -O -g
FOPT_GFORTRAN = -cpp -O -g -frecursive

# define FULL_ALGEBRA for non-sparse integration
FC = $(FC_$(COMPILER))
Expand Down

0 comments on commit cd03fe0

Please sign in to comment.