Index: trunk/LMDZ.PLUTO/libf/phypluto/callcorrk.F90
===================================================================
--- trunk/LMDZ.PLUTO/libf/phypluto/callcorrk.F90	(revision 3626)
+++ trunk/LMDZ.PLUTO/libf/phypluto/callcorrk.F90	(revision 3627)
@@ -31,5 +31,5 @@
       use tracer_h, only: igcm_ch4_gas,igcm_n2,mmol
       use comcstfi_mod, only: pi, mugaz, cpp, r, g
-      use callkeys_mod, only: diurnal,tracer,varfixed,satval, &
+      use callkeys_mod, only: diurnal,tracer,varfixed, &
                               diagdtau,kastprof,strictboundcorrk,specOLR, &
                               tplanckmin,tplanckmax,global1d, &
Index: trunk/LMDZ.PLUTO/libf/phypluto/callcorrk_pluto_mod.F90
===================================================================
--- trunk/LMDZ.PLUTO/libf/phypluto/callcorrk_pluto_mod.F90	(revision 3626)
+++ trunk/LMDZ.PLUTO/libf/phypluto/callcorrk_pluto_mod.F90	(revision 3627)
@@ -211,11 +211,11 @@
 !     Initialization on first call
 
-      qxvaer(:,:,:) = 0
-      qsvaer(:,:,:) = 0
-      gvaer(:,:,:) = 0
-
-      qxiaer(:,:,:) = 0
-      qsiaer(:,:,:) = 0
-      giaer(:,:,:) = 0
+      qxvaer(:,:,:) = 0.0
+      qsvaer(:,:,:) = 0.0
+      gvaer(:,:,:) = 0.0
+
+      qxiaer(:,:,:) = 0.0
+      qsiaer(:,:,:) = 0.0
+      giaer(:,:,:) = 0.0
 
 
Index: trunk/LMDZ.PLUTO/libf/phypluto/condense_n2.F90
===================================================================
--- trunk/LMDZ.PLUTO/libf/phypluto/condense_n2.F90	(revision 3626)
+++ trunk/LMDZ.PLUTO/libf/phypluto/condense_n2.F90	(revision 3627)
@@ -213,12 +213,12 @@
   condsub(1:klon) = .false.
   pdicen2(1:klon) = 0.
-  zfallheat=0
-  pdqc(1:klon,1:klev,1:nq)=0
-  pdtc(1:klon,1:klev)=0
-  pduc(1:klon,1:klev)=0
-  pdvc(1:klon,1:klev)=0
-  zfallice(1:klon,1:klev+1)=0
-  zcondicea(1:klon,1:klev)=0
-  zdtlatent(1:klon,1:klev)=0
+  zfallheat=0.
+  pdqc(1:klon,1:klev,1:nq)=0.
+  pdtc(1:klon,1:klev)=0.
+  pduc(1:klon,1:klev)=0.
+  pdvc(1:klon,1:klev)=0.
+  zfallice(1:klon,1:klev+1)=0.
+  zcondicea(1:klon,1:klev)=0.
+  zdtlatent(1:klon,1:klev)=0.
   zt(1:klon,1:klev)=0.
 
Index: trunk/LMDZ.PLUTO/libf/phypluto/inifis_mod.F90
===================================================================
--- trunk/LMDZ.PLUTO/libf/phypluto/inifis_mod.F90	(revision 3626)
+++ trunk/LMDZ.PLUTO/libf/phypluto/inifis_mod.F90	(revision 3627)
@@ -312,4 +312,7 @@
      call getin_p("calldifv",calldifv)
      if (is_master) write(*,*) trim(rname)//": calldifv = ",calldifv
+     vertdiff=.true. ! default value
+     call getin_p("vertdiff",vertdiff)
+     if (is_master) write(*,*) trim(rname)//": vertdiff = ",vertdiff
 
      if (is_master) write(*,*) trim(rname)//": use turbdiff instead of vdifc ?"
@@ -1223,11 +1226,4 @@
      if (is_master) write(*,*)trim(rname)//": varfixed = ",varfixed
 
-     if (is_master) write(*,*)trim(rname)//&
-       ": What is the saturation % of the variable species?"
-     satval=0.8
-     call getin_p("satval",satval)
-     if (is_master) write(*,*)trim(rname)//": satval = ",satval
-
-
 ! Test of incompatibility:
 ! if varactive, then varfixed should be false
