Index: /LMDZ4/branches/LMDZ4_AR5/libf/phylmd/phys_output_write.h
===================================================================
--- /LMDZ4/branches/LMDZ4_AR5/libf/phylmd/phys_output_write.h	(revision 1635)
+++ /LMDZ4/branches/LMDZ4_AR5/libf/phylmd/phys_output_write.h	(revision 1636)
@@ -502,5 +502,5 @@
         ENDIF
 
-       if (iflag_pbl>1 .and. lev_histday.gt.10 ) then
+       if (iflag_pbl>1 .and. lev_files(iff).gt.10 ) then
         IF (o_tke_srf(nsrf)%flag(iff)<=lev_files(iff)) THEN
         CALL histwrite_phy(nid_files(iff),clef_stations(iff),
