Index: /LMDZ6/branches/IPSLCM6.0.15/DefLists/context_lmdz.xml
===================================================================
--- /LMDZ6/branches/IPSLCM6.0.15/DefLists/context_lmdz.xml	(revision 3283)
+++ /LMDZ6/branches/IPSLCM6.0.15/DefLists/context_lmdz.xml	(revision 3284)
@@ -59,6 +59,9 @@
     <axis id="plev" standard_name="model_level_number" unit="Pa">
     </axis>
-    <axis id="klev"  prec="8" long_name = "hybrid sigma pressure coordinate"
-          standard_name ="atmosphere_hybrid_sigma_pressure_coordinate" unit="1">
+    <axis id="klev"  prec="8" long_name = "number of layers"
+          standard_name ="number of layers" unit="1">
+    </axis>
+    <axis id="klevp1"  prec="8" long_name = "number of layer interfaces"
+          standard_name ="number of layer interfaces" unit="1">
     </axis>
     <axis id="bnds" standard_name="bounds" unit="1" >
@@ -100,4 +103,5 @@
 
     <grid id="klev_bnds"> <axis axis_ref="klev" /> <axis axis_ref="bnds" /> </grid>
+    <grid id="klevp1_bnds"> <axis axis_ref="klevp1" /> <axis axis_ref="bnds" /> </grid>
 
      <grid id="grid_glo">
Index: /LMDZ6/branches/IPSLCM6.0.15/DefLists/field_def_lmdz.xml
===================================================================
--- /LMDZ6/branches/IPSLCM6.0.15/DefLists/field_def_lmdz.xml	(revision 3283)
+++ /LMDZ6/branches/IPSLCM6.0.15/DefLists/field_def_lmdz.xml	(revision 3284)
@@ -13,8 +13,12 @@
 
     <field_group id="coord_hyb">
-        <field id="Ahyb"      axis_ref="klev" />
-        <field id="Ahyb_inter" grid_ref="klev_bnds" />
-        <field id="Bhyb"       axis_ref="klev"  />
-        <field id="Bhyb_inter"  grid_ref="klev_bnds" />
+        <field id="Ahyb" long_name="Ahyb at level interface"     axis_ref="klevp1" />
+        <field id="Ahyb_bounds" long_name="" grid_ref="klevp1_bnds" />
+        <field id="Bhyb" long_name="Bhyb at level interface"       axis_ref="klevp1"  />
+        <field id="Bhyb_bounds" long_name=""  grid_ref="klevp1_bnds" />
+        <field id="Ahyb_mid" long_name="Ahyb at the middle of the level"      axis_ref="klev" />
+        <field id="Ahyb_mid_bounds" long_name="" grid_ref="klev_bnds" />
+        <field id="Bhyb_mid" long_name="Bhyb at the middle of the level"       axis_ref="klev"  />
+        <field id="Bhyb_mid_bounds" long_name=""  grid_ref="klev_bnds" />
     </field_group>
     
Index: /LMDZ6/branches/IPSLCM6.0.15/DefLists/file_def_histmth_lmdz.xml
===================================================================
--- /LMDZ6/branches/IPSLCM6.0.15/DefLists/file_def_histmth_lmdz.xml	(revision 3283)
+++ /LMDZ6/branches/IPSLCM6.0.15/DefLists/file_def_histmth_lmdz.xml	(revision 3284)
@@ -14,7 +14,11 @@
               <field field_ref="io_lat" level="1" />
               <field field_ref="Ahyb" level="1" />
-              <field field_ref="Ahyb_inter" level="1" />
+              <field field_ref="Ahyb_bounds" level="1" />
               <field field_ref="Bhyb" level="1" />
-              <field field_ref="Bhyb_inter" level="1" />
+              <field field_ref="Bhyb_bounds" level="1" />
+              <field field_ref="Ahyb_mid" level="1" />
+              <field field_ref="Ahyb_mid_bounds" level="1" />
+              <field field_ref="Bhyb_mid" level="1" />
+              <field field_ref="Bhyb_mid_bounds" level="1" />
             </field_group>
 
Index: /LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/iophy.F90
===================================================================
--- /LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/iophy.F90	(revision 3283)
+++ /LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/iophy.F90	(revision 3284)
@@ -996,5 +996,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)
@@ -1154,5 +1154,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)
@@ -1287,7 +1287,7 @@
 
     !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
+    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)
@@ -1362,7 +1362,10 @@
 
     !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
+    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/branches/IPSLCM6.0.15/libf/phylmd/phys_output_ctrlout_mod.F90
===================================================================
--- /LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/phys_output_ctrlout_mod.F90	(revision 3283)
+++ /LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/phys_output_ctrlout_mod.F90	(revision 3284)
@@ -26,14 +26,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/branches/IPSLCM6.0.15/libf/phylmd/phys_output_mod.F90
===================================================================
--- /LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/phys_output_mod.F90	(revision 3283)
+++ /LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/phys_output_mod.F90	(revision 3284)
@@ -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/branches/IPSLCM6.0.15/libf/phylmd/phys_output_write_mod.F90
===================================================================
--- /LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/phys_output_write_mod.F90	(revision 3283)
+++ /LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/phys_output_write_mod.F90	(revision 3284)
@@ -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, &
@@ -413,5 +414,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
@@ -442,9 +444,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
 
@@ -561,8 +578,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)
