Index: trunk/LMDZ.TITAN/libf/phytitan/callkeys_mod.F90
===================================================================
--- trunk/LMDZ.TITAN/libf/phytitan/callkeys_mod.F90	(revision 2117)
+++ trunk/LMDZ.TITAN/libf/phytitan/callkeys_mod.F90	(revision 2131)
@@ -27,5 +27,6 @@
       logical,save :: meanOLR
       logical,save :: specOLR
-!$OMP THREADPRIVATE(enertest,nonideal,meanOLR)
+      logical,save :: diagdtau
+!$OMP THREADPRIVATE(enertest,nonideal,meanOLR,specOLR,diagdtau)
       logical,save :: newtonian
       logical,save :: check_cpp_match
Index: trunk/LMDZ.TITAN/libf/phytitan/inifis_mod.F90
===================================================================
--- trunk/LMDZ.TITAN/libf/phytitan/inifis_mod.F90	(revision 2117)
+++ trunk/LMDZ.TITAN/libf/phytitan/inifis_mod.F90	(revision 2131)
@@ -336,4 +336,16 @@
      call getin_p("specOLR",specOLR)
      write(*,*)" specOLR = ",specOLR
+
+     write(*,*)"Output diagnostic optical thickness?"
+     diagdtau=.false.
+     call getin_p("diagdtau",diagdtau)
+     write(*,*)" diagdtau = ",diagdtau
+     ! sanity check
+     if (diagdtau.and.(ngrid.ne.1)) then
+       print*,"Diagnostic optical thickness can be output in 1D only !"
+       print*,"Start again with diagdtau=.false."
+       stop
+     endif
+
 
      write(*,*)"Uniform absorption in radiative transfer?"
Index: trunk/LMDZ.TITAN/libf/phytitan/optci.F90
===================================================================
--- trunk/LMDZ.TITAN/libf/phytitan/optci.F90	(revision 2117)
+++ trunk/LMDZ.TITAN/libf/phytitan/optci.F90	(revision 2131)
@@ -7,8 +7,7 @@
   use gases_h
   use comcstfi_mod, only: r
-  use callkeys_mod, only: continuum,graybody,corrk_recombin,      &
+  use callkeys_mod, only: continuum,graybody,corrk_recombin,diagdtau,      &
                           callclouds,callmufi,seashaze,uncoupl_optic_haze
   use tracer_h, only : nmicro,nice
-  use MMP_OPTICS
 
   implicit none
@@ -61,5 +60,4 @@
   real*8 ASF_T(L_LEVELS,L_NSPECTI)
   real*8 INT_DTAU(L_NLAYRAD,L_NSPECTI)
-  real*8 K_HAZE(L_NLAYRAD,L_NSPECTI)
 
   CHARACTER*2  str2
