Index: /trunk/NEMO/OPA_SRC/SBC/flx_bulk_daily.h90
===================================================================
--- /trunk/NEMO/OPA_SRC/SBC/flx_bulk_daily.h90	(revision 228)
+++ /trunk/NEMO/OPA_SRC/SBC/flx_bulk_daily.h90	(revision 229)
@@ -11,11 +11,12 @@
    
    INTEGER ::          &
+      ji, jj,          &  ! loop indices
       numfl1, numfl2,  &  ! logical units for surface fluxes data
-      numfl3,          &  ! 
+      numfl3, numfl4,  &  ! 
       nflx1, nflx2,    &  !  first and second record used
       nflx11, nflx12 , &  ! ???
       ndayflx
 
-   REAL(wp), DIMENSION(jpi,jpj,2,7) ::   &
+   REAL(wp), DIMENSION(jpi,jpj,2,3) ::   &
       flxdta              ! 2 consecutive set of CLIO/CMAP monthly fluxes
    !!----------------------------------------------------------------------
@@ -35,5 +36,6 @@
       !!       ORCA FORCED VERSION WITH :
       !!       Daily climatological NCEP temperature
-      !!       monthly climatological CLIO winds, humidity and clouds
+      !!       Daily climatological ERS-NCEP winds
+      !!       monthly climatological humidity and clouds
       !!       monthly climatological CMAP precipitation
       !!       Read several AGCM daily and monthly fluxes file
@@ -75,7 +77,8 @@
       REAL(wp), DIMENSION(jpk) ::   zlev           ! ???
       CHARACTER(len=45)  ::  &
-         clname_n = 'NCEP_1d_0101_0112_tair.nc',   &
-         clname_c = 'CLIO_1m_0101_0112_flx.nc' ,   &
-         clname_x = 'CMAP_1m_0101_0112_rain.nc'
+         clname_n = 'tair_1d.nc',        &
+         clname_c = 'hum_cloud_1m.nc',   &
+         clname_x = 'rain_1m.nc',        &
+         clname_w = 'wspd_1d.nc'
       !!---------------------------------------------------------------------
 
@@ -128,5 +131,5 @@
                 WRITE(numout,*) ' Check in file', clname_n
              ENDIF
-             STOP 'flx.forced.ncep_clio_xie.h'
+             STOP 'flx_bulk_daily.h90'
           ENDIF
           IF( ipi /= jpidta .AND. ipj /= jpjdta .AND. ipk /= 1 ) THEN
@@ -139,5 +142,5 @@
              WRITE(numout,*) ' Check in file', clname_n
           ENDIF
-          STOP 'flx.forced.ncep_clio_xie.h'
+          STOP 'flx_bulk_daily.h90'
        ENDIF
 
@@ -153,5 +156,5 @@
              WRITE(numout,*) ' Check in file', clname_c
           ENDIF
-          STOP 'flx.forced.ncep_clio_xie.h'
+          STOP 'flx_bulk_daily.h90'
        ENDIF
        IF( ipi /= jpidta .AND. ipj /= jpjdta .AND. ipk /= 1 ) THEN
@@ -164,5 +167,5 @@
              WRITE(numout,*) ' Check in file', clname_c
           ENDIF
-          STOP 'flx.forced.ncep_clio_xie.h'
+          STOP 'flx_bulk_daily.h90'
        ENDIF
        
@@ -178,5 +181,5 @@
              WRITE(numout,*) ' Check in file', clname_x
           ENDIF
-          STOP 'flx.forced.ncep_clio_xie.h'
+          STOP 'flx_bulk_daily.h90'
        ENDIF
        IF( ipi /= jpidta .AND. ipj /= jpjdta .AND. ipk /= 1 ) THEN
@@ -189,5 +192,30 @@
              WRITE(numout,*) ' Check in file', clname_x
           ENDIF
-          STOP 'flx.forced.ncep_clio_xie.h'
+          STOP 'flx_bulk_daily.h90'
+       ENDIF
+
+       ! open ERS-NCEP file
+       CALL flinopen(clname_w,mig(1),nlci,mjg(1),nlcj,.FALSE.,ipi,ipj &
+             ,ipk,zlon,zlat,zlev,itime,istep_n,zdate0,rdt,numfl4)
+
+       IF( itime /= jpday .AND. itime /= jpday+1 ) THEN
+          IF(lwp) THEN
+             WRITE(numout,*) ' '
+             WRITE(numout,*) 'problem with time coordinates '
+             WRITE(numout,*) ' itime ',itime,' jpday ',jpday
+             WRITE(numout,*) ' Check in file', clname_w
+          ENDIF
+          STOP 'flx_bulk_daily.h90'
+       ENDIF
+       IF( ipi /= jpidta .AND. ipj /= jpjdta .AND. ipk /= 1 ) THEN
+          IF(lwp) THEN
+             WRITE(numout,*) ' '
+             WRITE(numout,*) 'problem with dimensions'
+             WRITE(numout,*) ' ipi ',ipi,' jpidta ',jpidta
+             WRITE(numout,*) ' ipj ',ipj,' jpjdta ',jpjdta
+             WRITE(numout,*) ' ipk ',ipk,' =? 1'
+             WRITE(numout,*) ' Check in file', clname_w
+          ENDIF
+          STOP 'flx_bulk_daily.h90'
        ENDIF
 
