Index: LMDZ5/trunk/libf/phylmd/radiation_AR4.F
===================================================================
--- LMDZ5/trunk/libf/phylmd/radiation_AR4.F	(revision 1434)
+++ LMDZ5/trunk/libf/phylmd/radiation_AR4.F	(revision 1565)
@@ -163,14 +163,11 @@
         allocate(ZFSUPAI(KDLON,KFLEV+1))
         allocate(ZFSDNAI(KDLON,KFLEV+1))
-        DO JK = 1 , KDLON*(KFLEV+1)
-          ZFSUPAD(JK,1) = 0.0     ! ZFSUPAD(:,:)=0.
-          ZFSDNAD(JK,1) = 0.0     ! ZFSDNAD(:,:)=0.
-          ZFSUPAI(JK,1) = 0.0     ! ZFSUPAI(:,:)=0.
-          ZFSDNAI(JK,1) = 0.0     ! ZFSDNAI(:,:)=0.
-        END DO
+
+        ZFSUPAD(:,:)=0.
+        ZFSDNAD(:,:)=0.
+        ZFSUPAI(:,:)=0.
+        ZFSDNAI(:,:)=0.
       endif
-!rv
-      
-c
+
       IF (appel1er) THEN
          PRINT*, 'SW calling frequency : ', swpas
@@ -526,4 +523,9 @@
       USE dimphy
       USE radiation_AR4_param, only : RSUN, RRAY
+      USE infotrac, ONLY : type_trac
+#ifdef REPROBUS
+      USE CHEM_REP, ONLY : RSUNTIME, ok_SUNTIME
+#endif
+
       IMPLICIT none
 cym#include "dimensions.h"
@@ -613,4 +615,16 @@
       INTEGER jl, jk, k, jaj, ikm1, ikl
 
+C If running with Reporbus, overwrite default values of RSUN. 
+C Otherwise keep default values from radiation_AR4_param module.  
+      IF (type_trac == 'repr') THEN
+#ifdef REPROBUS
+         IF (ok_SUNTIME) THEN
+            RSUN(1) = RSUNTIME(1)
+            RSUN(2) = RSUNTIME(2)
+         ENDIF
+         PRINT*,'RSUN(1): ',RSUN(1)
+#endif
+      END IF
+
 C     ------------------------------------------------------------------
 C
@@ -754,4 +768,9 @@
       USE dimphy
       USE radiation_AR4_param, only : RSUN, RRAY
+      USE infotrac, ONLY : type_trac
+#ifdef REPROBUS
+      use CHEM_REP, only : RSUNTIME, ok_SUNTIME
+#endif
+
       IMPLICIT none
 cym#include "dimensions.h"
@@ -873,4 +892,16 @@
       INTEGER jref, jkl, jklp1, jajp, jkki, jkkp4, jn2j, iabs
       REAL(KIND=8) ZRMUM1, ZWH2O, ZCNEB, ZAA, ZBB, ZRKI, ZRE11
+
+C If running with Reporbus, overwrite default values of RSUN. 
+C Otherwise keep default values from radiation_AR4_param module.  
+      IF (type_trac == 'repr') THEN
+#ifdef REPROBUS
+         IF (ok_SUNTIME) THEN
+            RSUN(1)=RSUNTIME(1)
+            RSUN(2)=RSUNTIME(2)
+         END IF
+#endif
+      END IF
+
 C
 
@@ -2485,4 +2516,13 @@
       USE dimphy
       USE radiation_AR4_param, only : TREF, RT1, RAER, AT, BT, OCT
+      USE infotrac, ONLY : type_trac
+#ifdef REPROBUS
+      USE CHEM_REP, ONLY: RCH42D,
+     $                    RN2O2D,
+     $                    RCFC112D,
+     $                    RCFC122D,
+     $                    ok_Rtime2D
+#endif
+
       IMPLICIT none
 cym#include "dimensions.h"
@@ -2800,17 +2840,55 @@
      S                +ZUAER(JL,5)    *ZDUC(JL,JC)*ZDIFF
 C
