Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/docs' into docs
Browse files Browse the repository at this point in the history
  • Loading branch information
RolfSander committed May 20, 2022
2 parents 87ed9b3 + ccf0731 commit e29f90f
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 32 deletions.
10 changes: 5 additions & 5 deletions docs/source/getting_started/00_revision_history.rst
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ NOTE: Contains KPP modifications specific to GEOS-Chem

- Now create Fortran-90 source code files with :file:`*.F90` instead
of :file:`*.f90`. (NOTE: In :ref:`kpp250`, this can specified with
the :ref:`uppercasef90` command.)
the :ref:`uppercasef90-cmd` command.)

- Remove calls to UPDATE_SUN and UPDATE_RCONST from all *.f90
- Remove calls to UPDATE_SUN and UPDATE_RCONST from all :code:`*.f90`
integrators. (NOTE: This has been restored in :ref:`kpp250`.)

.. _kpp225gc:
Expand Down Expand Up @@ -171,7 +171,7 @@ NOTE: Contains KPP modifications specific to GEOS-Chem

- Added :code:`OMPThreadPrivate` function for F77.

- Added declaration of :code:`A` in :ref:`ROOT_Function`
- Added declaration of :code:`A` in :ref:`Function`

- Added :code:`OMP THREADPRIVATE` Functionality to F90 output.

Expand Down Expand Up @@ -212,7 +212,7 @@ KPP 2.2.3

- New Rosebrock method :code:`Rang3` was added.

- The new KPP command :code:`#DECLARE` was added (see :ref:`declare`).
- The new KPP command :code:`#DECLARE` was added (see :ref:`declare-cmd`).

