Index: LMDZ6/trunk/libf/phylmd/iophy.F90
===================================================================
--- LMDZ6/trunk/libf/phylmd/iophy.F90	(revision 3473)
+++ LMDZ6/trunk/libf/phylmd/iophy.F90	(revision 3474)
@@ -1037,5 +1037,5 @@
 
     !Et sinon on.... écrit
-    IF (SIZE(field)/=klon .AND. SIZE(field)/=klev) CALL abort_physic('iophy::histwrite2d_phy','Field first DIMENSION not equal to klon/klev',1)    
+    IF (SIZE(field)/=klon .AND. SIZE(field)/=klev .AND. SIZE(field)/=klev+1) CALL abort_physic('iophy::histwrite2d_phy','Field first DIMENSION not equal to klon/klev',1)    
     IF (prt_level >= 10) THEn
       WRITE (lunout,*)"histwrite2d_phy: .not.vars_defined ; time to gather and write ", trim(var%name)
@@ -1215,5 +1215,5 @@
     !Et sinon on.... écrit
 
-    IF (SIZE(field,1)/=klon .AND. SIZE(field,1)/=klev) CALL abort_physic('iophy::histwrite3d_xios','Field first DIMENSION not equal to klon/klev',1)
+    IF (SIZE(field,1)/=klon .AND. SIZE(field,1)/=klev .AND. SIZE(field,1)/=klev+1) CALL abort_physic('iophy::histwrite3d_phy','Field first DIMENSION not equal to klon/klev',1)
 
     nlev=SIZE(field,2)
@@ -1360,8 +1360,8 @@
   IF (prt_level >= 10) WRITE(lunout,*)'Begin histrwrite2d_xios ',field_name
 
-  !Et sinon on.... écrit
-  IF (SIZE(field)/=klon .AND. SIZE(field)/=klev) CALL abort_physic('iophy::histwrite2d_xios','Field first DIMENSION not equal to klon/klev',1)
-    
-  IF (SIZE(field) == klev) then
+    !Et sinon on.... écrit
+    IF (SIZE(field)/=klon .AND. SIZE(field)/=klev .AND. SIZE(field)/=klev+1) CALL abort_physic('iophy::histwrite2d_xios','Field first DIMENSION not equal to klon/klev',1)
+    
+    IF (SIZE(field) == klev .OR. SIZE(field) == klev+1) then
 !$OMP MASTER
         CALL xios_send_field(field_name,field)
@@ -1442,8 +1442,11 @@
   IF (prt_level >= 10) write(lunout,*)'Begin histrwrite3d_xios ',field_name
 
-  !Et on.... écrit
-  IF (SIZE(field,1)/=klon .AND. SIZE(field,1)/=klev) CALL abort_physic('iophy::histwrite3d_xios','Field first DIMENSION not equal to klon/klev',1)
-    
-  IF (SIZE(field,1) == klev) then
+    !Et on.... écrit
+    IF (SIZE(field,1)/=klon .AND. SIZE(field,1)/=klev .AND. SIZE(field,1)/=klev+1) then
+      write(lunout,*)' histrwrite3d_xios ', field_name, SIZE(field)
+      CALL abort_physic('iophy::histwrite3d_xios','Field first DIMENSION not equal to klon/klev',1)
+    ENDIF
+    
+    IF (SIZE(field,1) == klev .OR. SIZE(field,1) == klev+1) then
 !$OMP MASTER
         CALL xios_send_field(field_name,field)
Index: LMDZ6/trunk/libf/phylmd/phys_output_ctrlout_mod.F90
===================================================================
--- LMDZ6/trunk/libf/phylmd/phys_output_ctrlout_mod.F90	(revision 3473)
+++ LMDZ6/trunk/libf/phylmd/phys_output_ctrlout_mod.F90	(revision 3474)
@@ -24,14 +24,25 @@
     'io_lat', '', '', (/ ('once', i=1, 10) /))
 