-      PABCU(JL,19,JC)=PABCU(JL,19,JCP1)
-     S               +ZABLY(JL,8,JC)*RCH4/RCO2*ZPHM6(JL)*ZDIFF
-      PABCU(JL,20,JC)=PABCU(JL,20,JCP1)
+C
+
+      IF (type_trac == 'repr') THEN
+         IF (ok_Rtime2D) THEN
+#ifdef REPROBUS
+            PABCU(JL,19,JC)=PABCU(JL,19,JCP1)
+     S           +ZABLY(JL,8,JC)*RCH42D(JL,JC)/RCO2*ZPHM6(JL)*ZDIFF
+            PABCU(JL,20,JC)=PABCU(JL,20,JCP1)
+     S           +ZABLY(JL,9,JC)*RCH42D(JL,JC)/RCO2*ZPSM6(JL)*ZDIFF
+            PABCU(JL,21,JC)=PABCU(JL,21,JCP1)
+     S           +ZABLY(JL,8,JC)*RN2O2D(JL,JC)/RCO2*ZPHN6(JL)*ZDIFF
+            PABCU(JL,22,JC)=PABCU(JL,22,JCP1)
+     S           +ZABLY(JL,9,JC)*RN2O2D(JL,JC)/RCO2*ZPSN6(JL)*ZDIFF
+C
+            PABCU(JL,23,JC)=PABCU(JL,23,JCP1)
+     S           +ZABLY(JL,8,JC)*RCFC112D(JL,JC)/RCO2         *ZDIFF
+            PABCU(JL,24,JC)=PABCU(JL,24,JCP1)
+     S           +ZABLY(JL,8,JC)*RCFC122D(JL,JC)/RCO2         *ZDIFF
+#endif
+         ELSE
+            ! Same calculation as for type_trac /= repr
+            PABCU(JL,19,JC)=PABCU(JL,19,JCP1)
+     S           +ZABLY(JL,8,JC)*RCH4/RCO2*ZPHM6(JL)*ZDIFF
+            PABCU(JL,20,JC)=PABCU(JL,20,JCP1)
+     S           +ZABLY(JL,9,JC)*RCH4/RCO2*ZPSM6(JL)*ZDIFF
+            PABCU(JL,21,JC)=PABCU(JL,21,JCP1)
+     S           +ZABLY(JL,8,JC)*RN2O/RCO2*ZPHN6(JL)*ZDIFF
+            PABCU(JL,22,JC)=PABCU(JL,22,JCP1)
+     S           +ZABLY(JL,9,JC)*RN2O/RCO2*ZPSN6(JL)*ZDIFF
+C     
+            PABCU(JL,23,JC)=PABCU(JL,23,JCP1)
+     S               +ZABLY(JL,8,JC)*RCFC11/RCO2         *ZDIFF
+            PABCU(JL,24,JC)=PABCU(JL,24,JCP1)
+     S           +ZABLY(JL,8,JC)*RCFC12/RCO2         *ZDIFF
+         END IF
+      ELSE
+         PABCU(JL,19,JC)=PABCU(JL,19,JCP1)
+     S        +ZABLY(JL,8,JC)*RCH4/RCO2*ZPHM6(JL)*ZDIFF
+         PABCU(JL,20,JC)=PABCU(JL,20,JCP1)
      S               +ZABLY(JL,9,JC)*RCH4/RCO2*ZPSM6(JL)*ZDIFF
-      PABCU(JL,21,JC)=PABCU(JL,21,JCP1)
-     S               +ZABLY(JL,8,JC)*RN2O/RCO2*ZPHN6(JL)*ZDIFF
-      PABCU(JL,22,JC)=PABCU(JL,22,JCP1)
-     S               +ZABLY(JL,9,JC)*RN2O/RCO2*ZPSN6(JL)*ZDIFF
-C
-      PABCU(JL,23,JC)=PABCU(JL,23,JCP1)
-     S               +ZABLY(JL,8,JC)*RCFC11/RCO2         *ZDIFF
-      PABCU(JL,24,JC)=PABCU(JL,24,JCP1)
-     S               +ZABLY(JL,8,JC)*RCFC12/RCO2         *ZDIFF
+         PABCU(JL,21,JC)=PABCU(JL,21,JCP1)
+     S        +ZABLY(JL,8,JC)*RN2O/RCO2*ZPHN6(JL)*ZDIFF
+         PABCU(JL,22,JC)=PABCU(JL,22,JCP1)
+     S        +ZABLY(JL,9,JC)*RN2O/RCO2*ZPSN6(JL)*ZDIFF
+C     
+         PABCU(JL,23,JC)=PABCU(JL,23,JCP1)
+     S        +ZABLY(JL,8,JC)*RCFC11/RCO2         *ZDIFF
+         PABCU(JL,24,JC)=PABCU(JL,24,JCP1)
+     S        +ZABLY(JL,8,JC)*RCFC12/RCO2         *ZDIFF
+      END IF
+      
  523  CONTINUE
  524  CONTINUE