@@ -212,4 +240,23 @@
        ! conversion of temperature Kelvin --> Celsius  [rt0=273.15]
        tatm(:,:) = ( tatm(:,:) - rt0 ) 
+
+       ! read wind speed
+       CALL flinget(numfl4,'wspd',jpidta,jpjdta,1,jpday,iday, &
+          iday,mig(1),nlci,mjg(1),nlcj,vatm(1:nlci,1:nlcj))
+
+       IF(lwp) WRITE (numout,*)' Lecture daily wind speed flx :',iday
+       IF(lwp) WRITE (numout,*)' '
+
+       ! Extra-halo initialization in MPP
+       IF( lk_mpp ) THEN
+          DO ji = nlci+1, jpi
+             tatm(ji,:) = tatm(1,:)
+             vatm(ji,:) = vatm(1,:)
+          ENDDO
+          DO jj = nlcj+1, jpj
+             tatm(:,jj) = tatm(:,1)
+             vatm(:,jj) = vatm(:,1)
+          ENDDO
+       ENDIF
          
     ENDIF
@@ -242,21 +289,31 @@
          CALL flinget(numfl2,'socliohu',jpidta,jpjdta,jpk,jpmois,nflx2, &
             nflx2,mig(1),nlci,mjg(1),nlcj,flxdta(1:nlci,1:nlcj,2,1))
-         ! wind
-         CALL flinget(numfl2,'socliowi',jpidta,jpjdta,jpk,jpmois,nflx1, &
-            nflx1,mig(1),nlci,mjg(1),nlcj,flxdta(1:nlci,1:nlcj,1,2))
-         CALL flinget(numfl2,'socliowi',jpidta,jpjdta,jpk,jpmois,nflx2, &
-            nflx2,mig(1),nlci,mjg(1),nlcj,flxdta(1:nlci,1:nlcj,2,2))
+
          ! clouds
          CALL flinget(numfl2,'socliocl',jpidta,jpjdta,jpk,jpmois,nflx1, &
+            nflx1,mig(1),nlci,mjg(1),nlcj,flxdta(1:nlci,1:nlcj,1,2))
+         CALL flinget(numfl2,'socliocl',jpidta,jpjdta,jpk,jpmois,nflx2, &
+            nflx2,mig(1),nlci,mjg(1),nlcj,flxdta(1:nlci,1:nlcj,2,2))
+
+         ! Read monthly precipitations ds flxdta(:,:,1 ou 2,4) 
+
+         CALL flinget(numfl3,'rain',jpidta,jpjdta,jpk,jpmois,nflx1, &
             nflx1,mig(1),nlci,mjg(1),nlcj,flxdta(1:nlci,1:nlcj,1,3))
-         CALL flinget(numfl2,'socliocl',jpidta,jpjdta,jpk,jpmois,nflx2, &
+         CALL flinget(numfl3,'rain',jpidta,jpjdta,jpk,jpmois,nflx2, &
             nflx2,mig(1),nlci,mjg(1),nlcj,flxdta(1:nlci,1:nlcj,2,3))
 
-         ! Read monthly precipitations ds flxdta(:,:,1 ou 2,4) 
-
-         CALL flinget(numfl3,'rain',jpidta,jpjdta,jpk,jpmois,nflx1, &
-            nflx1,mig(1),nlci,mjg(1),nlcj,flxdta(1:nlci,1:nlcj,1,4))
-         CALL flinget(numfl3,'rain',jpidta,jpjdta,jpk,jpmois,nflx2, &
-            nflx2,mig(1),nlci,mjg(1),nlcj,flxdta(1:nlci,1:nlcj,2,4))
+         ! Extra-halo initialization in MPP
+         IF( lk_mpp ) THEN
+            DO ji = nlci+1, jpi
+               flxdta(ji,:,1,1) = flxdta(1,:,1,1)   ;   flxdta(ji,:,2,1) = flxdta(1,:,2,1)
+               flxdta(ji,:,1,2) = flxdta(1,:,1,2)   ;   flxdta(ji,:,2,2) = flxdta(1,:,2,2)
+               flxdta(ji,:,1,3) = flxdta(1,:,1,3)   ;   flxdta(ji,:,2,3) = flxdta(1,:,2,3)
+            ENDDO
+            DO jj = nlcj+1, jpj
+               flxdta(:,jj,1,1) = flxdta(:,1,1,1)   ;   flxdta(:,jj,2,1) = flxdta(:,1,2,1)
+               flxdta(:,jj,1,2) = flxdta(:,1,1,2)   ;   flxdta(:,jj,2,2) = flxdta(:,1,2,2)
+               flxdta(:,jj,1,3) = flxdta(:,1,1,3)   ;   flxdta(:,jj,2,3) = flxdta(:,1,2,3)
+            ENDDO
+         ENDIF
                   
       ENDIF
@@ -269,8 +326,6 @@
 
       hatm(:,:) = ( (1.-zxy) * flxdta(:,:,1,1) + zxy  * flxdta(:,:,2,1) ) 
-      vatm(:,:) = ( (1.-zxy) * flxdta(:,:,1,2) + zxy  * flxdta(:,:,2,2) )  
-      catm(:,:) = ( (1.-zxy )* flxdta(:,:,1,3) + zxy  * flxdta(:,:,2,3) )  
-      watm(:,:) = ( (1.-zxy) * flxdta(:,:,1,4) + zxy  * flxdta(:,:,2,4) ) 
-
+      catm(:,:) = ( (1.-zxy )* flxdta(:,:,1,2) + zxy  * flxdta(:,:,2,2) )  
+      watm(:,:) = ( (1.-zxy) * flxdta(:,:,1,3) + zxy  * flxdta(:,:,2,3) ) 
 
       ! 4. Closing all files
Index: /trunk/NEMO/OPA_SRC/SBC/flx_bulk_monthly.h90
===================================================================
--- /trunk/NEMO/OPA_SRC/SBC/flx_bulk_monthly.h90	(revision 228)
+++ /trunk/NEMO/OPA_SRC/SBC/flx_bulk_monthly.h90	(revision 229)
@@ -10,4 +10,5 @@
    
    INTEGER ::          &
+      ji, jj,          &  ! loop indices
       numflx,          &  ! logical unit for surface fluxes data
       nflx1, nflx2,    &  !  first and second record used
@@ -135,4 +136,14 @@
             &          jpmois, 1, 1, mig(1), nlci,   &
             &          mjg(1), nlcj, flxdta(1:nlci,1:nlcj,1,5) )