-!!! Comosantes de la coordonnee sigma-hybride
+!!! Composantes de la coordonnee sigma-hybride
 !!! Ap et Bp et interfaces
   TYPE(ctrl_out), SAVE :: o_Ahyb = ctrl_out((/ 1, 1, 1, 1, 1, 1, 11, 11, 11, 11/), &
-    'Ahyb', '', '', (/ ('once', i=1, 10) /))
+    'Ahyb', 'Ahyb at level interface', '', (/ ('once', i=1, 10) /))
   TYPE(ctrl_out), SAVE :: o_Bhyb = ctrl_out((/ 1, 1, 1, 1, 1, 1, 11, 11, 11, 11/), &
-    'Bhyb', '', '', (/ ('once', i=1, 10) /))
-  TYPE(ctrl_out), SAVE :: o_Ahyb_inter = ctrl_out((/ 1, 1, 1, 1, 1, 1, 11, 11, 11, 11/), &
-    'Ahyb_inter', '', '', (/ ('once', i=1, 10) /))
-  TYPE(ctrl_out), SAVE :: o_Bhyb_inter = ctrl_out((/ 1, 1, 1, 1, 1, 1, 11, 11, 11, 11/), &
-    'Bhyb_inter', '', '', (/ ('once', i=1, 10) /))
+    'Bhyb', 'Bhyb at level interface', '', (/ ('once', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_Ahyb_bounds = ctrl_out((/ 1, 1, 1, 1, 1, 1, 11, 11, 11, 11/), &
+    'Ahyb_bounds', '', '', (/ ('once', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_Bhyb_bounds = ctrl_out((/ 1, 1, 1, 1, 1, 1, 11, 11, 11, 11/), &
+    'Bhyb_bounds', '', '', (/ ('once', i=1, 10) /))
+!!! Composantes de la coordonnee sigma-hybride  au milieu des couches
+!!! Aps et Bps et interfaces
+  TYPE(ctrl_out), SAVE :: o_Ahyb_mid = ctrl_out((/ 1, 1, 1, 1, 1, 1, 11, 11, 11, 11/), &
+    'Ahyb_mid', 'Ahyb at the middle of the level', '', (/ ('once', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_Bhyb_mid = ctrl_out((/ 1, 1, 1, 1, 1, 1, 11, 11, 11, 11/), &
+    'Bhyb_mid', 'Bhyb at the middle of the level', '', (/ ('once', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_Ahyb_mid_bounds = ctrl_out((/ 1, 1, 1, 1, 1, 1, 11, 11, 11, 11/), &
+    'Ahyb_mid_bounds', '', '', (/ ('once', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_Bhyb_mid_bounds = ctrl_out((/ 1, 1, 1, 1, 1, 1, 11, 11, 11, 11/), &
+    'Bhyb_mid_bounds', '', '', (/ ('once', i=1, 10) /))
+
   TYPE(ctrl_out), SAVE :: o_Alt = ctrl_out((/ 1, 1, 1, 1, 1, 1, 11, 11, 11, 11/), &
     'Alt', '', '', (/ ('', i=1, 10) /))
Index: LMDZ6/trunk/libf/phylmd/phys_output_mod.F90
===================================================================
--- LMDZ6/trunk/libf/phylmd/phys_output_mod.F90	(revision 3473)
+++ LMDZ6/trunk/libf/phylmd/phys_output_mod.F90	(revision 3474)
@@ -131,5 +131,5 @@
                                                                        90.,   90.,   90.,   90.,   90. /)
     REAL, DIMENSION(klev,2) :: Ahyb_bounds, Bhyb_bounds
-    REAL, DIMENSION(klev)   :: lev_index
+    REAL, DIMENSION(klev+1)   :: lev_index
                 
 #ifdef CPP_XIOS
@@ -156,4 +156,5 @@
       lev_index(ilev) = REAL(ilev)
     END DO
+      lev_index(klev+1) = REAL(klev+1)
 
     IF (.NOT. ALLOCATED(o_trac)) ALLOCATE(o_trac(nqtot))
@@ -361,4 +362,6 @@
     CALL wxios_add_vaxis("klev", levmax(iff) - levmin(iff) + 1, &
                           lev_index(levmin(iff):levmax(iff)))
+    CALL wxios_add_vaxis("klevp1", klev+1, &
+                          lev_index(1:klev+1))
     CALL wxios_add_vaxis("bnds", 2, (/1.,2./))
 
Index: LMDZ6/trunk/libf/phylmd/phys_output_write_mod.F90
===================================================================
--- LMDZ6/trunk/libf/phylmd/phys_output_write_mod.F90	(revision 3473)
+++ LMDZ6/trunk/libf/phylmd/phys_output_write_mod.F90	(revision 3474)
@@ -32,5 +32,6 @@
     USE phys_output_ctrlout_mod, ONLY: o_phis, o_aire, is_ter, is_lic, is_oce, &
          o_longitude, o_latitude, &
-         o_Ahyb, o_Bhyb,o_Ahyb_inter, o_Bhyb_inter, & 
+         o_Ahyb, o_Bhyb,o_Ahyb_bounds, o_Bhyb_bounds, & 
+         o_Ahyb_mid, o_Bhyb_mid,o_Ahyb_mid_bounds, o_Bhyb_mid_bounds, & 
          is_ave, is_sic, o_contfracATM, o_contfracOR, &
          o_aireTER, o_flat, o_slp, o_ptstar, o_pt0, o_tsol, &
@@ -418,5 +419,6 @@
     REAL, PARAMETER :: dobson_u = 2.1415e-05 ! Dobson unit, in kg m-2
 !   REAL, PARAMETER :: missing_val=nf90_fill_real
-    REAL, DIMENSION(klev,2) :: Ahyb_bounds, Bhyb_bounds
+    REAL, DIMENSION(klev+1,2) :: Ahyb_bounds, Bhyb_bounds
+    REAL, DIMENSION(klev,2) :: Ahyb_mid_bounds, Bhyb_mid_bounds
     INTEGER :: ilev
 #ifndef CPP_XIOS
@@ -451,9 +453,24 @@
 #endif
 
-    DO ilev=1,klev
-      Ahyb_bounds(ilev,1) = ap(ilev)
-      Ahyb_bounds(ilev,2) = ap(ilev+1)
-      Bhyb_bounds(ilev,1) = bp(ilev)
-      Bhyb_bounds(ilev,2) = bp(ilev+1)
+    Ahyb_bounds(1,1) = 0.
+    Ahyb_bounds(1,2) = aps(1)
+    Bhyb_bounds(1,1) = 1.
+    Bhyb_bounds(1,2) = bps(1)    
+    DO ilev=2,klev
+      Ahyb_bounds(ilev,1) = aps(ilev-1)
+      Ahyb_bounds(ilev,2) = aps(ilev)
+      Bhyb_bounds(ilev,1) = bps(ilev-1)
+      Bhyb_bounds(ilev,2) = bps(ilev)
+    ENDDO
+     Ahyb_bounds(klev+1,1) = aps(klev)
+     Ahyb_bounds(klev+1,2) = 0.
+     Bhyb_bounds(klev+1,1) = bps(klev)
+     Bhyb_bounds(klev+1,2) = 0.
+
+    DO ilev=1, klev
+      Ahyb_mid_bounds(ilev,1) = ap(ilev)
+      Ahyb_mid_bounds(ilev,2) = ap(ilev+1)
+      Bhyb_mid_bounds(ilev,1) = bp(ilev)
+      Bhyb_mid_bounds(ilev,2) = bp(ilev+1)
     END DO
 
@@ -570,8 +587,12 @@
        CALL histwrite_phy("R_incl",R_incl)
        CALL histwrite_phy("solaire",solaire)
-       CALL histwrite_phy(o_Ahyb, aps)
-       CALL histwrite_phy(o_Bhyb, bps)
-       CALL histwrite_phy(o_Ahyb_inter, Ahyb_bounds)
-       CALL histwrite_phy(o_Bhyb_inter, Bhyb_bounds)
+       CALL histwrite_phy(o_Ahyb, ap)
+       CALL histwrite_phy(o_Bhyb, bp)
+       CALL histwrite_phy(o_Ahyb_bounds, Ahyb_bounds)
+       CALL histwrite_phy(o_Bhyb_bounds, Bhyb_bounds)
+       CALL histwrite_phy(o_Ahyb_mid, aps)
+       CALL histwrite_phy(o_Bhyb_mid, bps)
+       CALL histwrite_phy(o_Ahyb_mid_bounds, Ahyb_mid_bounds)
+       CALL histwrite_phy(o_Bhyb_mid_bounds, Bhyb_mid_bounds)
        CALL histwrite_phy(o_longitude, longitude_deg)
        CALL histwrite_phy(o_latitude, latitude_deg)
