Index: LMDZ6/trunk/libf/phylmd/physiq_mod.F90
===================================================================
--- LMDZ6/trunk/libf/phylmd/physiq_mod.F90	(revision 6025)
+++ LMDZ6/trunk/libf/phylmd/physiq_mod.F90	(revision 6026)
@@ -1242,4 +1242,6 @@
     REAL, DIMENSION(klon,nbtr) :: init_source
 
+    REAL, DIMENSION(klon,klev) :: cldfra_inca
+
     !lwoff=y : offset LW CRE for radiation code and other schemes
     REAL, SAVE :: betalwoff
@@ -4154,12 +4156,4 @@
     ENDIF
 
-    !     plulsc(:)=0.
-    !     do k=1,klev,-1
-    !        do i=1,klon
-    !              zzz=prfl(:,k)+psfl(:,k)
-    !           if (.not.ptconvth.zzz.gt.0.)
-    !        enddo prfl, psfl,
-    !     enddo
-    !
     ! 2. NUAGES STARTIFORMES
     !
@@ -4178,13 +4172,10 @@
     ! Calculer l'humidite relative pour diagnostique
     !
+    ! A inclure dans lmdz_call_lscp via un appel à lmdz_lscp_tools
     DO k = 1, klev
        DO i = 1, klon
           zx_t = t_seri(i,k)
           IF (thermcep) THEN
-             !!           if (iflag_ice_thermo.eq.0) then                 !jyg
              zdelta = MAX(0.,SIGN(1.,rtt-zx_t))
-             !!           else                                            !jyg
-             !!           zdelta = MAX(0.,SIGN(1.,t_glace_min-zx_t))      !jyg
-             !!           endif                                           !jyg
              zx_qs  = r2es * FOEEW(zx_t,zdelta)/pplay(i,k)
              zx_qs  = MIN(0.5,zx_qs)
@@ -4192,6 +4183,5 @@
              zx_qs  = zx_qs*zcor
           ELSE
-             !!           IF (zx_t.LT.t_coup) THEN             !jyg
-             IF (zx_t.LT.rtt) THEN                  !jyg
+             IF (zx_t.LT.rtt) THEN                  
                 zx_qs = qsats(zx_t)/pplay(i,k)
              ELSE
@@ -4208,33 +4198,7 @@
     ENDDO
 
-    !IM Calcul temp.potentielle a 2m (tpot) et temp. potentielle
-    !   equivalente a 2m (tpote) pour diagnostique
-    !
-    DO i = 1, klon
-       tpot(i)=zt2m(i)*(100000./paprs(i,1))**RKAPPA
-       IF (thermcep) THEN
-          IF(zt2m(i).LT.RTT) then
-             Lheat=RLSTT
-          ELSE
-             Lheat=RLVTT
-          ENDIF
-       ELSE
-          IF (zt2m(i).LT.RTT) THEN
-             Lheat=RLSTT
-          ELSE
-             Lheat=RLVTT
-          ENDIF
-       ENDIF
-       tpote(i) = tpot(i)*      &
-            EXP((Lheat *qsat2m(i))/(RCPD*zt2m(i)))
-    ENDDO
-
-
-
     !===============================================================================
-    ! Aerosols and chemistry
-    !
-
-
+    ! Interactive chemistry through coupling with INCA or REPROBUS chemistry models
+    !
 
     IF (ANY(type_trac == ['inca','inco'])) THEN ! ModThL
@@ -4251,4 +4215,14 @@
 
           zxsnow_dummy(:) = 0.0
