Index: trunk/LMDZ.TITAN/libf/muphytitan/mmp_moments.f90
===================================================================
--- trunk/LMDZ.TITAN/libf/muphytitan/mmp_moments.f90	(revision 1897)
+++ trunk/LMDZ.TITAN/libf/muphytitan/mmp_moments.f90	(revision 3083)
@@ -1,21 +1,21 @@
-! Copyright 2013-2015,2017 Université de Reims Champagne-Ardenne 
+! Copyright 2013-2015,2017,2022 Université de Reims Champagne-Ardenne
 ! Contributor: J. Burgalat (GSMA, URCA)
 ! email of the author : jeremie.burgalat@univ-reims.fr
-! 
+!
 ! This software is a computer program whose purpose is to compute
 ! microphysics processes using a two-moments scheme.
-! 
+!
 ! This library is governed by the CeCILL license under French law and
-! abiding by the rules of distribution of free software.  You can  use, 
+! abiding by the rules of distribution of free software.  You can  use,
 ! modify and/ or redistribute the software under the terms of the CeCILL
 ! license as circulated by CEA, CNRS and INRIA at the following URL
-! "http://www.cecill.info". 
-! 
+! "http://www.cecill.info".
+!
 ! As a counterpart to the access to the source code and  rights to copy,
 ! modify and redistribute granted by the license, users are provided only
 ! with a limited warranty  and the software's author,  the holder of the
 ! economic rights,  and the successive licensors  have only  limited
-! liability. 
-! 
+! liability.
+!
 ! In this respect, the user's attention is drawn to the risks associated
 ! with loading,  using,  modifying and/or developing or reproducing the
@@ -25,8 +25,8 @@
 ! professionals having in-depth computer knowledge. Users are therefore
 ! encouraged to load and test the software's suitability as regards their
-! requirements in conditions enabling the security of their systems and/or 
-! data to be ensured and,  more generally, to use and operate it in the 
-! same conditions as regards security. 
-! 
+! requirements in conditions enabling the security of their systems and/or
+! data to be ensured and,  more generally, to use and operate it in the
+! same conditions as regards security.
+!
 ! The fact that you are presently reading this means that you have had
 ! knowledge of the CeCILL license and that you accept its terms.
@@ -35,16 +35,16 @@
 !! summary: YAMMS/MP2M model external methods
 !! author: J. Burgalat
-!! date: 2013-2015,2017
+!! date: 2013-2015,2017,2022
 !!
 !! This file contains the definitions of all external methods that should be defined
-!! for mp2m library. 
-!! 
-!! All the methods defined here satisify the interfaces defined in __m_interfaces__ module 
+!! for mp2m library.
+!!
+!! All the methods defined here satisify the interfaces defined in __m_interfaces__ module
 !! of YAMMS library.
 
 PURE FUNCTION mm_alpha_s(k) RESULT (res)
   !! Inter-moment relation for spherical aerosols size distribution law.
-  !! 
-  !! The method computes the relation between the kth order moment and the 0th 
+  !!
+  !! The method computes the relation between the kth order moment and the 0th
   !! order moment of the size-distribution law:
   !!
@@ -58,5 +58,5 @@
   res = SUM(dexp(mmp_asp%a*k**2+mmp_asp%b*k+mmp_asp%c))
   RETURN
-END FUNCTION mm_alpha_s 
+END FUNCTION mm_alpha_s
 
 PURE FUNCTION mm_alpha_f(k) RESULT (res)
@@ -81,15 +81,15 @@
   !!
   !! @warning
-  !! Here, the method assumes the datasets define the probability for __spherical__ particles to 
+  !! Here, the method assumes the datasets define the probability for __spherical__ particles to
   !! be transferred in the __fractal__ mode, but returns the proportion of particles that remains
   !! in the mode (which is expected by mp2m model).
   !!
   !! @attention
-  !! If value cannot be interpolated, the method aborts the program. Normally, it cannot happen 
+  !! If value cannot be interpolated, the method aborts the program. Normally, it cannot happen
   !! since we extrapolate the probability for characteristic radius value out of range.
   !!
   !! @attention
