Index: /LMDZ4/trunk/libf/phytherm/iniphysiq.F
===================================================================
--- /LMDZ4/trunk/libf/phytherm/iniphysiq.F	(revision 814)
+++ /LMDZ4/trunk/libf/phytherm/iniphysiq.F	(revision 815)
@@ -13,4 +13,5 @@
       USE mod_phys_lmdz_para
       USE comgeomphy
+
       IMPLICIT NONE
 c
@@ -57,5 +58,5 @@
       REAL pcu(klon_glo),pcv(klon_glo)
       INTEGER pdayref
-      INTEGER :: ibegin,iend
+      INTEGER :: ibegin,iend,offset
  
       REAL ptimestep
@@ -78,10 +79,12 @@
 c$OMP PARALLEL PRIVATE(ibegin,iend) 
 c$OMP+         SHARED(parea,pcu,pcv,plon,plat)
-
-      airephy(1:klon_omp)=parea(klon_omp_begin:klon_omp_end)
-      cuphy(1:klon_omp)=pcu(klon_omp_begin:klon_omp_end)
-      cvphy(1:klon_omp)=pcv(klon_omp_begin:klon_omp_end)
-      rlond(1:klon_omp) = plon(klon_omp_begin:klon_omp_end)
-      rlatd(1:klon_omp) = plat(klon_omp_begin:klon_omp_end)
+      
+      offset=klon_mpi_begin-1
+      airephy(1:klon_omp)=parea(offset+klon_omp_begin:
+     &                          offset+klon_omp_end)
+      cuphy(1:klon_omp)=pcu(offset+klon_omp_begin:offset+klon_omp_end)
+      cvphy(1:klon_omp)=pcv(offset+klon_omp_begin:offset+klon_omp_end)
+      rlond(1:klon_omp)=plon(offset+klon_omp_begin:offset+klon_omp_end)
+      rlatd(1:klon_omp)=plat(offset+klon_omp_begin:offset+klon_omp_end)
 
       call suphec
@@ -92,5 +95,4 @@
       print*,'CONTROLE DES LATITUDES, LONGITUDES, PARAMETRES ...'
 
-
       RETURN
 9999  STOP'Cette version demande les fichier rnatur.dat et surf.def'
Index: /LMDZ4/trunk/libf/phytherm/ocean_cpl_mod.F90
===================================================================
--- /LMDZ4/trunk/libf/phytherm/ocean_cpl_mod.F90	(revision 814)
+++ /LMDZ4/trunk/libf/phytherm/ocean_cpl_mod.F90	(revision 815)
@@ -12,6 +12,4 @@
   USE calcul_fluxs_mod, ONLY : calcul_fluxs
   USE climb_wind_mod,   ONLY : calcul_wind_flux
-  USE mod_clvent,       ONLY : calcul_flux_vent
-  USE surface_data,     ONLY : newwind
 
   IMPLICIT NONE
@@ -160,14 +158,7 @@
          tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l)
     
-!jg : temporary test, only calcul_flux_wind should be saved in the future
     ! Calcultate the flux of u and v at surface
-    IF (newwind) THEN
-       ! calculate flux with new methode
-       CALL calcul_wind_flux(knon, dtime, taux, tauy)
-    ELSE 
-       ! use results from old clvent. jg: TO BE REMOVED
-       CALL calcul_flux_vent(klon, taux, tauy)
-    ENDIF
-
+    CALL calcul_wind_flux(knon, dtime, taux, tauy)
+    
 
 !****************************************************************************************
@@ -312,12 +303,6 @@
 
     ! Calcultate the flux of u and v at surface
-    IF (newwind) THEN
-       ! calculate flux with new methode
-       CALL calcul_wind_flux(knon, dtime, taux, tauy)
-    ELSE
-       ! use results from old clvent. jg: TO BE REMOVED
-       CALL calcul_flux_vent(klon, taux, tauy)
-    END IF
-
+    CALL calcul_wind_flux(knon, dtime, taux, tauy)
+    
 !****************************************************************************************
 ! Flux ocean-atmosphere useful for "slab" ocean but here calculated only for printing
