Index: LMDZ4/branches/LMDZ4V5.0-dev/libf/phylmd/iostart.F90
===================================================================
--- LMDZ4/branches/LMDZ4V5.0-dev/libf/phylmd/iostart.F90	(revision 1295)
+++ LMDZ4/branches/LMDZ4V5.0-dev/libf/phylmd/iostart.F90	(revision 1298)
@@ -5,5 +5,5 @@
     INTEGER,SAVE :: nid_restart
     
-    INTEGER,SAVE :: idim1,idim2,idim3
+    INTEGER,SAVE :: idim1,idim2,idim3,idim4
     INTEGER,PARAMETER :: length=100
     
@@ -317,4 +317,5 @@
       ierr = NF90_DEF_DIM (nid_restart, "points_physiques", klon_glo, idim2)
       ierr = NF90_DEF_DIM (nid_restart, "horizon_vertical", klon_glo*klev, idim3)
+      ierr = NF90_DEF_DIM (nid_restart, "horizon_klevp1", klon_glo*klevp1, idim4)
 
       ierr = NF90_ENDDEF(nid_restart)
@@ -386,9 +387,11 @@
     
     IF (is_mpi_root .AND. is_omp_root) THEN
-      
+
       IF (field_size==1) THEN
         idim=idim2
       ELSE IF (field_size==klev) THEN
         idim=idim3
+      ELSE IF (field_size==klevp1) THEN
+        idim=idim4
       ELSE
         PRINT *, "erreur phyredem : probleme de dimension"
@@ -467,5 +470,5 @@
          
     IF (is_mpi_root .AND. is_omp_root) THEN
-    
+
       IF (var_size/=length) THEN
         PRINT *, "erreur phyredem : probleme de dimension"
Index: LMDZ4/branches/LMDZ4V5.0-dev/libf/phylmd/phyetat0.F
===================================================================
--- LMDZ4/branches/LMDZ4V5.0-dev/libf/phylmd/phyetat0.F	(revision 1295)
+++ LMDZ4/branches/LMDZ4V5.0-dev/libf/phylmd/phyetat0.F	(revision 1298)
@@ -999,4 +999,46 @@
       PRINT*,'(ecart-type) wake_fip:', xmin, xmax
 c
+c  thermiques
+c
+
+      CALL get_field("FM_THERM",fm_therm,found)
+      IF (.NOT. found) THEN
+         PRINT*, "phyetat0: Le champ <fm_therm> est absent"
+         PRINT*, "Depart legerement fausse. Mais je continue"
+         fm_therm=0.
+      ENDIF
+      xmin = 1.0E+20
+      xmax = -1.0E+20
+      xmin = MINval(fm_therm)
+      xmax = MAXval(fm_therm)
+      PRINT*,'(ecart-type) fm_therm:', xmin, xmax
+
+      CALL get_field("ENTR_THERM",entr_therm,found)
+      IF (.NOT. found) THEN
+         PRINT*, "phyetat0: Le champ <entr_therm> est absent"
+         PRINT*, "Depart legerement fausse. Mais je continue"
+         entr_therm=0.
+      ENDIF
+      xmin = 1.0E+20
+      xmax = -1.0E+20
+      xmin = MINval(entr_therm)
+      xmax = MAXval(entr_therm)
+      PRINT*,'(ecart-type) entr_therm:', xmin, xmax
+
+      CALL get_field("DETR_THERM",detr_therm,found)
+      IF (.NOT. found) THEN
+         PRINT*, "phyetat0: Le champ <detr_therm> est absent"
+         PRINT*, "Depart legerement fausse. Mais je continue"
+         detr_therm=0.
+      ENDIF
+      xmin = 1.0E+20
+      xmax = -1.0E+20
+      xmin = MINval(detr_therm)
+      xmax = MAXval(detr_therm)
+      PRINT*,'(ecart-type) detr_therm:', xmin, xmax
+
+
+
+c
 c Read and send field trs to traclmdz
 c
Index: LMDZ4/branches/LMDZ4V5.0-dev/libf/phylmd/phyredem.F
===================================================================
--- LMDZ4/branches/LMDZ4V5.0-dev/libf/phylmd/phyredem.F	(revision 1295)
+++ LMDZ4/branches/LMDZ4V5.0-dev/libf/phylmd/phyredem.F	(revision 1298)
@@ -247,23 +247,23 @@
       ENDDO
 c
