diff --git a/fortran/doc/gen_doc.md b/fortran/doc/gen_doc.md
index ea66ad7..cab0c29 100644
--- a/fortran/doc/gen_doc.md
+++ b/fortran/doc/gen_doc.md
@@ -1,8 +1,11 @@
-# Modular arbitrary-order ocean-atmosphere model: MAOOAM -- Fortran implementation #
+# Modular arbitrary-order ocean-atmosphere model: MAOOAM -- Fortran implementation
+## Lyapunov exponents computation version
+
+------------------------------------------------------------------------
## About ##
-(c) 2013-2016 Lesley De Cruz and Jonathan Demaeyer
+(c) 2013-2016 Lesley De Cruz, Jonathan Demaeyer and Sebastian Schubert
See [LICENSE.txt](../LICENSE.txt) for license information.
@@ -27,6 +30,27 @@ A pdf version of this manual is available [here](../latex/Reference_manual.pdf).
------------------------------------------------------------------------
+## Note on the Lyapunov exponents computation
+
+This version of the code allows for the computation of the backward Lyapunov
+exponents. The method used is described in
+
+* Benettin, G., Galgani, L., Giorgilli, A., and Strelcyn, J. M. : Lyapunov
+characteristic exponents for smooth dynamical systems; a method for computing
+all of them. Part 2: Numerical application. Meccanica, 15, 21-30,
+[doi:10.1007/BF02128237](http://dx.doi.org/10.1007/BF02128237), 1980.
+
+This version has been used to compute the Lyapunov exponents of MAOOAM in the
+following manuscript:
+
+* De Cruz, L., Schubert, S., Demaeyer, J., Lucarini, V., and Vannitsem, S.:
+Exploring the Lyapunov instability properties of high-dimensional atmospheric
+and climate models, Nonlin. Processes Geophys. Discuss.,
+[doi:10.5194/npg-2017-76](https://doi.org/10.5194/npg-2017-76), in
+review, 2018.
+
+------------------------------------------------------------------------
+
## Installation ##
The program can be installed with Makefile. We provide configuration files for
@@ -77,7 +101,10 @@ includes all the coefficients. This tensor is computed once at the program
initialization.
* maooam.f90 : Main program.
+* maooam_lyap.f90 : Version of the main program with the computation of the Lyapunov exponents.
+* maooam_lyap_div.f90 : Version of the main program with the computation of the first Lyapunov exponents with the divergence method.
* aotensor_def.f90 : Tensor aotensor computation module.
+* lyap_vectors.f90 : Module for the computation of Lyapunov exponents and vectors
* IC_def.f90 : A module which loads the user specified initial condition.
* inprod_analytic.f90 : Inner products computation module.
* rk2_integrator.f90 : A module which contains the Heun integrator for the model equations.
@@ -105,6 +132,8 @@ initialization.
The user first has to fill the params.nml and int_params.nml namelist files according to their needs.
Indeed, model and integration parameters can be specified respectively in the params.nml and int_params.nml namelist files. Some examples related to already published article are available in the params folder.
+The parameters related to the Lyapunov exponents computation are located in the int_params.nml namelist file.
+
The modeselection.nml namelist can then be filled :
* NBOC and NBATM specify the number of blocks that will be used in respectively the ocean and
the atmosphere. Each block corresponds to a given x and y wavenumber.
@@ -125,7 +154,7 @@ By default a RK2 scheme is selected.
Finally, the IC.nml file specifying the initial condition should be defined. To
obtain an example of this configuration file corresponding to the model you
have previously defined, simply delete the current IC.nml file (if it exists)
-and run the program :
+and run the main program :
./maooam
@@ -142,6 +171,25 @@ The tangent linear and adjoint models of MAOOAM are provided in the
tl_ad_tensor, rk2_tl_ad_integrator and rk4_tl_ad_integrator modules. It is
documented [here](./md_doc_tl_ad_doc.html).
+The computation of the Lyapunov exponents can be done by running the program :
+
+ ./maooam_lyap
+
+It will generate four files:
+ * evol_field.dat : the recorded time evolution of the variables.
+ * mean_field.dat : the mean field (the climatology)
+ * lyapunov_exponents.dat : the recorded time evolution of the Lyapunov exponents
+ * mean_lyapunov.dat : the mean Lyapunov exponents as well as their variance.
+
+Alternatively, the first Lyapunov exponent can be computed by the divergence method,
+by running :
+
+ ./maooam_lyap_div
+
+It will generate three files :
+ * evol_field.dat : the recorded time evolution of the variables.
+ * mean_field.dat : the mean field (the climatology)
+ * lyapunov_exponents_div.dat : the recorded time evolution of the first Lyapunov exponent
------------------------------------------------------------------------
diff --git a/fortran/doc/html/LICENSE_8txt.html b/fortran/doc/html/LICENSE_8txt.html
index 7a42488..f60d335 100644
--- a/fortran/doc/html/LICENSE_8txt.html
+++ b/fortran/doc/html/LICENSE_8txt.html
@@ -479,7 +479,7 @@
diff --git a/fortran/doc/html/annotated.html b/fortran/doc/html/annotated.html
index 63a0d90..519b201 100644
--- a/fortran/doc/html/annotated.html
+++ b/fortran/doc/html/annotated.html
@@ -107,7 +107,7 @@
diff --git a/fortran/doc/html/aotensor__def_8f90.html b/fortran/doc/html/aotensor__def_8f90.html
index c77ef76..2340559 100644
--- a/fortran/doc/html/aotensor__def_8f90.html
+++ b/fortran/doc/html/aotensor__def_8f90.html
@@ -150,7 +150,7 @@
diff --git a/fortran/doc/html/aotensor__def_8f90_source.html b/fortran/doc/html/aotensor__def_8f90_source.html
index d5a948a..472c148 100644
--- a/fortran/doc/html/aotensor__def_8f90_source.html
+++ b/fortran/doc/html/aotensor__def_8f90_source.html
@@ -139,7 +139,7 @@
diff --git a/fortran/doc/html/classes.html b/fortran/doc/html/classes.html
index 0f98971..b3f597b 100644
--- a/fortran/doc/html/classes.html
+++ b/fortran/doc/html/classes.html
@@ -107,7 +107,7 @@
diff --git a/fortran/doc/html/files.html b/fortran/doc/html/files.html
index 28968e7..832a81e 100644
--- a/fortran/doc/html/files.html
+++ b/fortran/doc/html/files.html
@@ -121,7 +121,7 @@
diff --git a/fortran/doc/html/functions.html b/fortran/doc/html/functions.html
index caaee78..de8c1b9 100644
--- a/fortran/doc/html/functions.html
+++ b/fortran/doc/html/functions.html
@@ -166,7 +166,7 @@
diff --git a/fortran/doc/html/functions_vars.html b/fortran/doc/html/functions_vars.html
index 76a856f..a209fce 100644
--- a/fortran/doc/html/functions_vars.html
+++ b/fortran/doc/html/functions_vars.html
@@ -166,7 +166,7 @@
diff --git a/fortran/doc/html/gen__doc_8md.html b/fortran/doc/html/gen__doc_8md.html
index dfcc532..0a7cbc4 100644
--- a/fortran/doc/html/gen__doc_8md.html
+++ b/fortran/doc/html/gen__doc_8md.html
@@ -97,7 +97,7 @@
diff --git a/fortran/doc/html/gen__doc_8md_source.html b/fortran/doc/html/gen__doc_8md_source.html
index 857f37b..277bace 100644
--- a/fortran/doc/html/gen__doc_8md_source.html
+++ b/fortran/doc/html/gen__doc_8md_source.html
@@ -92,10 +92,10 @@
1 # Modular arbitrary-order ocean-atmosphere model: MAOOAM -- Fortran implementation
2 ## Lyapunov exponents computation version
4 ------------------------------------------------------------------------
8 (c) 2013-2016 Lesley De Cruz, Jonathan Demaeyer and Sebastian Schubert
10 See [LICENSE.txt](../LICENSE.txt) for license information.
12 This software is provided as supplementary material with:
14 * De Cruz, L., Demaeyer, J. and Vannitsem, S.: The Modular Arbitrary-Order
15 Ocean-Atmosphere Model: MAOOAM v1.0, Geosci. Model Dev., 9, 2793-2808,
16 [doi:10.5194/gmd-9-2793-2016](http://dx.doi.org/10.5194/gmd-9-2793-2016), 2016.
18 **Please cite this article if you use (a part of) this software for a
21 The authors would appreciate it if you could also send a reprint of
22 your paper to <lesley.decruz@meteo.be>, <jonathan.demaeyer@meteo.be> and
25 Consult the MAOOAM [code repository](http://www.github.com/Climdyn/MAOOAM)
26 for updates, and [our website](http://climdyn.meteo.be) for additional
29 A pdf version of this manual is available [here](../latex/Reference_manual.pdf).
31 ------------------------------------------------------------------------
33 ## Note on the Lyapunov exponents computation
35 This version of the code allows for the computation of the backward Lyapunov
36 exponents. The method used is described in
38 * Benettin, G., Galgani, L., Giorgilli, A., and Strelcyn, J. M. : Lyapunov
39 characteristic exponents for smooth dynamical systems; a method for computing
40 all of them. Part 2: Numerical application. Meccanica, 15, 21-30,
41 [doi:10.1007/BF02128237](http://dx.doi.org/10.1007/BF02128237), 1980.
43 This version has been used to compute the Lyapunov exponents of MAOOAM in the
46 * De Cruz, L., Schubert, S., Demaeyer, J., Lucarini, V., and Vannitsem, S.:
47 Exploring the Lyapunov instability properties of high-dimensional atmospheric
48 and climate models, Nonlin. Processes Geophys. Discuss.,
49 [doi:10.5194/npg-2017-76](https://doi.org/10.5194/npg-2017-76), in
52 ------------------------------------------------------------------------
56 The program can be installed with Makefile. We provide configuration files for
57 two compilers : gfortran and ifort.
59 By default, gfortran is selected. To select one or the other, simply modify the
60 Makefile accordingly or pass the COMPILER flag to `make`. If gfortran is
61 selected, the code should be compiled with gfortran 4.7+ (allows for
62 allocatable arrays in namelists). If ifort is selected, the code has been
63 tested with the version 14.0.2 and we do not guarantee compatibility with older
66 To install, unpack the archive in a folder or clone with git:
69 git clone https://github.com/Climdyn/MAOOAM.git
78 By default, the inner products of the basis functions, used to compute the
79 coefficients of the ODEs, are not stored in memory. If you want to enable the
80 storage in memory of these inner products, run make with the following flag:
86 Depending on the chosen resolution, storing the inner products may result in a
87 huge memory usage and is not recommended unless you need them for a specific
90 Remark: The command "make clean" removes the compiled files.
92 For Windows users, a minimalistic GNU development environment
93 (including gfortran and make) is available at [www.mingw.org](http://www.mingw.org) .
95 ------------------------------------------------------------------------
97 ## Description of the files ##
99 The model tendencies are represented through a tensor called aotensor which
100 includes all the coefficients. This tensor is computed once at the program
103 * maooam.f90 : Main program.
104 * maooam_lyap.f90 : Version of the main program with the computation of the Lyapunov exponents.
105 * maooam_lyap_div.f90 : Version of the main program with the computation of the first Lyapunov exponents with the divergence method.
106 * aotensor_def.f90 : Tensor aotensor computation module.
107 * lyap_vectors.f90 : Module for the computation of Lyapunov exponents and vectors
108 * IC_def.f90 : A module which loads the user specified initial condition.
109 * inprod_analytic.f90 : Inner products computation module.
110 * rk2_integrator.f90 : A module which contains the Heun integrator for the model equations.
111 * rk4_integrator.f90 : A module which contains the RK4 integrator for the model equations.
112 * Makefile : The Makefile.
113 * params.f90 : The model parameters module.
114 * tl_ad_tensor.f90 : Tangent Linear (TL) and Adjoint (AD) model tensors definition module
115 * rk2_tl_ad_integrator.f90 : Heun Tangent Linear (TL) and Adjoint (AD) model integrators module
116 * rk4_tl_ad_integrator.f90 : RK4 Tangent Linear (TL) and Adjoint (AD) model integrators module
117 * test_tl_ad.f90 : Tests for the Tangent Linear (TL) and Adjoint (AD) model versions
118 * README.md : A read me file.
119 * LICENSE.txt : The license text of the program.
120 * util.f90 : A module with various useful functions.
121 * tensor.f90 : Tensor utility module.
122 * stat.f90 : A module for statistic accumulation.
123 * params.nml : A namelist to specify the model parameters.
124 * int_params.nml : A namelist to specify the integration parameters.
125 * modeselection.nml : A namelist to specify which spectral decomposition will be used.
128 ------------------------------------------------------------------------
132 The user first has to fill the params.nml and int_params.nml namelist files according to their needs.
133 Indeed, model and integration parameters can be specified respectively in the params.nml and int_params.nml namelist files. Some examples related to already published article are available in the params folder.
135 The parameters related to the Lyapunov exponents computation are located in the int_params.nml namelist file.
137 The modeselection.nml namelist can then be filled :
138 * NBOC and NBATM specify the number of blocks that will be used in respectively the ocean and
139 the atmosphere. Each block corresponds to a given x and y wavenumber.
140 * The OMS and AMS arrays are integer arrays which specify which wavenumbers of
141 the spectral decomposition will be used in respectively the ocean and the
142 atmosphere. Their shapes are OMS(NBOC,2) and AMS(NBATM,2).
143 * The first dimension specifies the number attributed by the user to the block and the second
144 dimension specifies the x and the y wavenumbers.
145 * The VDDG model, described in Vannitsem et al. (2015) is given as an example
147 * Note that the variables of the model are numbered according to the chosen
150 The Makefile allows to change the integrator being used for the time evolution.
151 The user should modify it according to its need.
152 By default a RK2 scheme is selected.
154 Finally, the IC.nml file specifying the initial condition should be defined. To
155 obtain an example of this configuration file corresponding to the model you
156 have previously defined, simply delete the current IC.nml file (if it exists)
157 and run the main program :
161 It will generate a new one and start with the 0 initial condition. If you want another
162 initial condition, stop the program, fill the newly generated file and restart :
166 It will generate two files :
167 * evol_field.dat : the recorded time evolution of the variables.
168 * mean_field.dat : the mean field (the climatology)
170 The tangent linear and adjoint models of MAOOAM are provided in the
171 tl_ad_tensor, rk2_tl_ad_integrator and rk4_tl_ad_integrator modules. It is
172 documented [here](./md_doc_tl_ad_doc.html).
174 The computation of the Lyapunov exponents can be done by running the program :
178 It will generate four files:
179 * evol_field.dat : the recorded time evolution of the variables.
180 * mean_field.dat : the mean field (the climatology)
181 * lyapunov_exponents.dat : the recorded time evolution of the Lyapunov exponents
182 * mean_lyapunov.dat : the mean Lyapunov exponents as well as their variance.
184 Alternatively, the first Lyapunov exponent can be computed by the divergence method,
189 It will generate three files :
190 * evol_field.dat : the recorded time evolution of the variables.
191 * mean_field.dat : the mean field (the climatology)
192 * lyapunov_exponents_div.dat : the recorded time evolution of the first Lyapunov exponent
194 ------------------------------------------------------------------------
196 ## Implementation notes ##
198 As the system of differential equations is at most bilinear in \f$y_j\f$ (\f$j=1..n\f$),
199 \f$\boldsymbol{y}\f$ being the array of variables, it can be expressed as a tensor
202 \f[ \frac{d y_i}{dt} = \sum_{j,k=0}^{ndim} \, \mathcal{T}_{i,j,k} \, y_k \; y_j \f]
207 The tensor aotensor_def::aotensor is the tensor \f$\mathcal{T}\f$ that encodes the differential equations is composed so that:
209 * \f$\mathcal{T}_{i,j,k}\f$ contains the contribution of \f$dy_i/dt\f$ proportional to \f$ y_j \, y_k\f$.
210 * Furthermore, \f$y_0\f$ is always equal to 1, so that \f$\mathcal{T}_{i,0,0}\f$ is the constant
211 contribution to \f$dy_i/dt\f$
212 * \f$\mathcal{T}_{i,j,0} + \mathcal{T}_{i,0,j}\f$ is the contribution to \f$dy_i/dt\f$ which is linear in
215 Ideally, the tensor aotensor_def::aotensor is composed as an upper triangular matrix
216 (in the last two coordinates).
218 The tensor for this model is composed in the aotensor_def module and uses the
219 inner products defined in the inprod_analytic module.
222 ------------------------------------------------------------------------
226 The authors would like to thank Kris for help with the lua2fortran project. It
227 has greatly reduced the amount of (error-prone) work.
229 No animals were harmed during the coding process.
diff --git a/fortran/doc/html/globals.html b/fortran/doc/html/globals.html
index 5fa2eb0..c9c0c0f 100644
--- a/fortran/doc/html/globals.html
+++ b/fortran/doc/html/globals.html
@@ -271,7 +271,7 @@ Modular arbitrary-order ocean-atmosphere model: MAOOAM -- Fortran implementation