Index: /LMDZ4/trunk/libf/phytherm/pbl_surface_mod.F90
===================================================================
--- /LMDZ4/trunk/libf/phytherm/pbl_surface_mod.F90	(revision 814)
+++ /LMDZ4/trunk/libf/phytherm/pbl_surface_mod.F90	(revision 815)
@@ -13,5 +13,5 @@
   USE mod_phys_lmdz_para,  ONLY : mpi_size
   USE ioipsl
-  USE surface_data,        ONLY : ocean, ok_veget, debug_surf, newwind
+  USE surface_data,        ONLY : ocean, ok_veget
   USE surf_land_mod,       ONLY : surf_land
   USE surf_landice_mod,    ONLY : surf_landice
@@ -22,8 +22,4 @@
   USE climb_wind_mod,      ONLY : climb_wind_down, climb_wind_up
   USE coef_diff_turb_mod,  ONLY : coef_diff_turb
-
-!jg+ temporary
-  USE mod_clvent, ONLY : clvent, save_flux
-!jg-
 
   IMPLICIT NONE
@@ -455,9 +451,4 @@
 
 
-!jg+ temporary test
-    REAL, DIMENSION(klon,klev)         :: y_flux_u_old, y_flux_v_old
-    REAL, DIMENSION(klon,klev)         :: y_d_u_old, y_d_v_old
-!jg-
-    
 !****************************************************************************************
 ! End of declarations
@@ -698,19 +689,4 @@
             ycoefm, ycoefh)
        
-!jg+
-!****************************************************************************************
-!    => Old method
-! Calculer la diffusion des vitesses "u" et "v"   
-! Output can be used : y_d_u_old, y_flux_u_old, y_d_v_old, y_flux_v_old
-!
-!****************************************************************************************
-       CALL clvent(knon,dtime,yu1,yv1,ycoefm,yt,yu,ypaprs,ypplay,ydelp, &
-            y_d_u_old, y_flux_u_old)
-       CALL clvent(knon,dtime,yu1,yv1,ycoefm,yt,yv,ypaprs,ypplay,ydelp, &
-            y_d_v_old, y_flux_v_old)
-       ! save_flux est utile pour pouvoir utilise calcul_flux_vent plus tard
-       CALL save_flux(klon, y_flux_u_old(:,1), y_flux_v_old(:,1))
-!jg-
-
 !****************************************************************************************
 ! 
@@ -848,14 +824,4 @@
             y_flux_u, y_flux_v, y_d_u, y_d_v)
 
-!jg+ temporary for testing 
-! Use the results from old method
-       IF (.NOT. newwind) THEN
-          y_flux_u(:,:) = y_flux_u_old(:,:)
-          y_flux_v(:,:) = y_flux_v_old(:,:)
-          y_d_u(:,:)    = y_d_u_old(:,:)
-          y_d_v(:,:)    = y_d_v_old(:,:)
-       ENDIF
-!jg-
-   
        DO j = 1, knon
           y_dflux_t(j) = y_dflux_t(j) * ypct(j)
Index: /LMDZ4/trunk/libf/phytherm/readsulfate.F
===================================================================
--- /LMDZ4/trunk/libf/phytherm/readsulfate.F	(revision 814)
+++ /LMDZ4/trunk/libf/phytherm/readsulfate.F	(revision 815)
@@ -192,5 +192,5 @@
                ig=ig+1
                if (ig.gt.klon) write (*,*) 'shit'
-               so4(ig,k,it) = so4_1(i,jjm+1-j,klev+1-k,it)
+               so4(ig,k,it) = so4_1(i,jjm+1+1-j,klev+1-k,it)
             ENDDO
          ENDDO
@@ -430,5 +430,5 @@
                ig=ig+1
                if (ig.gt.klon) write (*,*) 'shit'
-               pi_so4(ig,k,it) = pi_so4_1(i,jjm+1-j,klev+1-k,it)
+               pi_so4(ig,k,it) = pi_so4_1(i,jjm+1+1-j,klev+1-k,it)
             ENDDO
          ENDDO
