Index: /LMDZ6/trunk/libf/phylmdiso/physiq_mod.F90
===================================================================
--- /LMDZ6/trunk/libf/phylmdiso/physiq_mod.F90	(revision 4982)
+++ /LMDZ6/trunk/libf/phylmdiso/physiq_mod.F90	(revision 4983)
@@ -2077,5 +2077,5 @@
                               ptconv, read_climoz, clevSTD,                   &
                               ptconvth, d_u, d_t, qx, d_qx, zmasse,           &
-                              flag_aerosol, flag_aerosol_strat, ok_cdnc,t,u1,v1)
+                              flag_aerosol, flag_aerosol_strat, ok_cdnc, t, u1, v1)
 #endif
 
@@ -2281,54 +2281,51 @@
        ENDIF
 
-      IF (using_xios) THEN 
-! Need to put this initialisation after phyetat0 as in the coupled model the XIOS context is only
-! initialised at that moment
-       ! Get "missing_val" value from XML files (from temperature variable)
-        IF (is_omp_master) CALL xios_get_field_attr("temp",default_value=missing_val)
-        CALL bcast_omp(missing_val)
-
+       IF (using_xios) THEN    
+         ! Need to put this initialisation after phyetat0 as in the coupled model the XIOS context is only
+         ! initialised at that moment
+         ! Get "missing_val" value from XML files (from temperature variable)
+         IF (is_omp_master) CALL xios_get_field_attr("temp",default_value=missing_val)
+         CALL bcast_omp(missing_val)
        ! 
        ! Now we activate some double radiation call flags only if some
        ! diagnostics are requested, otherwise there is no point in doing this
-       IF (is_master) THEN
-         !--setting up swaero_diag to TRUE in XIOS case 
-         IF (xios_field_is_active("topswad").OR.xios_field_is_active("topswad0").OR. & 
-            xios_field_is_active("solswad").OR.xios_field_is_active("solswad0").OR. & 
-            xios_field_is_active("topswai").OR.xios_field_is_active("solswai").OR.  & 
-              (iflag_rrtm==1.AND.(xios_field_is_active("toplwad").OR.xios_field_is_active("toplwad0").OR. & 
-                                  xios_field_is_active("sollwad").OR.xios_field_is_active("sollwad0"))))  & 
-            !!!--for now these fields are not in the XML files so they are omitted 
-            !!!  xios_field_is_active("toplwai").OR.xios_field_is_active("sollwai") !))) & 
-            swaero_diag=.TRUE. 
+         IF (is_master) THEN
+           !--setting up swaero_diag to TRUE in XIOS case 
+           IF (xios_field_is_active("topswad").OR.xios_field_is_active("topswad0").OR. & 
+              xios_field_is_active("solswad").OR.xios_field_is_active("solswad0").OR. & 
+              xios_field_is_active("topswai").OR.xios_field_is_active("solswai").OR.  & 
+                (iflag_rrtm==1.AND.(xios_field_is_active("toplwad").OR.xios_field_is_active("toplwad0").OR. & 
+                                    xios_field_is_active("sollwad").OR.xios_field_is_active("sollwad0"))))  & 
+              !!!--for now these fields are not in the XML files so they are omitted 
+              !!!  xios_field_is_active("toplwai").OR.xios_field_is_active("sollwai") !))) & 
+              swaero_diag=.TRUE. 
  
-         !--setting up swaerofree_diag to TRUE in XIOS case 
-         IF (xios_field_is_active("SWdnSFCcleanclr").OR.xios_field_is_active("SWupSFCcleanclr").OR. &
-            xios_field_is_active("SWupTOAcleanclr").OR.xios_field_is_active("rsucsaf").OR.   &
-            xios_field_is_active("rsdcsaf") .OR. xios_field_is_active("LWdnSFCcleanclr").OR. &
-            xios_field_is_active("LWupTOAcleanclr")) &
-            swaerofree_diag=.TRUE. 
+           !--setting up swaerofree_diag to TRUE in XIOS case 
+           IF (xios_field_is_active("SWdnSFCcleanclr").OR.xios_field_is_active("SWupSFCcleanclr").OR. &
+              xios_field_is_active("SWupTOAcleanclr").OR.xios_field_is_active("rsucsaf").OR.   &
+              xios_field_is_active("rsdcsaf") .OR. xios_field_is_active("LWdnSFCcleanclr").OR. &
+              xios_field_is_active("LWupTOAcleanclr")) &
+              swaerofree_diag=.TRUE. 
  