- Several vector and array functions from :program:`BLAS` (:code:`WCOPY`,
:code:`WAXPY`, etc.) were replaced by Fortran90 expressions.
Expand Down Expand Up @@ -241,6 +241,6 @@ KPP 2.1
reactions (see :ref:`lookat-and-monitor`.

- The dummy index allows to test if a certain species occurs in the
current chemistry mechanism. (see :ref:`dummyindex`)
current chemistry mechanism. (see :ref:`dummyindex-cmd`)

- Lines starting with :code:`//` are comment lines.
2 changes: 1 addition & 1 deletion docs/source/getting_started/02_running_kpp_sample_mech.rst
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ code in the KPP language (cf. :ref:`bnf-description`):
#CHECK O; N; { Check Mass Balance of oxygen & nitrogen }
#INITVALUES { Set initial values of species }
CFACTOR = 1. ; { and et units conversion factor to 1 }
CFACTOR = 1. ; { and set units conversion factor to 1 }
O1D = 9.906E+01 ;
O = 6.624E+08 ;
O3 = 5.326E+11 ;
Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The Kinetic PreProcessor: KPP
<p>
<a href="https://github.com/KineticPreProcessor/KPP/blob/main/LICENSE.txt"><img
src="https://img.shields.io/badge/License-GPLv3-blue.svg"></a>
<a href="https://doi.org/10.5281/zenodo.4552707"><img src="https://zenodo.org/badge/DOI/10.5281/zenodo.4552707.svg"></a>
<a href="https://doi.org/10.5281/zenodo.6563908"><img src="https://zenodo.org/badge/DOI/10.5281/zenodo.6563908.svg"></a>
<a href="https://kpp.readthedocs.io/en/latest/"><img src="https://img.shields.io/readthedocs/kpp?label=ReadTheDocs"></a>
</p>

Expand Down
39 changes: 21 additions & 18 deletions docs/source/reference/editing_these_docs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
Editing this User Guide
#######################

This user guide is generated with `Sphinx <https://www.sphinx-doc.org/>`_.
Sphinx is an open-source Python project designed to make writing software documentation easier.
This user guide is generated with `Sphinx <https://www.sphinx-doc.org/>`_.
Sphinx is an open-source Python project designed to make writing software documentation easier.
The documentation is written in a reStructuredText (it's similar to markdown), which Sphinx extends for software documentation.
The source for the documentation is the :file:`docs/source` directory in top-level of the source code.

Expand All @@ -15,14 +15,17 @@ Quick start
===========

To build this user guide on your local machine, you need to install Sphinx. Sphinx is a Python 3 package and
it is available via :program:`pip`. This user guide uses the Read The Docs theme, so you will also need to
it is available via :program:`pip`. This user guide uses the Read The Docs theme, so you will also need to
install :literal:`sphinx-rtd-theme`. It also uses the `sphinxcontrib-bibtex <https://pypi.org/project/sphinxcontrib-bibtex/>`_
and `recommonmark <https://recommonmark.readthedocs.io/>`_ extensions, which you'll need to install.

.. code-block:: console
$ pip install sphinx sphinx-rtd-theme sphinxcontrib-bibtex recommonmark
$ cd $KPP_HOME/docs
$ pip install -r requirements.txt
Installing with :file:`requirements.txt` will make sure that the
proper versions of Sphinx and its dependencies will be installed.

To build this user guide locally, navigate to the :file:`docs/` directory and make the :literal:`html` target.

Expand All @@ -34,7 +37,7 @@ To build this user guide locally, navigate to the :file:`docs/` directory and ma
This will build the user guide in :file:`docs/build/html`, and you can
open :file:`index.html` in your web-browser. The source files for the
user guide are found in :file:`docs/source`.
user guide are found in :file:`docs/source`.

.. note::

Expand All @@ -50,27 +53,27 @@ can be easily miswritten. Two important things you should know right away are:
* Indents are 3-spaces
* "Things" are separated by 1 blank line. For example, a list or
code-block following a paragraph should be separated from the
paragraph by 1 blank line.
paragraph by 1 blank line.

You should keep these in mind when you're first getting
started. Dedicating an hour to learning reST will save you time in the
long-run. Below are some good resources for learning reST.

* `reStructuredText primer
<https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html>`_:
(single best resource; however, it's better read than skimmed)
(single best resource; however, it's better read than skimmed)
* Official `reStructuredText reference
<https://docutils.sourceforge.io/docs/user/rst/quickref.html>`_
(there is *a lot* of information here)
(there is *a lot* of information here)
* `Presentation by Eric Holscher
<https://www.youtube.com/watch?v=eWNiwMwMcr4>`_ (co-founder of Read
The Docs) at DjangoCon US 2015 (the entire presentation is good, but
reST is described from 9:03 to 21:04)
reST is described from 9:03 to 21:04)
* `YouTube tutorial by Audrey Tavares's
<https://www.youtube.com/watch?v=DSIuLnoKLd8>`_
<https://www.youtube.com/watch?v=DSIuLnoKLd8>`_

A good starting point would be Eric Holscher's presentations followed
by the reStructuredText primer.
by the reStructuredText primer.

================
Style guidelines
Expand All @@ -96,19 +99,19 @@ For **titles and headers**:
the :literal:`:file:` role.

**Program names** (e.g. :program:`cmake`) occuring in the text should
use the :literal:`:program:` role.
use the :literal:`:program:` role.

**OS-level commands** (e.g. :command:`rm`) occuring in the text should
use the :literal:`:command:` role.
use the :literal:`:command:` role.

**Environment variables** occuring in the text should use the
:literal:`:envvar:` role.
:literal:`:envvar:` role.

**Inline code** or code variables occuring in the text should use the
:literal:`:code:` role.
:literal:`:code:` role.

**Code snippets** should use :literal:`.. code-block:: <language>`
directive like so
directive like so

.. code-block:: none
Expand All @@ -117,7 +120,7 @@ directive like so
import gcpy
print("hello world")
The language can be "none" to omit syntax highlighting.
The language can be "none" to omit syntax highlighting.

For command line instructions, the "console" language should be
used. The :literal:`$` should be used to denote the console's
Expand All @@ -126,4 +129,4 @@ instructions, a prompt like :literal:`gcuser:~/path1/path2$` should be
used.

**Inline literals** (e.g. the :literal:`$` above) should use the
:literal:`:literal:` role.
:literal:`:literal:` role.
2 changes: 1 addition & 1 deletion docs/source/tech_info/07_numerical_methods.rst
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ Details can be found in the comment lines of the individual integrator files

Number of function calls.

.. option:: ISTATUS_U(2)`
.. option:: ISTATUS_U(2)

Number of Jacobian calls.

Expand Down
10 changes: 8 additions & 2 deletions docs/source/using_kpp/04_input_for_kpp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -372,9 +372,9 @@ A KPP command begins on a new line with a :code:`#` sign, followed by a
command name and one or more parameters. Details about each command
are given in the following subsections.

.. table::
.. table::
:align: center

+--------------------------+-----------------------+
| KPP command | default value |
+==========================+=======================+
Expand Down Expand Up @@ -651,6 +651,12 @@ for the fill-in due to the LU decomposition.
#LANGUAGE
---------

.. attention::

The :command:`Fortran77` language option is deprecated in
:ref:`kpp250` and later versions. All further KPP development will
only support Fortran90.

The :command:`#LANGUAGE` command selects the target language in which the
code file is to be generated. Available options are :command:`Fortran90`,
:command:`C`, or :command:`matlab`.
Expand Down
6 changes: 3 additions & 3 deletions docs/source/using_kpp/05_output_from_kpp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ initialized in :file:`ROOT_Parameters.f90` (or :file:`.F90`).
+----------------+---------------------------------------------+--------+
| Parameter | Represents | Value |
+================+=============================================+========+
| ``NSPEC`` | No. chemical species (:code:`NVAR+NFIX`) | 7 |
| ``NSPEC`` | No. chemical species (``NVAR`` + ``NFIX``) | 7 |
+----------------+---------------------------------------------+--------+
| ``NVAR`` | No. variable species | 5 |
+----------------+---------------------------------------------+--------+
Expand All @@ -203,9 +203,9 @@ initialized in :file:`ROOT_Parameters.f90` (or :file:`.F90`).
| ``indf_spc`` | Index of fixed species *spc* in :code:`FIX` | |
+----------------+---------------------------------------------+--------+

NOTE: Values listed the 3rd column of Table 5 are from the
Values listed the 3rd column of Table 5 are from the
:command:`small_strato` mechanism
(cf. :ref:`running-kpp-with-an-example-mechanism`).
(cf. :ref:`running-kpp-with-an-example-mechanism`).

KPP orders the variable species such that the sparsity pattern of the
Jacobian is maintained after an LU decomposition. For our example there
Expand Down
2 changes: 1 addition & 1 deletion models/small_strato.def
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#CHECK O; N; { Check Mass Balance of oxygen & nitrogen }

#INITVALUES { Set initial values of species }
CFACTOR = 1. ; { and et units conversion factor to 1 }
CFACTOR = 1. ; { and set units conversion factor to 1 }
O1D = 9.906E+01 ;
O = 6.624E+08 ;
O3 = 5.326E+11 ;
Expand Down

0 comments on commit e29f90f

Please sign in to comment.