@@ -599,7 +599,7 @@
 
 #ifdef NC_DOUBLE
-         status = NF_GET_VAR_DOUBLE(NCID, VARID, START, COUNT, so4mth)
+         status = NF_GET_VARA_DOUBLE(NCID, VARID, START, COUNT, so4mth)
 #else
-         status = NF_GET_VAR_REAL(NCID, VARID, START, COUNT, so4mth)
+         status = NF_GET_VARA_REAL(NCID, VARID, START, COUNT, so4mth)
 #endif
          IF (STATUS .NE. NF_NOERR) write (*,*) 'err in read data',status
Index: /LMDZ4/trunk/libf/phytherm/surf_land_orchidee_mod.F90
===================================================================
--- /LMDZ4/trunk/libf/phytherm/surf_land_orchidee_mod.F90	(revision 814)
+++ /LMDZ4/trunk/libf/phytherm/surf_land_orchidee_mod.F90	(revision 815)
@@ -366,15 +366,19 @@
        IF (knon /=0) THEN
           CALL Init_orchidee_index(knon,orch_comm,knindex,offset,ktindex)
+
+#ifndef CPP_PARA
 #define ORC_PREPAR
+#endif
 #ifdef ORC_PREPAR
-          call intersurf_main (itime+itau_phy-1, iim, jjm+1, knon, ktindex, dtime, &
-     & lrestart_read, lrestart_write, lalo, &
-     & contfrac, neighbours, resolution, date0, &
-     & zlev,  u1_lay, v1_lay, spechum, temp_air, epot_air, ccanopy, &
-     & cdrag, petA_orc, peqA_orc, petB_orc, peqB_orc, &
-     & precip_rain, precip_snow, lwdown, swnet, swdown, ps, &
-     & evap, fluxsens, fluxlat, coastalflow, riverflow, &
-     & tsol_rad, tsurf_new, qsurf, albedo_out, emis_new, z0_new, &
-     & lon_scat, lat_scat)
+          ! Interface for version 1.8 or earlier of ORCHIDEE
+          CALL intersurf_main (itime+itau_phy-1, iim, jjm+1, knon, ktindex, dtime, &
+               lrestart_read, lrestart_write, lalo, &
+               contfrac, neighbours, resolution, date0, &
+               zlev,  u1_lay, v1_lay, spechum, temp_air, epot_air, ccanopy, &
+               cdrag, petA_orc, peqA_orc, petB_orc, peqB_orc, &
+               precip_rain, precip_snow, lwdown, swnet, swdown, ps, &
+               evap, fluxsens, fluxlat, coastalflow, riverflow, &
+               tsol_rad, tsurf_new, qsurf, albedo_out, emis_new, z0_new, &
+               lon_scat, lat_scat)
 
 #else          
@@ -402,14 +406,15 @@
     
 #ifdef ORC_PREPAR
-          call intersurf_main (itime+itau_phy-1, iim, jjm+1, knon, ktindex, dtime, &
-     & lrestart_read, lrestart_write, lalo, &
-     & contfrac, neighbours, resolution, date0, &
-     & zlev,  u1_lay, v1_lay, spechum, temp_air, epot_air, ccanopy, &
-     & cdrag, petA_orc, peqA_orc, petB_orc, peqB_orc, &
-     & precip_rain, precip_snow, lwdown, swnet, swdown, ps, &
-     & evap, fluxsens, fluxlat, coastalflow, riverflow, &
-     & tsol_rad, tsurf_new, qsurf, albedo_out, emis_new, z0_new, &
-     & lon_scat, lat_scat)
-
+       ! Interface for version 1.8 or earlier of ORCHIDEE
+       CALL intersurf_main (itime+itau_phy-1, iim, jjm+1, knon, ktindex, dtime, &
+            lrestart_read, lrestart_write, lalo, &
+            contfrac, neighbours, resolution, date0, &
+            zlev,  u1_lay, v1_lay, spechum, temp_air, epot_air, ccanopy, &
+            cdrag, petA_orc, peqA_orc, petB_orc, peqB_orc, &
+            precip_rain, precip_snow, lwdown, swnet, swdown, ps, &
+            evap, fluxsens, fluxlat, coastalflow, riverflow, &
+            tsol_rad, tsurf_new, qsurf, albedo_out, emis_new, z0_new, &
+            lon_scat, lat_scat)
+       
 #else
 