-         !--setting up dryaod_diag to TRUE in XIOS case 
-         DO naero = 1, naero_tot-1
-          IF (xios_field_is_active("dryod550_"//name_aero_tau(naero))) dryaod_diag=.TRUE. 
-         ENDDO
-         !
-         !--setting up ok_4xCO2atm to TRUE in XIOS case 
-         IF (xios_field_is_active("rsut4co2").OR.xios_field_is_active("rlut4co2").OR. & 
-            xios_field_is_active("rsutcs4co2").OR.xios_field_is_active("rlutcs4co2").OR. &
-            xios_field_is_active("rsu4co2").OR.xios_field_is_active("rsucs4co2").OR. &
-            xios_field_is_active("rsd4co2").OR.xios_field_is_active("rsdcs4co2").OR. &
-            xios_field_is_active("rlu4co2").OR.xios_field_is_active("rlucs4co2").OR. &
-            xios_field_is_active("rld4co2").OR.xios_field_is_active("rldcs4co2")) &
-            ok_4xCO2atm=.TRUE. 
-       ENDIF
-       !$OMP BARRIER
-       CALL bcast(swaero_diag)
-       CALL bcast(swaerofree_diag)
-       CALL bcast(dryaod_diag)
-       CALL bcast(ok_4xCO2atm)
-
-     ENDIF !using_xios 
-
+           !--setting up dryaod_diag to TRUE in XIOS case 
+           DO naero = 1, naero_tot-1
+             IF (xios_field_is_active("dryod550_"//name_aero_tau(naero))) dryaod_diag=.TRUE. 
+           ENDDO
+           !
+          !--setting up ok_4xCO2atm to TRUE in XIOS case 
+           IF (xios_field_is_active("rsut4co2").OR.xios_field_is_active("rlut4co2").OR. & 
+              xios_field_is_active("rsutcs4co2").OR.xios_field_is_active("rlutcs4co2").OR. &
+              xios_field_is_active("rsu4co2").OR.xios_field_is_active("rsucs4co2").OR. &
+              xios_field_is_active("rsd4co2").OR.xios_field_is_active("rsdcs4co2").OR. &
+              xios_field_is_active("rlu4co2").OR.xios_field_is_active("rlucs4co2").OR. &
+              xios_field_is_active("rld4co2").OR.xios_field_is_active("rldcs4co2")) &
+              ok_4xCO2atm=.TRUE. 
+           ENDIF
+           !$OMP BARRIER
+           CALL bcast(swaero_diag)
+           CALL bcast(swaerofree_diag)
+           CALL bcast(dryaod_diag)
+           CALL bcast(ok_4xCO2atm)
+         ENDIF !using_xios
        !
        CALL printflag( tabcntr0,radpas,ok_journe, &
@@ -5762,18 +5759,4 @@
                 !
              ENDIF
-<<<<<<< .mine
-          ELSE IF (iflag_rrtm .EQ.2) THEN    ! ecrad RADIATION
-#ifdef CPP_ECRAD
-             !--climatologies or INCA aerosols
-             CALL readaerosol_optic_ecrad( debut, aerosol_couple, ok_alw, ok_volcan, &
-                  flag_aerosol, flag_bc_internal_mixture, itap, jD_cur-jD_ref, &
-                  pdtphys, pplay, paprs, t_seri, rhcl, presnivs,  &
-                  tr_seri, mass_solu_aero, mass_solu_aero_pi)  
-#else
-                abort_message='You should compile with -rad ecrad if running with iflag_rrtm=2'
-                CALL abort_physic(modname,abort_message,1)
-#endif
-||||||| .r4942
-=======
           ELSE IF (iflag_rrtm .EQ.2) THEN    ! ecrad RADIATION
 #ifdef CPP_ECRAD
@@ -5787,7 +5770,5 @@
                 CALL abort_physic(modname,abort_message,1)
 #endif
->>>>>>> .r4981
           ENDIF
-
        ELSE   !--flag_aerosol = 0 
           tausum_aero(:,:,:) = 0.
@@ -6091,4 +6072,5 @@
                 ENDIF
                 !
+                ! AI namelist utilise pour l appel principal de radlwsw (ecrad)
                 namelist_ecrad_file='namelist_ecrad'
                 !