Index: trunk/LMDZ.PLUTO/libf/phypluto/phys_state_var_mod.F90
===================================================================
--- trunk/LMDZ.PLUTO/libf/phypluto/phys_state_var_mod.F90	(revision 3626)
+++ trunk/LMDZ.PLUTO/libf/phypluto/phys_state_var_mod.F90	(revision 3627)
@@ -54,4 +54,5 @@
 
       real,dimension(:),allocatable,save :: fluxtop_lw      ! Outgoing LW (IR) flux to space (W.m-2).
+      real,dimension(:),allocatable,save :: fluxtop_sw      ! Outgoing SW (IR) flux to space (W.m-2).
       real,dimension(:),allocatable,save :: fluxtop_lw1      ! Outgoing LW (IR) flux to space (W.m-2) clear sky.
       real,dimension(:),allocatable,save :: fluxabs_sw      ! Absorbed SW (stellar) flux (W.m-2).
@@ -59,5 +60,5 @@
       real,dimension(:),allocatable,save :: fluxtop_dn      ! Incoming SW (stellar) radiation at the top of the atmosphere (W.m-2).
       real,dimension(:),allocatable,save :: fluxdyn         ! Horizontal heat transport by dynamics (W.m-2).
-!$OMP THREADPRIVATE(fluxtop_lw,fluxtop_lw1,fluxabs_sw,fluxabs_sw1,fluxtop_dn,fluxdyn)
+!$OMP THREADPRIVATE(fluxtop_lw,fluxtop_sw,fluxtop_lw1,fluxabs_sw,fluxabs_sw1,fluxtop_dn,fluxdyn)
 
       real,dimension(:,:),allocatable,save :: OLR_nu        ! Outgoing LW radiation in each band (Normalized to the band width (W/m2/cm-1)).
@@ -143,4 +144,5 @@
         ALLOCATE(fluxsurfabs_sw(klon))
         ALLOCATE(fluxtop_lw(klon))
+        ALLOCATE(fluxtop_sw(klon))
         ALLOCATE(fluxtop_lw1(klon))
         ALLOCATE(fluxabs_sw(klon))
@@ -218,4 +220,5 @@
         DEALLOCATE(fluxsurfabs_sw)
         DEALLOCATE(fluxtop_lw)
+        DEALLOCATE(fluxtop_sw)
         DEALLOCATE(fluxtop_lw1)
         DEALLOCATE(fluxabs_sw)
Index: trunk/LMDZ.PLUTO/libf/phypluto/physiq_mod.F90
===================================================================
--- trunk/LMDZ.PLUTO/libf/phypluto/physiq_mod.F90	(revision 3626)
+++ trunk/LMDZ.PLUTO/libf/phypluto/physiq_mod.F90	(revision 3627)
@@ -1020,9 +1020,10 @@
                                zzlay,zzlev,tsurf,fract,dist_star,dtau_aer,       &
                                zdtlw,zdtsw,fluxsurf_lw,fluxsurf_sw,fluxtop_lw,   &
-                               fluxabs_sw,fluxtop_dn,reffrad,tau_col,ptime,pday, &
+                               fluxtop_sw,fluxtop_dn,reffrad,tau_col,ptime,pday, &
                                firstcall,lastcall)
                   albedo_equivalent(1:ngrid)=albedo(1:ngrid,1)
                   fluxrad_sky(1:ngrid)=emis(1:ngrid)*fluxsurf_lw(1:ngrid)+       &
                                fluxsurf_sw(1:ngrid)*(1.-albedo(1:ngrid,1))
+                  fluxabs_sw(1:ngrid)=fluxtop_dn(1:ngrid)-fluxtop_sw(1:ngrid)
                else
                 muvar(1:ngrid,1:nlayer+1)=mugaz
@@ -1146,6 +1147,6 @@
 
          if (oldplutovdifc) then
-            zdum1(:,:) = 0
-            zdum2(:,:) = 0
+            zdum1(:,:) = 0.
+            zdum2(:,:) = 0.
             zdh(:,:)=pdt(:,:)/zpopsk(:,:)
 
@@ -1159,5 +1160,5 @@
                     zdqdif,zdqsdif,qsat_ch4,qsat_ch4_l1) !,zq1temp_ch4,qsat_ch4)
 
-            zdtdif(1:ngrid,1:nlayer)=zdhdif(1:ngrid,1:nlayer)*zpopsk(1:ngrid,1:nlayer) ! for diagnostic only
+            zdtdif(1:ngrid,1:nlayer)=zdhdif(1:ngrid,1:nlayer)*zpopsk(1:ngrid,1:nlayer) 
 
             bcond=1./tcond1p4Pa
@@ -1202,17 +1203,8 @@
          endif
 
