Index: LMDZ4/branches/LMDZ4V5.0-dev/libf/dyn3dpar/pres2lev.F90
===================================================================
--- LMDZ4/branches/LMDZ4V5.0-dev/libf/dyn3dpar/pres2lev.F90	(revision 1343)
+++ LMDZ4/branches/LMDZ4V5.0-dev/libf/dyn3dpar/pres2lev.F90	(revision 1346)
@@ -31,5 +31,5 @@
   REAL, INTENT(OUT) :: varn(ni*nj,lmn) ! var dans la nouvelle grille
 
-  REAL :: zvaro(ni*nj,lmo),zpo(ni*nj,lmn)
+  REAL :: zvaro(ni*nj,lmo),zpo(ni*nj,lmo)
 
 ! Autres variables
Index: LMDZ4/branches/LMDZ4V5.0-dev/libf/phylmd/phys_output_write.h
===================================================================
--- LMDZ4/branches/LMDZ4V5.0-dev/libf/phylmd/phys_output_write.h	(revision 1343)
+++ LMDZ4/branches/LMDZ4V5.0-dev/libf/phylmd/phys_output_write.h	(revision 1346)
@@ -844,13 +844,96 @@
 ! OD550 per species
       IF (new_aod .and. (.not. aerosol_couple)) THEN
-      DO naero = 1, naero_spc
-          IF (o_tausumaero(naero)%flag(iff)<=lev_files(iff)) THEN
-             CALL histwrite_phy(nid_files(iff),
-     $            o_tausumaero(naero)%name,itau_w,
-     $            tausum_aero(:,2,naero) )
-          ENDIF
-      END DO
-      ENDIF
-
+          IF (ok_ade.OR.ok_aie) THEN
+
+          IF (o_od550aer%flag(iff)<=lev_files(iff)) THEN
+             CALL histwrite_phy(nid_files(iff),o_od550aer%name,itau_w,
+     $            od550aer)
+          ENDIF
+          IF (o_od865aer%flag(iff)<=lev_files(iff)) THEN
+             CALL histwrite_phy(nid_files(iff),o_od865aer%name,itau_w,
+     $            od865aer)
+          ENDIF
+          IF (o_absvisaer%flag(iff)<=lev_files(iff)) THEN
+             CALL histwrite_phy(nid_files(iff),o_absvisaer%name,itau_w,
+     $            absvisaer)
+          ENDIF
+          IF (o_od550lt1aer%flag(iff)<=lev_files(iff)) THEN
+            CALL histwrite_phy(nid_files(iff),o_od550lt1aer%name,itau_w,
+     $            od550lt1aer)
+          ENDIF
+
+          IF (o_sconcso4%flag(iff)<=lev_files(iff)) THEN
+              CALL histwrite_phy(nid_files(iff),o_sconcso4%name,itau_w,
+     $            sconcso4)
+          ENDIF
+          IF (o_sconcoa%flag(iff)<=lev_files(iff)) THEN
+              CALL histwrite_phy(nid_files(iff),o_sconcoa%name,itau_w,
+     $            sconcoa)
+          ENDIF
+          IF (o_sconcbc%flag(iff)<=lev_files(iff)) THEN
+              CALL histwrite_phy(nid_files(iff),o_sconcbc%name,itau_w,
+     $            sconcbc)
+          ENDIF
+          IF (o_sconcss%flag(iff)<=lev_files(iff)) THEN
+              CALL histwrite_phy(nid_files(iff),o_sconcss%name,itau_w,
+     $            sconcss)
+          ENDIF
+          IF (o_sconcdust%flag(iff)<=lev_files(iff)) THEN
+              CALL histwrite_phy(nid_files(iff),o_sconcdust%name,itau_w,
+     $            sconcdust)
+          ENDIF
+          
+          IF (o_concso4%flag(iff)<=lev_files(iff)) THEN
+              CALL histwrite_phy(nid_files(iff),o_concso4%name,itau_w,
+     $            concso4)
+          ENDIF
+          IF (o_concoa%flag(iff)<=lev_files(iff)) THEN
+              CALL histwrite_phy(nid_files(iff),o_concoa%name,itau_w,
+     $            concoa)
+          ENDIF
+          IF (o_concbc%flag(iff)<=lev_files(iff)) THEN
+              CALL histwrite_phy(nid_files(iff),o_concbc%name,itau_w,
+     $            concbc)
+          ENDIF
+          IF (o_concss%flag(iff)<=lev_files(iff)) THEN
+              CALL histwrite_phy(nid_files(iff),o_concss%name,itau_w,
+     $            concss)
+          ENDIF
+          IF (o_concdust%flag(iff)<=lev_files(iff)) THEN
+              CALL histwrite_phy(nid_files(iff),o_concdust%name,itau_w,
+     $            concdust)
+          ENDIF
+          
+          IF (o_loadso4%flag(iff)<=lev_files(iff)) THEN
+              CALL histwrite_phy(nid_files(iff),o_loadso4%name,itau_w,
+     $            loadso4)
+          ENDIF
+          IF (o_loadoa%flag(iff)<=lev_files(iff)) THEN
+              CALL histwrite_phy(nid_files(iff),o_loadoa%name,itau_w,
+     $            loadoa)
+          ENDIF
+          IF (o_loadbc%flag(iff)<=lev_files(iff)) THEN
+              CALL histwrite_phy(nid_files(iff),o_loadbc%name,itau_w,
+     $            loadbc)
+          ENDIF
+          IF (o_loadss%flag(iff)<=lev_files(iff)) THEN
+              CALL histwrite_phy(nid_files(iff),o_loadss%name,itau_w,
+     $            loadss)
+          ENDIF
+          IF (o_loaddust%flag(iff)<=lev_files(iff)) THEN
+              CALL histwrite_phy(nid_files(iff),o_loaddust%name,itau_w,
+     $            loaddust)
+          ENDIF
+          
+          DO naero = 1, naero_spc
+            IF (o_tausumaero(naero)%flag(iff)<=lev_files(iff)) THEN
+                CALL histwrite_phy(nid_files(iff),
+     $              o_tausumaero(naero)%name,itau_w,
+     $              tausum_aero(:,2,naero) )
+            ENDIF
+          END DO
+          endif
+      ENDIF
+      
        IF (ok_ade) THEN
           IF (o_topswad%flag(iff)<=lev_files(iff)) THEN