@@ -412,21 +410,20 @@
 
 
-!  Titan's outputs (J.V.O, 2016)===============================================
-!      do l=1,L_NLAYRAD
-!         do nw=1,L_NSPECTI
-!          INT_DTAU(L,NW) = 0.0d+0
-!            DO NG=1,L_NGAUSS
-!               INT_DTAU(L,NW)= INT_DTAU(L,NW) + dtaui(L,nw,ng)*gweight(NG)
-!            enddo
-!         enddo
-!      enddo
-
-!	do nw=1,L_NSPECTI
-!          write(str2,'(i2.2)') nw
-!	  call writediagfi(1,'kgi'//str2,'Gaz extinction coefficient IR band '//str2,'m-1',1,int_dtau(L_NLAYRAD:1:-1,nw)/dz_lay(L_NLAYRAD:1:-1))
-!          call writediagfi(1,'khi'//str2,'Haze extinction coefficient IR band '//str2,'m-1',1,k_haze(L_NLAYRAD:1:-1,nw)/dz_lay(L_NLAYRAD:1:-1))	
-!	enddo  
-  
-! ==============================================================================  
+  !  Optical thickness for 1D diagnostics (added by JVO)
+  if (diagdtau) then ! diagtau can be true only if 1D
+    do l=1,L_NLAYRAD
+       do nw=1,L_NSPECTI
+        INT_DTAU(L,NW) = 0.0d+0
+          DO NG=1,L_NGAUSS
+             INT_DTAU(L,NW)= INT_DTAU(L,NW) + dtaui(L,nw,ng)*gweight(NG)
+          enddo
+       enddo
+    enddo
+    do nw=1,L_NSPECTI
+      write(str2,'(i2.2)') nw
+      call writediagfi(1,'dtaui'//str2,'Layer optical thickness in IR band '//str2,'',1,int_dtau(L_NLAYRAD:1:-1,nw))
+    enddo
+  endif
+  
 
   if(firstcall) firstcall = .false.
Index: trunk/LMDZ.TITAN/libf/phytitan/optcv.F90
===================================================================
--- trunk/LMDZ.TITAN/libf/phytitan/optcv.F90	(revision 2117)
+++ trunk/LMDZ.TITAN/libf/phytitan/optcv.F90	(revision 2131)
@@ -7,5 +7,5 @@
   use gases_h
   use comcstfi_mod, only: r
-  use callkeys_mod, only: continuum,graybody,callgasvis,corrk_recombin,  &
+  use callkeys_mod, only: continuum,graybody,callgasvis,corrk_recombin,diagdtau,  &
                           callclouds,callmufi,seashaze,uncoupl_optic_haze
   use tracer_h, only: nmicro,nice
@@ -69,5 +69,4 @@
   real*8 ASF_T(L_LEVELS,L_NSPECTI)
   real*8 INT_DTAU(L_NLAYRAD,L_NSPECTI)
-  real*8 K_HAZE(L_NLAYRAD,L_NSPECTI)
   
   CHARACTER*2  str2
@@ -391,21 +390,20 @@
 
 
-!  Titan's outputs (JVO, 2016)===============================================
-!      do l=1,L_NLAYRAD
-!         do nw=1,L_NSPECTV
-!          INT_DTAU(L,NW) = 0.0d+0
-!            DO NG=1,L_NGAUSS
-!               INT_DTAU(L,NW)= INT_DTAU(L,NW) + dtauv(L,nw,ng)*gweight(NG) 
-!            enddo
-!         enddo
-!      enddo
-
-!	do nw=1,L_NSPECTV
-!          write(str2,'(i2.2)') nw
-!	  call writediagfi(1,'kgv'//str2,'Gaz extinction coefficient VI band '//str2,'m-1',1,int_dtau(L_NLAYRAD:1:-1,nw)/dz_lay(L_NLAYRAD:1:-1))
-!          call writediagfi(1,'khv'//str2,'Haze extinction coefficient VI band '//str2,'m-1',1,k_haze(L_NLAYRAD:1:-1,nw)/dz_lay(L_NLAYRAD:1:-1))	
-!	enddo  
-
-! ==============================================================================  
+  !  Optical thickness for 1D diagnostics (added by JVO)
+  if (diagdtau) then ! diagtau can be true only if 1D
+    do l=1,L_NLAYRAD
+       do nw=1,L_NSPECTV
+        INT_DTAU(L,NW) = 0.0d+0
+          DO NG=1,L_NGAUSS
+             INT_DTAU(L,NW)= INT_DTAU(L,NW) + dtauv(L,nw,ng)*gweight(NG)
+          enddo
+       enddo
+    enddo
+    do nw=1,L_NSPECTV
+      write(str2,'(i2.2)') nw
+      call writediagfi(1,'dtauv'//str2,'Layer optical thickness in VI band '//str2,'',1,int_dtau(L_NLAYRAD:1:-1,nw))
+    enddo
+  endif
+
 
   if(firstcall) firstcall = .false.