+          ! INCA needs a cloud fraction that is not necessarily that 
+          ! for radiation. Here we provide a cloud fraction calculated
+          ! the same manner as that in LMDZ5, LMDZ6 and LMDZ7
+          DO k=1,klev
+                DO i=1,klon
+                   cldfra_inca(i,k)=min(rneb(i,k)+rnebcon(i,k),1.)
+                ENDDO
+          ENDDO
+
+
 
           CALL chemhook_begin (calday, &
@@ -4278,5 +4252,5 @@
                itop_con, &
                ibas_con, &
-               cldfra, &
+               cldfra_inca, &
                nbp_lon, &
                nbp_lat-1, &
@@ -4294,14 +4268,17 @@
        END IF
     ENDIF !type_trac = inca or inco
+    
     IF (type_trac == 'repr') THEN
        IF (CPPKEY_REPROBUS) THEN
-          !CALL chemtime_rep(itap+itau_phy-1, date0, dtime, itap)
           CALL chemtime_rep(itap+itau_phy-1, date0, phys_tstep, itap)
        END IF
     ENDIF
 
-    !
-    ! Appeler le rayonnement mais calculer tout d'abord l'albedo du sol.
-    !
+    
+    !===============================================================================
+    ! Radiative scheme and associated aerosols
+    ! 
+    ! Note that the following routines are called every radpas time steps
+
     IF (MOD(itaprad,radpas).EQ.0) THEN
 
@@ -4661,8 +4638,4 @@
           IF (carbon_cycle_rad) RCO2=RCO2_glo
           !
-
-    !===============================================================================
-    ! Radiative scheme
-    !
 
 
@@ -4855,5 +4828,6 @@
           zxtsol(:) = zsav_tsol (:)
        ENDIF
-    ENDIF ! MOD(itaprad,radpas)
+
+    ENDIF ! MOD(itaprad,radpas) END LOOP every radpas timesteps
     itaprad = itaprad + 1
 
@@ -5146,4 +5120,7 @@
             aam, torsfc)
     ENDIF
+
+
+
     !IM cf. FLott END
     !DC Calcul de la tendance due au methane
@@ -5300,5 +5277,5 @@
 
     !====================================================================
-    ! Interface Simulateur COSP (Calipso, ISCCP, MISR, ..)
+    ! Interface COSP (Calipso, ISCCP, MISR, ..) and AIRS simulators
     !====================================================================
     ! Abderrahmane 24.08.09
@@ -5813,22 +5790,40 @@
 
     !============================================================
-    !   Calcul de la temperature potentielle
+    ! Potential temperature calculation
     !============================================================
     DO k = 1, klev
        DO i = 1, klon
-          !JYG/IM theta en debut du pas de temps
-          !JYG/IM       theta(i,k)=t(i,k)*(100000./pplay(i,k))**(RD/RCPD)
-          !JYG/IM theta en fin de pas de temps de physique
+          !theta at the beginning of the time step is
+          !   theta(i,k)=t(i,k)*(100000./pplay(i,k))**(RD/RCPD)
+          !theta at the end of the physics time step is:
           theta(i,k)=t_seri(i,k)*(100000./pplay(i,k))**(RD/RCPD)
-          ! thetal: 2 lignes suivantes a decommenter si vous avez les fichiers
-          !     MPL 20130625
-          ! fth_fonctions.F90 et parkind1.F90
-          ! sinon thetal=theta
-          !       thetal(i,k)=fth_thetal(pplay(i,k),t_seri(i,k),q_seri(i,k),
-          !    :         ql_seri(i,k))
           thetal(i,k)=theta(i,k)
        ENDDO
     ENDDO
-    !
+
+
+    ! 2-m potential temperature and equivalent potential temperature
+    ! for diagnostics
+    DO i = 1, klon
+       tpot(i)=zt2m(i)*(100000./paprs(i,1))**RKAPPA
+       IF (thermcep) THEN
+          IF(zt2m(i).LT.RTT) then
+             Lheat=RLSTT
+          ELSE
+             Lheat=RLVTT
+          ENDIF
+       ELSE
+          IF (zt2m(i).LT.RTT) THEN
+             Lheat=RLSTT
+          ELSE
+             Lheat=RLVTT
+          ENDIF
+       ENDIF
+       tpote(i) = tpot(i)*      &
+            EXP((Lheat *qsat2m(i))/(RCPD*zt2m(i)))
+    ENDDO
+
+
+
 
     ! 22.03.04 BEG