-  !! Consequently, as the probability can only range from 0 to 1, it is wise to ensure that the 
-  !! look-up table limits this range: To do so, one can just add two values at the start and end 
+  !! Consequently, as the probability can only range from 0 to 1, it is wise to ensure that the
+  !! look-up table limits this range: To do so, one can just add two values at the start and end
   !! of the table with probabilities respectively set to 0 and 1.
   USE LINTDSET
@@ -111,5 +111,5 @@
   TYPE(dset1d), POINTER :: pp
   res = 1._mm_wp
-  IF (rcs <= 0.0_mm_wp .OR. .NOT.mmp_w_ps2s) RETURN 
+  IF (rcs <= 0.0_mm_wp .OR. .NOT.mmp_w_ps2s) RETURN
   SELECT CASE(k+flow)
     CASE(0)      ; pp => mmp_pco0p ! 0 = 0 + 0 -> M0 / CO
@@ -119,9 +119,9 @@
     CASE DEFAULT ; RETURN
   END SELECT
-  IF (.NOT.hdcd_lint_dset(rcs,pp,locate_reg_ext,res)) THEN 
+  IF (.NOT.hdcd_lint_dset(rcs,pp,locate_reg_ext,res)) THEN
     WRITE(*,'(a)') "mm_moments:ps2s_sc: Cannot interpolate transfert probability"
     call EXIT(10)
   ELSE
-    ! 05102017: do not care anymore for bad extrapolation: 
+    ! 05102017: do not care anymore for bad extrapolation:
     ! Bound probability value between 0 and 1
     ! note: The input look-up table still must have strict monotic variation or
@@ -139,10 +139,10 @@
   !! kernel as a function of the temperature, pressure and the characteristic radius of
   !! the mode involved in the coagulation.
-  !! 
+  !!
   !! Modes are referred by a two letters uppercase string with the combination of:
   !!
   !! - S : spherical mode
   !! - F : fractal mode
-  !! 
+  !!
   !! For example, SS means intra-modal coagulation for spherical particles.
   !!
@@ -159,10 +159,10 @@
   CHARACTER(len=2), INTENT(in)  :: modes !! Interaction mode (a combination of [S,F]).
   REAL(kind=mm_wp), INTENT(in)  :: temp  !! Temperature (K).
-  REAL(kind=mm_wp), INTENT(in)  :: pres  !! Pressure level (Pa). 
+  REAL(kind=mm_wp), INTENT(in)  :: pres  !! Pressure level (Pa).
   REAL(kind=mm_wp) :: res                !! Electric charging correction.
   INTEGER       :: chx,np
   REAL(kind=mm_wp) :: vmin,vmax
   REAL(kind=mm_wp) :: r_tmp, t_tmp
-  chx = 0 
+  chx = 0
   IF (.NOT.mmp_w_qe) THEN
     res = 1._mm_wp
@@ -177,5 +177,5 @@
   SELECT CASE(chx)
     CASE(2)      ! M0/SS
-      res = 1._mm_wp 
+      res = 1._mm_wp
     CASE(4)      ! M0/SF
       ! Fix max values of input parameters
@@ -211,7 +211,7 @@
 PURE FUNCTION mm_get_btk(t,k) RESULT(res)
   !! Get the \(b_{k}^{T}\) coefficient of the Free Molecular regime.
-  !! 
+  !!
   !! The method get the value of the Free-molecular regime coagulation pre-factor \(b_{k}^{T}\).
-  !! For more details about this coefficient, please read [Coagulation](page/haze.html#coagulation) 
+  !! For more details about this coefficient, please read [Coagulation](page/haze.html#coagulation)
   !! documentation page.
   !!
@@ -244,5 +244,5 @@
                                   tsut = 109._mm_wp,    &
                                   tref = 293._mm_wp
-  res = eta0 *dsqrt(t/tref)*(1._mm_wp+tsut/tref)/(1._mm_wp+tsut/t)
+  res = eta0 * dsqrt(t/tref) * (1._mm_wp + tsut/tref) / (1._mm_wp + tsut/t)
   RETURN
 END FUNCTION mm_eta_g