@@ -954,7 +1037,51 @@
      $            solswai_aero)
           ENDIF
+          IF (o_scdnc%flag(iff)<=lev_files(iff)) THEN
+             CALL histwrite_phy(nid_files(iff),o_scdnc%name,itau_w,
+     $            scdnc)
+          ENDIF
+          IF (o_cldncl%flag(iff)<=lev_files(iff)) THEN
+             CALL histwrite_phy(nid_files(iff),o_cldncl%name,itau_w,
+     $            cldncl)
+          ENDIF
+          IF (o_reffclws%flag(iff)<=lev_files(iff)) THEN
+             CALL histwrite_phy(nid_files(iff),o_reffclws%name,itau_w,
+     $            reffclws)
+          ENDIF
+          IF (o_reffclwc%flag(iff)<=lev_files(iff)) THEN
+             CALL histwrite_phy(nid_files(iff),o_reffclwc%name,itau_w,
+     $            reffclwc)
+          ENDIF
+          IF (o_cldnvi%flag(iff)<=lev_files(iff)) THEN
+             CALL histwrite_phy(nid_files(iff),o_cldnvi%name,itau_w,
+     $            cldnvi)
+          ENDIF
+          IF (o_lcc%flag(iff)<=lev_files(iff)) THEN
+             CALL histwrite_phy(nid_files(iff),o_lcc%name,itau_w,
+     $            lcc)
+          ENDIF
+          IF (o_lcc3d%flag(iff)<=lev_files(iff)) THEN
+             CALL histwrite_phy(nid_files(iff),o_lcc3d%name,itau_w,
+     $            lcc3d)
+          ENDIF
+          IF (o_lcc3dcon%flag(iff)<=lev_files(iff)) THEN
+             CALL histwrite_phy(nid_files(iff),o_lcc3dcon%name,itau_w,
+     $            lcc3dcon)
+          ENDIF
+          IF (o_lcc3dstra%flag(iff)<=lev_files(iff)) THEN
+             CALL histwrite_phy(nid_files(iff),o_lcc3dstra%name,itau_w,
+     $            lcc3dstra)
+          ENDIF
+          IF (o_reffclwtop%flag(iff)<=lev_files(iff)) THEN
+             CALL histwrite_phy(nid_files(iff),o_reffclwtop%name,itau_w,
+     $            reffclwtop)
+          ENDIF
        ENDIF
 
 ! Champs 3D:
+       IF (o_ec550aer%flag(iff)<=lev_files(iff)) THEN
+      CALL histwrite_phy(nid_files(iff),o_ec550aer%name,itau_w,ec550aer)
+       ENDIF
+
        IF (o_lwcon%flag(iff)<=lev_files(iff)) THEN
       CALL histwrite_phy(nid_files(iff),o_lwcon%name,itau_w,flwc)