-      CALL put_field("ZMEA","",zmea)
-c
-      CALL put_field("ZSTD","",zstd)
-      
-      CALL put_field("ZSIG","",zsig)
-      
-      CALL put_field("ZGAM","",zgam)
-      
-      CALL put_field("ZTHE","",zthe)
-      
-      CALL put_field("ZPIC","",zpic)
-      
-      CALL put_field("ZVAL","",zval)
+      CALL put_field("ZMEA","ZMEA",zmea)
+c
+      CALL put_field("ZSTD","ZSTD",zstd)
+      
+      CALL put_field("ZSIG","ZSIG",zsig)
+      
+      CALL put_field("ZGAM","ZGAM",zgam)
+      
+      CALL put_field("ZTHE","ZTHE",zthe)
+      
+      CALL put_field("ZPIC","ZPIC",zpic)
+      
+      CALL put_field("ZVAL","ZVAL",zval)
       
       CALL put_field("RUGSREL","RUGSREL",rugoro)
       
-      CALL put_field("TANCIEN","",t_ancien)
-      
-      CALL put_field("QANCIEN","",q_ancien)
+      CALL put_field("TANCIEN","TANCIEN",t_ancien)
+      
+      CALL put_field("QANCIEN","QANCIEN",q_ancien)
       
       CALL put_field("RUGMER","Longueur de rugosite sur mer",
@@ -300,23 +300,30 @@
 cIM wake_deltat, wake_deltaq, wake_s, wake_cstar, wake_fip
       
-      CALL put_field("ZMAX0","",zmax0)
-      
-      CALL put_field("F0","",f0)
-      
-      CALL put_field("EMA_WORK1","",ema_work1)
-      
-      CALL put_field("EMA_WORK2","",ema_work2)
+      CALL put_field("ZMAX0","ZMAX0",zmax0)
+      
+      CALL put_field("F0","F0",f0)
+      
+      CALL put_field("EMA_WORK1","EMA_WORK1",ema_work1)
+      
+      CALL put_field("EMA_WORK2","EMA_WORK2",ema_work2)
       
 c wake_deltat
-      CALL put_field("WAKE_DELTAT","",wake_deltat)
-
-      CALL put_field("WAKE_DELTAQ","",wake_deltaq)
-      
-      CALL put_field("WAKE_S","",wake_s)
-      
-      CALL put_field("WAKE_CSTAR","",wake_cstar)
-      
-      CALL put_field("WAKE_FIP","",wake_fip)
-
+      CALL put_field("WAKE_DELTAT","WAKE_DELTAT",wake_deltat)
+
+      CALL put_field("WAKE_DELTAQ","WAKE_DELTAQ",wake_deltaq)
+      
+      CALL put_field("WAKE_S","WAKE_S",wake_s)
+      
+      CALL put_field("WAKE_CSTAR","WAKE_CSTAR",wake_cstar)
+      
+      CALL put_field("WAKE_FIP","WAKE_FIP",wake_fip)
+
+c thermiques
+
+      CALL put_field("FM_THERM","FM_THERM",fm_therm)
+
+      CALL put_field("ENTR_THERM","ENTR_THERM",entr_therm)
+
+      CALL put_field("DETR_THERM","DETR_THERM",detr_therm)
 
 ! trs from traclmdz_mod
Index: LMDZ4/branches/LMDZ4V5.0-dev/libf/phylmd/physiq.F
===================================================================
--- LMDZ4/branches/LMDZ4V5.0-dev/libf/phylmd/physiq.F	(revision 1295)
+++ LMDZ4/branches/LMDZ4V5.0-dev/libf/phylmd/physiq.F	(revision 1298)
@@ -458,5 +458,5 @@
 c
 c cnameisccp
-      CHARACTER *27 cnameisccp(lmaxm1,kmaxm1)
+      CHARACTER *29 cnameisccp(lmaxm1,kmaxm1)
 cIM bad 151205     DATA cnameisccp/'pc< 50hPa, tau< 0.3', 
       DATA cnameisccp/'pc= 50-180hPa, tau< 0.3',
@@ -1202,5 +1202,5 @@
 c         pmflxr=0.
 c         pmflxs=0.
-	first=.false.
+        first=.false.
 
       endif  ! first
@@ -1822,5 +1822,5 @@
         call writefield_phy('v_seri',v_seri,llm)
         call writefield_phy('t_seri',t_seri,llm)
-	call writefield_phy('q_seri',q_seri,llm)
+        call writefield_phy('q_seri',q_seri,llm)
       endif
 
@@ -1879,5 +1879,5 @@
         call writefield_phy('v_seri',v_seri,llm)
         call writefield_phy('t_seri',t_seri,llm)
-	call writefield_phy('q_seri',q_seri,llm)
+        call writefield_phy('q_seri',q_seri,llm)
       endif
 
@@ -2183,5 +2183,5 @@
         call writefield_phy('v_seri',v_seri,llm)
         call writefield_phy('t_seri',t_seri,llm)
-	call writefield_phy('q_seri',q_seri,llm)
+        call writefield_phy('q_seri',q_seri,llm)
       endif
 
@@ -2306,7 +2306,7 @@
       clwcon0th(:,:)=0.
 c
-      fm_therm(:,:)=0.
-      entr_therm(:,:)=0.
-      detr_therm(:,:)=0.
+c      fm_therm(:,:)=0.
+c      entr_therm(:,:)=0.
+c      detr_therm(:,:)=0.
 c
       IF(prt_level>9)WRITE(lunout,*)
@@ -2623,5 +2623,5 @@
         call writefield_phy('v_seri',v_seri,llm)
         call writefield_phy('t_seri',t_seri,llm)
-	call writefield_phy('q_seri',q_seri,llm)
+        call writefield_phy('q_seri',q_seri,llm)
       endif
 
@@ -2804,7 +2804,7 @@
        IF (thermcep) THEN
         IF(zt2m(i).LT.RTT) then
-	 Lheat=RLSTT
-	ELSE
-	 Lheat=RLVTT
+         Lheat=RLSTT
+        ELSE
+         Lheat=RLVTT
         ENDIF
        ELSE
@@ -2812,5 +2812,5 @@
          Lheat=RLSTT
         ELSE
-	 Lheat=RLVTT
+         Lheat=RLVTT
         ENDIF
        ENDIF
@@ -2867,6 +2867,6 @@
      $                          cdragm,
      $                          pctsrf,
-     $				pdtphys,
-     $				itap)
+     $                          pdtphys,
+     $                            itap)
 
          CALL VTe(VTinca)