@@ -482,5 +487,8 @@
     INTEGER                               :: mpi_size
     INTEGER                               :: ierr   
-    
+!
+! End definition
+!****************************************************************************************
+
     MyLastPoint=klon_mpi_begin-1+knindex(knon)+iim-1
     
@@ -534,5 +542,8 @@
     INTEGER             :: color
     INTEGER             :: ierr
-    
+!
+! End definition
+!****************************************************************************************
+
     IF (knon==0) THEN 
        color = 0
@@ -557,22 +568,33 @@
 #endif    
 
-
+! Input arguments
+!****************************************************************************************
     INTEGER, INTENT(IN)                     :: knon
-    INTEGER, DIMENSION(knon,8), INTENT(OUT) :: neighbours
     INTEGER, DIMENSION(klon), INTENT(IN)    :: ktindex
     REAL, DIMENSION(klon), INTENT(IN)       :: pctsrf
     
-    INTEGER :: knon_nb(0:mpi_size-1)
-    INTEGER,DIMENSION(0:mpi_size-1) :: displs
-    INTEGER,ALLOCATABLE :: ktindex_g(:)
-    REAL :: pctsrf_g(klon_glo)
-    INTEGER,ALLOCATABLE ::neighbours_g(:,:)
-    INTEGER :: knon_g
-    REAL*8 :: correspond(iim,jjm+1)
-    INTEGER :: i,igrid,jj,ij,iglob,ierr,ireal,index
-    INTEGER, DIMENSION(8,3) :: off_ini
-    INTEGER, DIMENSION(8)   :: offset  
-    INTEGER :: ktindex_p(knon)
-    
+! Output arguments
+!****************************************************************************************
+    INTEGER, DIMENSION(knon,8), INTENT(OUT) :: neighbours
+
+! Local variables
+!****************************************************************************************
+    INTEGER                              :: knon_g
+    INTEGER                              :: i, igrid, jj, ij, iglob
+    INTEGER                              :: ierr, ireal, index
+    INTEGER, DIMENSION(0:mpi_size-1)     :: knon_nb
+    INTEGER, DIMENSION(0:mpi_size-1)     :: displs
+    INTEGER, DIMENSION(8,3)              :: off_ini
+    INTEGER, DIMENSION(8)                :: offset  
+    INTEGER, DIMENSION(knon)             :: ktindex_p
+    INTEGER, DIMENSION(iim,jjm+1)        :: correspond
+    INTEGER, ALLOCATABLE, DIMENSION(:)   :: ktindex_g
+    INTEGER, ALLOCATABLE, DIMENSION(:,:) :: neighbours_g
+    REAL, DIMENSION(klon_glo)            :: pctsrf_g
+    
+!
+! End definition
+!****************************************************************************************
+
     IF (is_sequential) THEN
        knon_nb(:)=knon
Index: /LMDZ4/trunk/libf/phytherm/surface_data.F90
===================================================================
--- /LMDZ4/trunk/libf/phytherm/surface_data.F90	(revision 814)
+++ /LMDZ4/trunk/libf/phytherm/surface_data.F90	(revision 815)
@@ -10,9 +10,4 @@
   REAL, PARAMETER        :: calsno=1./(2.3867e+06*.15)
   
-  LOGICAL, SAVE          :: debug_surf=.FALSE.
-  !$OMP THREADPRIVATE(debug_surf)
-  LOGICAL, SAVE          :: newwind=.FALSE.
-  !$OMP THREADPRIVATE(newwind)
-  
   LOGICAL, SAVE          :: ok_veget       ! true for use of vegetation model ORCHIDEE
   !$OMP THREADPRIVATE(ok_veget)
