Index: /LMDZ6/branches/DYNAMICO-conv/libf/phylmd/cpl_mod.F90
===================================================================
--- /LMDZ6/branches/DYNAMICO-conv/libf/phylmd/cpl_mod.F90	(revision 3054)
+++ /LMDZ6/branches/DYNAMICO-conv/libf/phylmd/cpl_mod.F90	(revision 3055)
@@ -105,5 +105,5 @@
     USE surface_data
     USE indice_sol_mod
-    USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
+    USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat, grid1dTo2d_glo
     USE time_phylmdz_mod, ONLY: annee_ref, day_ini, itau_phy, itaufin_phy
     USE print_control_mod, ONLY: lunout
@@ -236,10 +236,10 @@
        idayref = day_ini
        CALL ymds2ju(annee_ref, 1, idayref, 0.0, zjulian)
-       CALL gr_fi_ecrit(1,klon,nbp_lon,nbp_lat,rlon,zx_lon)
+       CALL grid1dTo2d_glo(rlon,zx_lon)
        DO i = 1, nbp_lon
           zx_lon(i,1) = rlon(i+1)
           zx_lon(i,nbp_lat) = rlon(i+1)
        ENDDO
-       CALL gr_fi_ecrit(1,klon,nbp_lon,nbp_lat,rlat,zx_lat)
+       CALL grid1dTo2d_glo(rlat,zx_lat)
        clintocplnam="cpl_atm_tauflx"
        CALL histbeg(clintocplnam,nbp_lon,zx_lon(:,1),nbp_lat,zx_lat(1,:),&
Index: /LMDZ6/branches/DYNAMICO-conv/libf/phylmd/iophy.F90
===================================================================
--- /LMDZ6/branches/DYNAMICO-conv/libf/phylmd/iophy.F90	(revision 3054)
+++ /LMDZ6/branches/DYNAMICO-conv/libf/phylmd/iophy.F90	(revision 3055)
@@ -17,10 +17,5 @@
 #ifdef CPP_XIOS
   INTERFACE histwrite_phy
-!#ifdef CPP_XIOSnew
     MODULE PROCEDURE histwrite2d_phy,histwrite3d_phy,histwrite2d_phy_old,histwrite3d_phy_old,histwrite2d_xios,histwrite3d_xios,histwrite0d_xios
-!#else
-!    MODULE PROCEDURE histwrite2d_phy,histwrite3d_phy,histwrite2d_phy_old,histwrite3d_phy_old,histwrite2d_xios,histwrite3d_xios
-!#endif
-
   END INTERFACE
 #else
@@ -285,5 +280,5 @@
                                 is_sequential, klon_mpi_begin, klon_mpi_end, &
                                 mpi_rank
-  USE mod_grid_phy_lmdz, ONLY: klon_glo, nbp_lon, nbp_lat
+  USE mod_grid_phy_lmdz, ONLY: klon_glo, nbp_lon, nbp_lat, grid1dTo2d_glo
   USE ioipsl, ONLY: histbeg
 
@@ -360,5 +355,5 @@
      ENDDO
 
-       CALL gr_fi_ecrit(1,klon,nbp_lon,nbp_lat,rlon_glo,zx_lon)
+       CALL grid1dTo2d_glo(rlon_glo,zx_lon)
        IF ((nbp_lon*nbp_lat).GT.1) THEN
        DO i = 1, nbp_lon
@@ -367,5 +362,5 @@
        ENDDO
        ENDIF
-       CALL gr_fi_ecrit(1,klon,nbp_lon,nbp_lat,rlat_glo,zx_lat)
+       CALL grid1dTo2d_glo(rlat_glo,zx_lat)
 
     DO i=1,pim
Index: /LMDZ6/branches/DYNAMICO-conv/libf/phylmd/pbl_surface_mod.F90
===================================================================
--- /LMDZ6/branches/DYNAMICO-conv/libf/phylmd/pbl_surface_mod.F90	(revision 3054)
+++ /LMDZ6/branches/DYNAMICO-conv/libf/phylmd/pbl_surface_mod.F90	(revision 3055)
@@ -56,4 +56,5 @@
     USE print_control_mod, ONLY: lunout
     USE ioipsl_getin_p_mod, ONLY : getin_p
+    IMPLICIT NONE
 
     INCLUDE "dimsoil.h"
@@ -277,5 +278,5 @@
     USE indice_sol_mod
     USE time_phylmdz_mod, ONLY: day_ini,annee_ref,itau_phy
-    USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
+    USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat, grid1dto2d_glo
     USE print_control_mod, ONLY: prt_level,lunout
 
@@ -830,10 +831,10 @@
           idayref = day_ini
           CALL ymds2ju(annee_ref, 1, idayref, 0.0, zjulian)
-          CALL gr_fi_ecrit(1,klon,nbp_lon,nbp_lat,rlon,zx_lon)
+          CALL grid1dTo2d_glo(rlon,zx_lon)
           DO i = 1, nbp_lon
              zx_lon(i,1) = rlon(i+1)
              zx_lon(i,nbp_lat) = rlon(i+1)
           ENDDO
-          CALL gr_fi_ecrit(1,klon,nbp_lon,nbp_lat,rlat,zx_lat)
+          CALL grid1dTo2d_glo(rlat,zx_lat)
           CALL histbeg("sous_index",nbp_lon,zx_lon(:,1),nbp_lat,zx_lat(1,:), &
                1,nbp_lon,1,nbp_lat, &
@@ -881,4 +882,5 @@
  zt2m(:)=0. ; zq2m(:)=0. ; qsat2m(:)=0. ; rh2m(:)=0.
  d_t(:,:)=0. ; d_t_diss(:,:)=0. ; d_q(:,:)=0. ; d_u(:,:)=0. ; d_v(:,:)=0.
+ zcoefh(:,:,:)=0. ; zcoefm(:,:,:)=0.
  zxsens_x(:)=0. ; zxsens_w(:)=0. ; zxfluxlat_x(:)=0. ; zxfluxlat_w(:)=0.
  cdragh_x(:)=0. ; cdragh_w(:)=0. ; cdragm_x(:)=0. ; cdragm_w(:)=0.