+
+         ! Extra-halo initialization in MPP
+         IF( lk_mpp ) THEN
+            DO ji = nlci+1, jpi
+               flxdta(ji,:,1,5) = flxdta(1,:,1,5)   ;   flxdta(ji,:,2,5) = flxdta(1,:,2,5)
+            ENDDO
+            DO jj = nlcj+1, jpj
+               flxdta(:,jj,1,5) = flxdta(:,1,1,5)   ;   flxdta(:,jj,2,5) = flxdta(:,1,2,5)
+            ENDDO
+         ENDIF
       ENDIF
 
@@ -191,4 +202,20 @@
          ENDIF
 
+         ! Extra-halo initialization in MPP
+         IF( lk_mpp ) THEN
+            DO ji = nlci+1, jpi
+               flxdta(ji,:,1,1) = flxdta(1,:,1,1)   ;   flxdta(ji,:,2,1) = flxdta(1,:,2,1)
+               flxdta(ji,:,1,2) = flxdta(1,:,1,2)   ;   flxdta(ji,:,2,2) = flxdta(1,:,2,2)
+               flxdta(ji,:,1,3) = flxdta(1,:,1,3)   ;   flxdta(ji,:,2,3) = flxdta(1,:,2,3)
+               flxdta(ji,:,1,4) = flxdta(1,:,1,4)   ;   flxdta(ji,:,2,4) = flxdta(1,:,2,4)
+            ENDDO
+            DO jj = nlcj+1, jpj
+               flxdta(:,jj,1,1) = flxdta(:,1,1,1)   ;   flxdta(:,jj,2,1) = flxdta(:,1,2,1)
+               flxdta(:,jj,1,2) = flxdta(:,1,1,2)   ;   flxdta(:,jj,2,2) = flxdta(:,1,2,2)
+               flxdta(:,jj,1,3) = flxdta(:,1,1,3)   ;   flxdta(:,jj,2,3) = flxdta(:,1,2,3)
+               flxdta(:,jj,1,4) = flxdta(:,1,1,4)   ;   flxdta(:,jj,2,4) = flxdta(:,1,2,4)
+            ENDDO
+         ENDIF
+
       ENDIF
 
@@ -242,4 +269,16 @@
             END DO
          ENDIF
+
+         ! Extra-halo initialization in MPP
+         IF( lk_mpp ) THEN
+            DO ji = nlci+1, jpi
+               flxdta(ji,:,1,6) = flxdta(1,:,1,6)   ;   flxdta(ji,:,2,6) = flxdta(1,:,2,6)
+               flxdta(ji,:,1,7) = flxdta(1,:,1,7)   ;   flxdta(ji,:,2,7) = flxdta(1,:,2,7)
+            ENDDO
+            DO jj = nlcj+1, jpj
+               flxdta(:,jj,1,6) = flxdta(:,1,1,6)   ;   flxdta(:,jj,2,6) = flxdta(:,1,2,6)
+               flxdta(:,jj,1,7) = flxdta(:,1,1,7)   ;   flxdta(:,jj,2,7) = flxdta(:,1,2,7)
+            ENDDO
+         ENDIF
          
       ENDIF
