Index: trunk/LMDZ.TITAN/libf/phytitan/calchim.F90
===================================================================
--- trunk/LMDZ.TITAN/libf/phytitan/calchim.F90	(revision 2098)
+++ trunk/LMDZ.TITAN/libf/phytitan/calchim.F90	(revision 2099)
@@ -35,5 +35,6 @@
   !                          even if in physiq we keep altitudes coherent with dynamics !
   !
-  ! + STILL TO DO : Replug the interaction with haze (cf titan.old) -> to see with JB.
+  ! + STILL TO DO : + Replug the interaction with haze (cf titan.old) -> to see with JB.
+  !                 + Use iso_c_binding for the fortran-C exchanges.
   !---------------------------------------------------------------------------------------------------------
 
@@ -131,6 +132,6 @@
 !$OMP THREADPRIVATE(kedd)
 
-  REAL*8, DIMENSION(:),   ALLOCATABLE, SAVE :: mass ! Molar mass of the compunds (g.mol-1)
-  REAL*8, DIMENSION(:,:), ALLOCATABLE, SAVE :: md
+  REAL*8, DIMENSION(:,:), ALLOCATABLE, SAVE :: md   ! Mean molecular diffusion coefficients (cm^2.s-1)
+  REAL*8, DIMENSION(:),   ALLOCATABLE, SAVE :: mass ! Molar mass of the compounds (g.mol-1)
 !$OMP THREADPRIVATE(mass,md)
 
@@ -185,4 +186,12 @@
      ALLOCATE(perte(2,200,nkim))
      
+     ! 0. Deal with characters for C-interoperability
+     ! ----------------------------------------------
+     ! NB ( JVO 19 ) : Using iso_c_binding would do things in an even cleaner way !
+     DO ic=1,nkim
+       nomqy_c(ic) = trim(cnames(ic))//char(0) ! Add the C null terminator
+     ENDDO
+     nomqy_c(nkim+1)="HV"//char(0) ! For photodissociations
+
      ! 1. Read Vervack profile "tcp.ver", once for all
      ! -----------------------------------------------
@@ -291,18 +300,26 @@
 
      ! Kedd from (E7) in Vuitton 2019
-     DO l=klev-4,nlaykim_tot
-       kedd(l) = 300.0 * ( 1.0E2 / press_c(l) )**1.5 * 3.0E7 /  &
+     if (ngrid .eq. 1) then ! if 1D no dynamic mixing, we set the kedd in all column
+       DO l=1,nlaykim_tot
+         kedd(l) = 300.0 * ( 1.0E2 / press_c(l) )**1.5 * 3.0E7 /  &
+                 ( 300.0 * ( 1.0E2 / press_c(l) )**1.5 + 3.0E7 ) 
+       ENDDO
+     else
+       DO l=klev-4,nlaykim_tot
+         ! JVO 18 : We keep the nominal profile in the GCM 5 upper layers 
+         !          to have  a correct vertical mixing in the sponge layer
+         kedd(l) = 300.0 * ( 1.0E2 / press_c(l) )**1.5 * 3.0E7 /  &
                ( 300.0 * ( 1.0E2 / press_c(l) )**1.5 + 3.0E7 ) 
-     ENDDO
-     
-     ! JVO 18 : We keep the nominal profile in the GCM 5 upper layers 
-     !          to have  a correct vertical mixing in the sponge layer
-     
-     ! Then adjust 10 layers profile fading to default value depending on kedd(ptop)
-     DO l=klev-15,klev-5
-        temp1   = ( log10(press_c(l)/press_c(klev-15)) ) / ( log10(press_c(klev-4)/press_c(klev-15)) )
-        kedd(l) = 10.**( 3.0 + log10(kedd(klev-4)/1.e3) * temp1 )
-     ENDDO
-    
+       ENDDO
+     endif
+     
+     if (ngrid .gt. 1) then ! not in 1D, no dynamic mixing
+       ! Then adjust 10 layers profile fading to default value depending on kedd(ptop)
+       DO l=klev-15,klev-5
+          temp1   = ( log10(press_c(l)/press_c(klev-15)) ) / ( log10(press_c(klev-4)/press_c(klev-15)) )
+          kedd(l) = 10.**( 3.0 + log10(kedd(klev-4)/1.e3) * temp1 )
+       ENDDO
+     endif
+ 
      firstcall = .FALSE.
   ENDIF  ! firstcall
@@ -328,5 +345,5 @@
      ! -------------------------------------------------------------------------------------------------------
 
-     IF ( ( moyzon_ch .AND. ( ig.EQ.1 .OR. (ABS(latitude(ig)-latitude(igm1)).GT.0.1*pi/180)) ) .OR. (.NOT. moyzon_ch) ) THEN
+     IF ( ( moyzon_ch .AND. ( ig.EQ.1 .OR. (ABS(latitude(ig)-latitude(igm1)).GT.0.1*pi/180.0)) ) .OR. (.NOT. moyzon_ch) ) THEN
 
         ! 1. Compute altitude for the grid point with hydrostat. equilib.
Index: trunk/LMDZ.TITAN/libf/phytitan/comchem_h.F90
===================================================================
--- trunk/LMDZ.TITAN/libf/phytitan/comchem_h.F90	(revision 2098)
+++ trunk/LMDZ.TITAN/libf/phytitan/comchem_h.F90	(revision 2099)
@@ -44,13 +44,5 @@
        "NCCN      ", "C4N2      "/)
    !! Hard-coded chemical species for Titan chemistry + "HV" specie for the photochem module.
-   CHARACTER(len=10), DIMENSION(nkim+1), PARAMETER  :: nomqy_c = &
-     (/"H         ", "H2        ", "CH        ", "CH2s      ", "CH2       ", "CH3       ", &
-       "CH4       ", "C2        ", "C2H       ", "C2H2      ", "C2H3      ", "C2H4      ", &
-       "C2H5      ", "C2H6      ", "C3H3      ", "C3H5      ", "C3H6      ", "C3H7      ", & 
-       "C4H       ", "C4H3      ", "C4H4      ", "C4H2s     ", "CH2CCH2   ", "CH3CCH    ", &
-       "C3H8      ", "C4H2      ", "C4H6      ", "C4H10     ", "AC6H6     ", "C3H2      ", &
-       "C4H5      ", "AC6H5     ", "N2        ", "N4S       ", "CN        ", "HCN       ", &
-       "H2CN      ", "CHCN      ", "CH2CN     ", "CH3CN     ", "C3N       ", "HC3N      ", &
-       "NCCN      ", "C4N2      ", "HV        "/)
+   CHARACTER(len=10), DIMENSION(nkim+1)  :: nomqy_c ! Initialized in calchim with null terminator
    !! Hard-coded chemical species molar mass (g.mol-1), shares the same indexing than cnames.
    REAL, DIMENSION(nkim), PARAMETER               :: cmmol = (/ &
@@ -75,5 +67,5 @@
    ! NB : For the startfile we use nlaykim_up grid (upper atm) and for outputs we use nlaykim_tot grid (all layers)
   
-   REAL*8, PARAMETER :: grkim_dz = 10.0 ! Vertical discretization of the upper chemsitry grid (km)
+   REAL*8, PARAMETER :: grkim_dz = 10.0 ! Vertical discretization of the upper chemistry grid (km)
 
    REAL,SAVE,ALLOCATABLE,DIMENSION(:)     :: preskim  ! Pressure (Pa) of upper chemistry (mid)-layers