-         ! if(ok_slab_ocean)then !AF24: removed
-         !    flux_sens_lat(1:ngrid)=(zdtsdif(1:ngrid)*capcal(1:ngrid)-fluxrad(1:ngrid))
-         ! endif
-
-!!         call writediagfi(ngrid,"vdifc_post_zdqsdif"," "," ",2,zdqsdif(1:ngrid,igcm_h2o_gas))
-
          if (tracer) then
            pdq(1:ngrid,1:nlayer,1:nq)=pdq(1:ngrid,1:nlayer,1:nq)+ zdqdif(1:ngrid,1:nlayer,1:nq)
            dqsurf(1:ngrid,1:nq)=dqsurf(1:ngrid,1:nq) + zdqsdif(1:ngrid,1:nq)
          end if ! of if (tracer)
-
-!!         call writediagfi(ngrid,"vdifc_post_dqsurf"," "," ",2,dqsurf(1:ngrid,igcm_h2o_gas))
-!!         call writediagfi(ngrid,"vdifc_post_qsurf"," "," ",2,qsurf(1:ngrid,igcm_h2o_gas))
 
          ! test energy conservation
@@ -2190,8 +2182,7 @@
             call write_output("sensibFlux","sensible heat flux","w.m^-2",sensibFlux)
          endif
-
          if (corrk) then
-            call write_output("dEzradsw","radiative heating","w.m^-2",dEzradsw)
-            call write_output("dEzradlw","radiative heating","w.m^-2",dEzradlw)
+            call write_output("dEzradsw","radiative heating","w.m^-2",dEzRadsw)
+            call write_output("dEzradlw","radiative heating","w.m^-2",dEzRadlw)
          endif
       endif ! end of 'enertest'
@@ -2199,5 +2190,5 @@
       ! Diagnostics of optical thickness
       ! Warning this is exp(-tau), I let you postproc with -log to have tau itself - JVO 19
-      if (diagdtau) then
+      if (diagdtau.and..not.oldplutocorrk) then
             do nw=1,L_NSPECTV
                write(str2,'(i2.2)') nw
@@ -2212,12 +2203,16 @@
       ! Temporary inclusions for heating diagnostics.
       if (.not.fast) then
-        call write_output("zdtsw","SW heating","T s-1",zdtsw)
-        call write_output("zdtlw","LW heating","T s-1",zdtlw)
+        call write_output("zdtsw","SW heating","K s-1",zdtsw)
+        call write_output("zdtlw","LW heating","K s-1",zdtlw)
         call write_output("dtrad","radiative heating","K s-1",dtrad)
-        call write_output("zdtdyn","Dyn. heating","T s-1",zdtdyn)
-      endif
-
-      ! For Debugging.
-      !call write_output('rnat','Terrain type',' ',real(rnat))
+        call write_output("zdtdyn","Dyn. heating","K s-1",zdtdyn)
+        call write_output("zdudyn","Dyn. U","m s-2",zdudyn)
+        call write_output("zdtconduc","tendancy conduc","K s-1",zdtconduc)
+        call write_output("zdumolvis","tendancy molvis","m s-1",zdumolvis)
+        call write_output("zdvmolvis","tendancy molvis","m s-1",zdvmolvis)
+        call write_output("zdtdif","tendancy T diff","K s-1",zdtdif)
+        call write_output("zdtsdif","tendancy Ts diff","K s-1",zdtsdif)
+        call write_output("zdtadj","tendancy T adj","K s-1",zdtadj)
+      endif
 
       ! Output tracers.
@@ -2237,5 +2232,13 @@
          call write_output('n2_iceflux','n2_iceflux',"kg m^-2 s^-1",flusurf(:,igcm_n2) )
          if (.not.fast) then
-            call write_output("zdtc","tendancy T cond N2","K",zdtc)
+            call write_output("zdtc","tendancy T cond N2","K s-1",zdtc)
+            call write_output("zdtsurfc","tendancy Ts cond N2","K s-1",zdtsurfc)
+            call write_output("zduc","tendancy U cond N2","m s-1",zduc)
+            call write_output("zdvc","tendancy V cond N2","m s-1",zdvc)
+            call write_output("zdqc_n2","tendancy tracer cond N2","kg kg-1 s-1",zdqc(:,:,1))
+            call write_output("zdqsc_n2","tendancy tracer surf cond N2","kg kg-1 s-1",zdqsc(:,1))
+            call write_output("zdqdif_n2","tendancy tracer diff","kg kg-1 s-1",zdqdif(:,:,1))
+            call write_output("zdqsdif_n2","tendancy tracer surf diff","kg kg-1 s-1",zdqsdif(:,1))
+            call write_output("zdqadj_n2","tendancy tracer adj","K s-1",zdqadj(:,:,1))
          endif
 