@@ -2923,5 +2923,5 @@
         call writefield_phy('v_seri',v_seri,llm)
         call writefield_phy('t_seri',t_seri,llm)
-	call writefield_phy('q_seri',q_seri,llm)
+       call writefield_phy('q_seri',q_seri,llm)
       endif
       
@@ -3002,5 +3002,5 @@
         call writefield_phy('v_seri',v_seri,llm)
         call writefield_phy('t_seri',t_seri,llm)
-	call writefield_phy('q_seri',q_seri,llm)
+        call writefield_phy('q_seri',q_seri,llm)
       endif
  
@@ -3083,5 +3083,5 @@
         call writefield_phy('v_seri',v_seri,llm)
         call writefield_phy('t_seri',t_seri,llm)
-	call writefield_phy('q_seri',q_seri,llm)
+        call writefield_phy('q_seri',q_seri,llm)
       endif
       
@@ -3147,5 +3147,5 @@
         call writefield_phy('v_seri',v_seri,llm)
         call writefield_phy('t_seri',t_seri,llm)
-	call writefield_phy('q_seri',q_seri,llm)
+        call writefield_phy('q_seri',q_seri,llm)
       endif
 
@@ -3250,5 +3250,5 @@
 
          print*,'Attention on met a 0 les thermiques pour phystoke'
-	 call phystokenc (
+         call phystokenc (
      I                   nlon,klev,pdtphys,rlon,rlat,
      I                   t,pmfu, pmfd, pen_u, pde_u, pen_d, pde_d,
@@ -3403,5 +3403,5 @@
         call writefield_phy('v_seri',v_seri,llm)
         call writefield_phy('t_seri',t_seri,llm)
-	call writefield_phy('q_seri',q_seri,llm)
+        call writefield_phy('q_seri',q_seri,llm)
       endif
 
