Index: LMDZ4/trunk/libf/phylmd/phys_output_write.h
===================================================================
--- LMDZ4/trunk/libf/phylmd/phys_output_write.h	(revision 1367)
+++ LMDZ4/trunk/libf/phylmd/phys_output_write.h	(revision 1398)
@@ -599,31 +599,32 @@
         ENDIF
 
-        IF (o_s_capCL%flag(iff)<=lev_files(iff)) THEN
-      CALL histwrite_phy(nid_files(iff),o_s_capCL%name,itau_w,s_capCL)
-        ENDIF
-
-        IF (o_s_oliqCL%flag(iff)<=lev_files(iff)) THEN
-      CALL histwrite_phy(nid_files(iff),o_s_oliqCL%name,itau_w,s_oliqCL)
-        ENDIF
-
-        IF (o_s_cteiCL%flag(iff)<=lev_files(iff)) THEN
-      CALL histwrite_phy(nid_files(iff),o_s_cteiCL%name,itau_w,s_cteiCL)
-        ENDIF
-
         IF (o_s_therm%flag(iff)<=lev_files(iff)) THEN
       CALL histwrite_phy(nid_files(iff),o_s_therm%name,itau_w,s_therm)
         ENDIF
 
-        IF (o_s_trmb1%flag(iff)<=lev_files(iff)) THEN
-      CALL histwrite_phy(nid_files(iff),o_s_trmb1%name,itau_w,s_trmb1)
-        ENDIF
-
-        IF (o_s_trmb2%flag(iff)<=lev_files(iff)) THEN
-      CALL histwrite_phy(nid_files(iff),o_s_trmb2%name,itau_w,s_trmb2)
-        ENDIF
-
-        IF (o_s_trmb3%flag(iff)<=lev_files(iff)) THEN
-      CALL histwrite_phy(nid_files(iff),o_s_trmb3%name,itau_w,s_trmb3)
-        ENDIF
+!IM : Les champs suivants (s_capCL, s_oliqCL, s_cteiCL, s_trmb1, s_trmb2, s_trmb3) ne sont pas definis dans HBTM.F
+!       IF (o_s_capCL%flag(iff)<=lev_files(iff)) THEN
+!     CALL histwrite_phy(nid_files(iff),o_s_capCL%name,itau_w,s_capCL)
+!       ENDIF
+
+!       IF (o_s_oliqCL%flag(iff)<=lev_files(iff)) THEN
+!     CALL histwrite_phy(nid_files(iff),o_s_oliqCL%name,itau_w,s_oliqCL)
+!       ENDIF
+
+!       IF (o_s_cteiCL%flag(iff)<=lev_files(iff)) THEN
+!     CALL histwrite_phy(nid_files(iff),o_s_cteiCL%name,itau_w,s_cteiCL)
+!       ENDIF
+
+!       IF (o_s_trmb1%flag(iff)<=lev_files(iff)) THEN
+!     CALL histwrite_phy(nid_files(iff),o_s_trmb1%name,itau_w,s_trmb1)
+!       ENDIF
+
+!       IF (o_s_trmb2%flag(iff)<=lev_files(iff)) THEN
+!     CALL histwrite_phy(nid_files(iff),o_s_trmb2%name,itau_w,s_trmb2)
+!       ENDIF
+
+!       IF (o_s_trmb3%flag(iff)<=lev_files(iff)) THEN
+!     CALL histwrite_phy(nid_files(iff),o_s_trmb3%name,itau_w,s_trmb3)
+!       ENDIF
 
 ! Champs interpolles sur des niveaux de pression
@@ -655,6 +656,6 @@
        ENDIF
 
-       IF (o_phiSTDlevs(ll)%flag(iff)<=lev_files(iff)) THEN
-      CALL histwrite_phy(nid_files(iff),o_phiSTDlevs(ll)%name,
+       IF (o_zSTDlevs(ll)%flag(iff)<=lev_files(iff)) THEN
+      CALL histwrite_phy(nid_files(iff),o_zSTDlevs(ll)%name,
      &               itau_w,phiwriteSTD(:,k,iff))
        ENDIF
@@ -1173,11 +1174,12 @@
        ENDIF
 
+       IF (o_ovapinit%flag(iff)<=lev_files(iff)) THEN
+      CALL histwrite_phy(nid_files(iff),o_ovapinit%name,itau_w,
+     $ qx(:,:,ivap))
+       ENDIF
+
        IF (o_ovap%flag(iff)<=lev_files(iff)) THEN
-      CALL histwrite_phy(nid_files(iff),o_ovap%name,itau_w,qx(:,:,ivap))
-       ENDIF
-
-       IF (o_ovapinit%flag(iff)<=lev_files(iff)) THEN
-      CALL histwrite_phy(nid_files(iff),
-     $                   o_ovapinit%name,itau_w,q_seri)
+      CALL histwrite_phy(nid_files(iff),
+     $                   o_ovap%name,itau_w,q_seri)
        ENDIF
 
@@ -1262,10 +1264,10 @@
         ENDDO !nsrf=1, nbsrf
 
-       IF (o_albs%flag(iff)<=lev_files(iff)) THEN
-      CALL histwrite_phy(nid_files(iff),o_albs%name,itau_w,albsol1)
-       ENDIF
-
-       IF (o_albslw%flag(iff)<=lev_files(iff)) THEN
-      CALL histwrite_phy(nid_files(iff),o_albslw%name,itau_w,albsol2)
+       IF (o_alb1%flag(iff)<=lev_files(iff)) THEN
+      CALL histwrite_phy(nid_files(iff),o_alb1%name,itau_w,albsol1)
+       ENDIF
+
+       IF (o_alb2%flag(iff)<=lev_files(iff)) THEN
+      CALL histwrite_phy(nid_files(iff),o_alb2%name,itau_w,albsol2)
        ENDIF
 
@@ -1421,5 +1423,5 @@
        ENDIF
 
-      ENDIF !iflag_thermals
+!IM   ENDIF !iflag_thermals
 
        IF (o_f0_th%flag(iff)<=lev_files(iff)) THEN
@@ -1435,4 +1437,6 @@
       CALL histwrite_phy(nid_files(iff),o_dqthe%name,itau_w,zx_tmp_fi3d)
        ENDIF
+
+      ENDIF !iflag_thermals
 
        IF (o_dtajs%flag(iff)<=lev_files(iff)) THEN