@@ -2273,8 +2276,10 @@
 
             if (metcloud.and.(.not.fast)) then
-               call write_output("zdtch4cloud","ch4 cloud","T s-1",&
+               call write_output("zdtch4cloud","ch4 cloud","K s-1",&
                            zdtch4cloud)
-               call write_output("zdqch4cloud","ch4 cloud","T s-1",&
+               call write_output("zdqch4cloud_gas","ch4 cloud","kg kg-1 s-1",&
                            zdqch4cloud(:,:,igcm_ch4_gas))
+               call write_output("zdqch4cloud_ice","ch4 cloud","kg kg-1 s-1",&
+                           zdqch4cloud(:,:,igcm_ch4_ice))
             endif
 
Index: trunk/LMDZ.PLUTO/libf/phypluto/testconserv.F90
===================================================================
--- trunk/LMDZ.PLUTO/libf/phypluto/testconserv.F90	(revision 3626)
+++ trunk/LMDZ.PLUTO/libf/phypluto/testconserv.F90	(revision 3627)
@@ -64,5 +64,5 @@
       REAL nconsMAX
       INTEGER myig
-      REAL vdifcncons(ngrid)
+      REAL ncons(ngrid)
 !-----------------------------------------------------------------------
 
@@ -75,5 +75,5 @@
       pqcs=pqs+pdqs*ptimestep
       do ig = 1, ngrid
-         vdifcncons(ig)=0.0
+         ncons(ig)=0.0
          do l = 1, nlayer
              masse = (pplev(ig,l) - pplev(ig,l+1))/g
@@ -84,5 +84,5 @@
              dWtot = dWtot + masse*zdq(ig,l,iq)*ptimestep*cell_area(ig)
              ! for each column, total mass lost per sec : kg(tracer) / m2 /s
-             vdifcncons(ig)=vdifcncons(ig) + masse*zdq(ig,l,iq)
+             ncons(ig)=ncons(ig) + masse*zdq(ig,l,iq)
  
              ! if clouds :
@@ -91,5 +91,5 @@
               dWtot = dWtot + masse*zdq(ig,l,iq)*ptimestep*cell_area(ig)
               Wtot = Wtot + masse*pqc(ig,l,iq)*cell_area(ig)
-              vdifcncons(ig)=vdifcncons(ig) + masse*zdq(ig,l,iq)
+              ncons(ig)=ncons(ig) + masse*zdq(ig,l,iq)
              ENDIF
                
@@ -99,5 +99,5 @@
          dWtots = dWtots + zdqs(ig,iq)*ptimestep*cell_area(ig)
          Wtots = Wtots + pqcs(ig,iq)*cell_area(ig)
-         vdifcncons(ig)=vdifcncons(ig)+zdqs(ig,iq)
+         ncons(ig)=ncons(ig)+zdqs(ig,iq)
 
          IF ((igcm2.eq.igcm_co_ice).or.(igcm2.eq.igcm_ch4_ice)) THEN
@@ -105,13 +105,13 @@
               dWtots = dWtots + zdqs(ig,iq)*ptimestep*cell_area(ig)
               Wtots = Wtots + pqcs(ig,iq)*cell_area(ig)
-              vdifcncons(ig)=vdifcncons(ig)+zdqs(ig,iq)
+              ncons(ig)=ncons(ig)+zdqs(ig,iq)
          ENDIF
              
-        ! vdifcncons is the total amount of material that appear or
+        ! ncons is the total amount of material that appear or
         ! disapear per second in the routine
         ! it is the non conservative factor 
 
-        if(abs(vdifcncons(ig)).gt.abs(nconsMAX))then
-              nconsMAX=vdifcncons(ig)
+        if(abs(ncons(ig)).gt.abs(nconsMAX))then
+              nconsMAX=ncons(ig)
               myig=ig
         endif
Index: trunk/LMDZ.PLUTO/libf/phypluto/vdifc_pluto_mod.F90
===================================================================
--- trunk/LMDZ.PLUTO/libf/phypluto/vdifc_pluto_mod.F90	(revision 3626)
+++ trunk/LMDZ.PLUTO/libf/phypluto/vdifc_pluto_mod.F90	(revision 3627)
@@ -697,5 +697,5 @@
           END IF ! of IF ((methane).and.(iq.eq.igcm_ch4_gas))
 
-          !! Diffusion verticale : shut down vertical transport of vertdiff = false
+          !! Diffusion verticale : shut down vertical transport if vertdiff = false
           if (vertdiff) then
            DO ilay=2,nlay
