Index: trunk/NEMO/OPA_SRC/DIA/diagap.F90
===================================================================
--- trunk/NEMO/OPA_SRC/DIA/diagap.F90	(revision 238)
+++ trunk/NEMO/OPA_SRC/DIA/diagap.F90	(revision 239)
@@ -34,10 +34,8 @@
       ngap  ,                 &  ! time step frequency
       nprg                       ! switch for control print
-#if ! defined key_fdir
    ! netcdf files and index common
    INTEGER ::   &
       nhoridg, ndepidg,             &
       ndex(1)
-#endif
    REAL(wp) ::     &
       vol                        ! total ocean volume
@@ -76,7 +74,6 @@
       !!----------------------------------------------------------------------
       !! * Modules used
-#if ! defined key_fdir
       USE ioipsl
-#endif
+
       !! * Arguments
       INTEGER, INTENT(in) ::   kt           ! ocean time-step index
@@ -151,8 +148,4 @@
          IF(lwp) WRITE(numout,*) '     basin volume : ',vol*1.e-9, '  km3'
 
-#if defined key_fdir
-      CALL ctlopn( numgap, 'differences.diag', 'UNKNOWN', 'UNFORMATTED', 'SEQUENTIAL', 1,numout,lwp,1)
-#else
-
          ! OPEN netcdf file 
 
@@ -195,5 +188,4 @@
           CALL histend( numgap )
           ndex(1) = 0
-#endif
       ENDIF
 
@@ -260,8 +252,4 @@
           ! Output in file numgap
 
-#if defined key_fdir
-          IF(lwp) WRITE (numgap) no, kt, jpk, tdtag, sdtag, tmodg, smodg
-#else
-
           ! Netcdf write
 
@@ -273,5 +261,4 @@
              CALL histwrite( numgap, "mosalimo", it, smodg, jpk, ndex )
           END IF
-#endif
       ENDIF
 
@@ -279,9 +266,5 @@
 
       IF( kt == nitend ) THEN
-#if defined key_fdir
-          CLOSE( numgap )             ! direct acces file
-#else
-          CALL histclo( numgap )      !   Netcdf file
-#endif    
+         CALL histclo( numgap )      !   Netcdf file
       ENDIF 
 
Index: trunk/NEMO/OPA_SRC/DIA/diaptr.F90
===================================================================
--- trunk/NEMO/OPA_SRC/DIA/diaptr.F90	(revision 238)
+++ trunk/NEMO/OPA_SRC/DIA/diaptr.F90	(revision 239)
@@ -345,77 +345,4 @@
    END SUBROUTINE dia_ptr_init
 
-#if defined key_fdir
-   !!---------------------------------------------------------------------
-   !!   'key_fdir'                                      direct access file
-   !!---------------------------------------------------------------------
-
-   SUBROUTINE dia_ptr_wri( kt )
-      !!---------------------------------------------------------------------
-      !!                ***  ROUTINE dia_ptr_wri  ***
-      !!
-      !! ** Purpose :   output of poleward fluxes 
-      !! 
-      !! ** Method  :   NetCDF file
-      !!
-      !! History :
-      !!   9.0  !  03-09  (G. Madec)  Original code  
-      !!---------------------------------------------------------------------- 
-      !! * Arguments
-      INTEGER, INTENT(in) ::   kt   ! ocean time-step index
-      REAL(wp), DIMENSION(jpj) ::   zphi, zfoo
-      !!---------------------------------------------------------------------- 
-
-      IF( kt == nit000 ) THEN
-
-         ! Reference latitude
-         ! ------------------
-         !                                           ! =======================
-         IF( cp_cfg == "orca" ) THEN                 !   ORCA configurations
-            !                                        ! =======================
-
-            IF( jp_cfg == 05  )   iline = 192   ! i-line that passes near the North Pole
-            IF( jp_cfg == 025 )   iline = 384   ! i-line that passes near the North Pole
-            IF( jp_cfg == 2   )   iline =  48   ! i-line that passes near the North Pole
-            IF( jp_cfg == 4   )   iline =  24   ! i-line that passes near the North Pole
- 
-            zphi(:) = 0.e0   
-            DO ji = mi0(iline), mi1(iline)
-               zphi(:) = gphiv(ji,:)         ! if iline is in the local domain
-            END DO
-            ! provide the correct zphi to all local domains
-            IF( lk_mpp )   CALL mpp_sum( zphi, jpj )        
-            ! introduce arbitray northernmost grid point to avoid netcdf error
-            DO jj=mj0(jpjglo), mj1(jpjglo)
-               zphi(jj) = 2*zphi(jj-1)-zphi(jj-2)
-            ENDDO
-
-            !                                        ! =======================
-         ELSE                                        !   OTHER configurations
-            !                                        ! =======================
-            zphi(:) = gphiv(1,:)             ! assume lat/lon coordinate, select the first i-line
-            !
-         ENDIF
- 
-         ! open the output file         
-         CALL ctlopn( numptr, 'opaptr.output', 'UNKNOWN', 'UNFORMATTED', 'SEQUENTIAL', 1, numout, lwp, 1 )
-
-         ! header of output
-         WRITE( numptr ) cexper, no, zdt, nf_ptr, jpj, jpk, zphi
-
-      ENDIF
-
-      IF( MOD( kt, nf_ptr ) == 0 ) THEN
-            IF(lwp) WRITE( numptr ) kt, tn_jk, sn_jk, v_msf,              &
-# if defined key_diaeiv
-               &                    pht_eiv, pst_eiv, v_msf_eiv,          &
-# endif
-               &                    pht_adv, pht_ldf, pst_adv, pst_ldf
-      ENDIF
-
-      IF( kt == nitend )   CLOSE( numptr )
-
-   END SUBROUTINE dia_ptr_wri
-
-#else
    !!---------------------------------------------------------------------
    !!   Default option :                                       NetCDF file
@@ -598,6 +525,4 @@
    END SUBROUTINE dia_ptr_wri
 
-#endif
-
    !!======================================================================
 END MODULE diaptr
Index: trunk/NEMO/OPA_SRC/DIA/diawri_fdir.h90
===================================================================
--- trunk/NEMO/OPA_SRC/DIA/diawri_fdir.h90	(revision 238)
+++ 	(revision )
@@ -1,311 +1,0 @@
-   !!---------------------------------------------------------------------
-   !!                           diawri_fdir.h90
-   !!                         *******************
-   !!---------------------------------------------------------------------
-   !!   dia_wri : create the standart direct access output files
-   !!---------------------------------------------------------------------
-
-   SUBROUTINE dia_wri ( kt, kindic )
-      !!---------------------------------------------------------------------
-      !!                  ***  ROUTINE diawri  ***
-      !!   
-      !! ** Purpose :   Standard output of opa: dynamics and tracer fields
-      !!      in direct access format
-      !!
-      !! ** Method  :   At the first time step (nit000), output of the grid-
-      !!      point position and depth and of the mask at t-point.
-      !!      Each nwrite time step, output of velocity fields (un,vn,wn)
-      !!      tracer fields (tn,sn) and three two dimensional selected fields,
-      !!      usually the thermohaline forcing fields (q, e, qsr).
-      !!      If kindic <0, output of fields before the model interruption.
-      !!      If kindic =0, time step loop
-      !!      If kindic >0, output of fields before the time step loop
-      !!
-      !! History :
-      !!        !  91-03  ()  Original code
-      !!        !  91-11  (G. Madec)
-      !!        !  92-06  (M. Imbard)  correction restart file
-      !!        !  92-07  (M. Imbard)  split into diawri and rstwri
-      !!        !  93-03  (M. Imbard)  suppress writibm
-      !!        !  94-12  (M. Imbard)  access direct format
-      !!   8.5  !  02-09  (G. Madec)  F90: Free form and module
-      !!----------------------------------------------------------------------
-      !! * Arguments
-      INTEGER, INTENT( in ) ::   kt      ! ocean time-step index
-      INTEGER, INTENT( in ) ::   kindic  ! 
-
-      !! * Save variables 
-      INTEGER, SAVE ::   &
-         nmoyct,      &  ! time-step counter for averaging
-         nstepo          ! output number
-#   if ! defined key_diainstant
-      REAL(wp), SAVE, DIMENSION(jpi,jpj,jpk) ::   &
-         um, vm, wm,  &  ! average value of velocity components
-         tm, sm,      &  ! average value of temperature and salinity
-         am,          &  ! average value of vert.diffusivity coef.
-         fsel            ! average value of 2D fields collected in a 2D one
-#   endif
-
-      !! * Local declarations
-      INTEGER ::   inum = 11     ! temporary logical unit
-      INTEGER ::   inbrec, inbsel
-      INTEGER ::   jk, jc
-      INTEGER ::   ilglo, ibloc, ierror, ic
-      REAL(wp) :: zmoyctr
-#if defined key_diainstant
-      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   &
-         zsel           ! temporary array for 2D fields collected in a 3D one
-#endif
-      CHARACTER (len=40) ::   clhstnam
-      CHARACTER (len=21) ::   cldir, clunf, clunk
-      CHARACTER (len=80) ::   classign
-      !!----------------------------------------------------------------------
-      
-      
-      ! 1. Initialization
-      ! -----------------
-      
-      inbrec = 7
-      inbsel = 13
-
-      IF( kt == nit000 .AND. kindic > 0 ) THEN
-
-         ! 0.1 Open specifier
-
-         clunk = 'UNKNOWN'
-         clunf = 'UNFORMATTED'
-         cldir = 'DIRECT'
-
-         ! computation of the record length for direct access file
-         ! this length depend of 512 for the t3d machine
-
-         ibloc = 4096
-         ilglo = ibloc*( (jpiglo*jpjglo*jpbytda-1 )/ibloc+1)
-
-         CALL dia_nam(clhstnam,nwrite,' ')
-         DO jc=1,40
-            IF( clhstnam(jc:jc) == ' ' ) go to 120
-         END DO
-120      CONTINUE
-         ic=jc
-         clhstnam=clhstnam(1:ic-1)//".fd"
-         CALL ctlopn( inum, 'date.file', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', 1, numout, lwp, 1 )
-         WRITE(inum,*) clhstnam
-         CLOSE(inum)
-         WRITE (UNIT = classign,FMT ='(''assign -F null -N ieee f:'',a40)') clhstnam
-         IF(lwp) WRITE(numout,*) classign
-#if defined _CRAY
-         CALL ASSIGN(classign, ierror)
-#endif
-         IF(lwp)WRITE(numout,*) '   ierror assign = ',ierror
-         CALL ctlopn( numwri, clhstnam, clunk, clunf, cldir,   &
-            ilglo, numout, lwp, 1 )
-      ENDIF
-
-#if ! defined key_diainstant
-
-      IF( kt == nit000 .AND. kindic > 0 ) THEN
-
-         ! 1.1.1 Prognostic variables
-         
-         nmoyct = 0
-         nstepo = 0
-         
-         um(:,:,:) = 0.e0
-         vm(:,:,:) = 0.e0
-         wm(:,:,:) = 0.e0
-         tm(:,:,:) = 0.e0
-         sm(:,:,:) = 0.e0
-         am(:,:,:) = 0.e0
-
-         fsel(:,:,:) = 0.e0
-      ENDIF
-
-      ! 1.2 Sum
-      
-      nmoyct = nmoyct+1
-      
-      um(:,:,:) = um (:,:,:) + un(:,:,:)
-      vm(:,:,:) = vm (:,:,:) + vn(:,:,:)
-      wm(:,:,:) = wm (:,:,:) + wn(:,:,:)
-      tm(:,:,:) = tm (:,:,:) + tn(:,:,:)
-      sm(:,:,:) = sm (:,:,:) + sn(:,:,:)
-      am(:,:,:) = am (:,:,:) +avt(:,:,:)
-      
-      fsel(:,:,1 ) = fsel(:,:,1 ) + taux(:,:)
-      fsel(:,:,2 ) = fsel(:,:,2 ) + tauy(:,:)
-      fsel(:,:,3 ) = fsel(:,:,3 ) + qt  (:,:)
-      fsel(:,:,4 ) = fsel(:,:,4 ) + (emp(:,:) - runoff(:,:))*rday
-#if defined key_dtasst
-      fsel(:,:,5 ) = fsel(:,:,5 ) + sst (:,:)
-#else
-      fsel(:,:,5 ) = fsel(:,:,5 ) + tb  (:,:,1)
-#endif
-      fsel(:,:,6 ) = fsel(:,:,6 ) + qsr (:,:)
-#if defined key_dynspg_fsc
-      fsel(:,:,7 ) = fsel(:,:,7 ) + sshn(:,:)
-#else
-      fsel(:,:,7 ) = fsel(:,:,7 ) + bsfn(:,:)
-#endif
-      fsel(:,:,8 ) = fsel(:,:,8 ) + freeze(:,:)
-      fsel(:,:,9 ) = fsel(:,:,9 ) + qrp (:,:)
-      fsel(:,:,10) = fsel(:,:,10) + erp (:,:)*rday
-      fsel(:,:,11) = fsel(:,:,11) + hmlp(:,:)
-      fsel(:,:,12) = fsel(:,:,12) + emp (:,:)*rday*sb(:,:,1)
-      fsel(:,:,13) = fsel(:,:,13) + erp (:,:)*rday*sb(:,:,1)
-      fsel(:,:,14) = fsel(:,:,14) + hmld(:,:)
-      fsel(:,:,15) = 0.e0
-      fsel(:,:,16) = fsel(:,:,16) + runoff(:,:)
-      ! vertical sum of intantaneous in situ density anomaly
-            fsel(:,:,17) = 0.
-      DO jk =1, jpk
-         fsel(:,:,17) = fsel(:,:,17) + rhd(:,:,jk) * e1t(:,:) * e2t(:,:) * fse3t(:,:,jk)
-      END DO
-      ! 1.2 Output of the model domain (at nit000)
-      
-      IF( kt == nit000 .AND. kindic > 0 ) THEN
-         IF(lwp) WRITE ( numwri, REC=1 ) jpiglo, jpjglo, jpk
-      ENDIF
-      
-      
-      ! 2. Output of dynamics and tracer fields and selected fields (numwri)
-      ! -----------------------------------------------------------
-      
-      ! 2.1 Average
-      
-      IF( MOD( kt, nwrite ) == 0 .OR. kindic < 0 .OR.    &
-         ( kt == nit000 .AND. kindic > 0) .OR. kt == nitend ) THEN
-
-         IF(kindic /= -3) THEN 
-            zmoyctr = 1. / FLOAT(nmoyct)
-            um  (:,:,:) = um  (:,:,:) * zmoyctr
-            vm  (:,:,:) = vm  (:,:,:) * zmoyctr
-            wm  (:,:,:) = wm  (:,:,:) * zmoyctr
-            tm  (:,:,:) = tm  (:,:,:) * zmoyctr
-            sm  (:,:,:) = sm  (:,:,:) * zmoyctr
-            am  (:,:,:) = am  (:,:,:) * zmoyctr
-            fsel(:,:,:) = fsel(:,:,:) * zmoyctr
-            
-         ELSE 
-            ! kindic=-3 STOP with  e r r o r, instantaneous output
-            nmoyct = 1
-            um(:,:,:) = un (:,:,:)
-            vm(:,:,:) = vn (:,:,:)
-            wm(:,:,:) = wn (:,:,:)
-            tm(:,:,:) = tn (:,:,:)
-            sm(:,:,:) = sn (:,:,:)
-            am(:,:,:) = avt(:,:,:)
-            
-            fsel(:,:,1 ) = taux(:,:)
-            fsel(:,:,2 ) = tauy(:,:)
-            fsel(:,:,3 ) = qt  (:,:)
-            fsel(:,:,4 ) = (emp (:,:)- runoff(:,:))*rday
-#if defined key_dtasst
-            fsel(:,:,5 ) = sst (:,:)
-#else
-            fsel(:,:,5 ) = tb  (:,:,1)
-#endif
-            fsel(:,:,6 ) = qsr (:,:)
-#if defined key_dynspg_fsc
-            fsel(:,:,7 ) = sshn(:,:)
-#else
-            fsel(:,:,7 ) = bsfn(:,:)
-#endif
-            fsel(:,:,8 ) = freeze(:,:)
-            fsel(:,:,9 ) = qrp (:,:)
-            fsel(:,:,10) = erp (:,:)
-            fsel(:,:,11) = hmlp(:,:)
-            fsel(:,:,12) = emp (:,:)*rday*sb(:,:,1)
-            fsel(:,:,13) = erp (:,:)*rday*sb(:,:,1)
-            fsel(:,:,14) = hmld(:,:)
-            fsel(:,:,15) = 0.e0
-            fsel(:,:,16) = runoff(:,:)
-         ENDIF
-
-         ! 2.2 Write
-         
-         IF(lwp) THEN
-            um(3,1,1) = FLOAT( kt )
-            vm(3,1,1) = FLOAT( nmoyct )
-         ENDIF
-         CALL write4( numwri, um  , nstepo*inbrec+2 )
-         CALL write4( numwri, vm  , nstepo*inbrec+3 )
-         CALL write4( numwri, wm  , nstepo*inbrec+4 )
-         CALL write4( numwri, tm  , nstepo*inbrec+5 )
-         CALL write4( numwri, sm  , nstepo*inbrec+6 )
-         CALL write4( numwri, am  , nstepo*inbrec+7 )
-         CALL write4( numwri, fsel, nstepo*inbrec+8 )
-         
-         IF(lwp) WRITE(numout,*) ' '
-         IF(lwp) WRITE(numout,*) ' **** write in numwri ',kt
-         IF(lwp) WRITE(numout,*) '    average fields with ',nmoyct,'pdt'
-         
-         ! 2.3 Zero initialisation
-         
-         nmoyct = 0
-         nstepo = nstepo+1
-         
-         um(:,:,:) = 0.e0
-         vm(:,:,:) = 0.e0
-         wm(:,:,:) = 0.e0
-         tm(:,:,:) = 0.e0
-         sm(:,:,:) = 0.e0
-         am(:,:,:) = 0.e0
-         
-         fsel(:,:,:) = 0.e0
-         
-      ENDIF
-      
-#else
-
-      ! Sortie instantanee
-      
-      IF( kt == nit000 .AND. kindic > 0 ) THEN
-         nstepo = 0
-         IF(lwp) WRITE ( numwri, REC=1 ) jpiglo, jpjglo, jpk
-      ENDIF
-      
-      IF( MOD( kt, nwrite ) == 0 .OR. kindic < 0   &
-         .OR. (kt == nit000 .AND. kindic > 0) .OR.  kt == nitend ) THEN
-         fsel(:,:,:) = 0.e0
-         
-         zsel(:,:,1 ) = taux(:,:) * umask(:,:,1)
-         zsel(:,:,2 ) = tauy(:,:) * vmask(:,:,1)
-         zsel(:,:,3 ) = qt  (:,:)
-         zsel(:,:,4 ) = (emp (:,:)-runoff(:,:))*rday
-#if defined key_dtasst
-         zsel(:,:,5 ) = sst (:,:)
-#else
-         zsel(:,:,5 ) = tb  (:,:,1)
-#endif
-         zsel(:,:,6 ) = qsr (:,:)
-#if defined key_dynspg_fsc
-         zsel(:,:,7 ) = sshn(:,:)
-#else
-         zsel(:,:,7 ) = bsfn(:,:)
-#endif
-         zsel(:,:,8 ) = freeze(:,:)
-         zsel(:,:,9 ) = qrp (:,:)
-         zsel(:,:,10) = erp (:,:)
-         zsel(:,:,11) = hmlp(:,:)
-         zsel(:,:,12) = emp (:,:) * sb(:,:,1)
-         zsel(:,:,13) = erp (:,:) * sb(:,:,1)
-         zsel(:,:,14) = hmld(:,:)
-         zsel(:,:,15) = 0.e0
-         zsel(:,:,16) = runoff(:,:)
-         
-         CALL write4( numwri, un  , nstepo*inbrec+2 )
-         CALL write4( numwri, vn  , nstepo*inbrec+3 )
-         CALL write4( numwri, wn  , nstepo*inbrec+4 )
-         CALL write4( numwri, tn  , nstepo*inbrec+5 )
-         CALL write4( numwri, sn  , nstepo*inbrec+6 )
-         CALL write4( numwri, avt , nstepo*inbrec+7 )
-         CALL write4( numwri, zsel, nstepo*inbrec+8 )
-         
-         IF(lwp) WRITE(numout,*)
-         IF(lwp) WRITE(numout,*) ' **** write in numwri ',kt
-         IF(lwp) WRITE(numout,*) '    instantaneous fields'
-         nstepo = nstepo+1
-      ENDIF
-      
-   END SUBROUTINE dia_wri
Index: trunk/NEMO/OPA_SRC/DOM/domain.F90
===================================================================
--- trunk/NEMO/OPA_SRC/DOM/domain.F90	(revision 238)
+++ trunk/NEMO/OPA_SRC/DOM/domain.F90	(revision 239)
@@ -153,7 +153,5 @@
       !!----------------------------------------------------------------------
       !! * Modules used
-#if ! defined key_fdir
       USE ioipsl
-#endif
       NAMELIST/namrun/ no    , cexper   , ln_rstart , nrstdt , nit000,         &
          &             nitend, ndate0   , nleapy   , ninist , nstock,          &
@@ -216,6 +214,4 @@
       ENDIF
 
-#if ! defined key_fdir
-
       SELECT CASE ( nleapy )   ! Choose calendar for IOIPSL
       CASE (  1 ) 
@@ -229,5 +225,4 @@
          IF(lwp) WRITE(numout,*) '           The IOIPSL calendar is "360d", i.e. 360 days in a year'
       END SELECT
-#endif
 
       SELECT CASE ( nleapy )   ! year=raajj*days day=rjjhh*hours hour=rhhmm*minutes etc ...
Index: trunk/NEMO/OPA_SRC/DOM/domhgr.F90
===================================================================
--- trunk/NEMO/OPA_SRC/DOM/domhgr.F90	(revision 238)
+++ trunk/NEMO/OPA_SRC/DOM/domhgr.F90	(revision 239)
@@ -8,5 +8,4 @@
    !!   dom_hgr        : initialize the horizontal mesh 
    !!   hgr_read       : read "coordinate" NetCDF file 
-   !!   hgr_read_fdir  : read "coordinate" direct access file 
    !!----------------------------------------------------------------------
    !! * Modules used
@@ -130,9 +129,6 @@
          IF(lwp) WRITE(numout,*)
          IF(lwp) WRITE(numout,*) '          curvilinear coordinate on the sphere read in "coordinate" file'
-#if defined key_fdir
-         CALL hgr_read_fdir      ! 'key_fdir'       :   direct access file
-#else
+
          CALL hgr_read           ! Defaultl option  :   NetCDF file
-#endif
 
          !                                                ! =====================
@@ -644,286 +640,4 @@
    END SUBROUTINE hgr_read
 
-
-   SUBROUTINE hgr_read_fdir
-      !!----------------------------------------------------------------------
-      !!                 ***  ROUTINE hgr_read_fdir  ***
-      !!
-      !!----------------------------------------------------------------------
-      !! * Local declarations
-      CHARACTER (len=5) ::   clfield
-      CHARACTER(len=21) ::   clname = 'coordinates'
-      INTEGER ::   ji, jj         ! dummy loop indices
-      INTEGER ::   inumcoo = 11   ! logical unit for coordinate file
-      INTEGER ::   ijpi, ijpj     ! temporary integers
-      REAL(wp), DIMENSION(jpi,jpj) ::   zdta   ! temporary workspace
-      !!----------------------------------------------------------------------
-
-
-      ! 1. Read of the grid coordinates and scale factors
-      ! -------------------------------------------------
-
-      IF(lwp) THEN
-         WRITE(numout,*)
-         WRITE(numout,*) 'hgrcoo : read the horizontal coordinates'
-         WRITE(numout,*) '~~~~~~'
-         WRITE(numout,*) '         jpiglo jpjglo jpk : ', jpiglo, jpjglo, jpk
-      ENDIF
-
-      ! open the file
-          CALL ctlopn( inumcoo, clname, 'OLD', 'UNFORMATTED', 'SEQUENTIAL',   &
-                       1      , numout       , lwp  , 1                            )
-
-      ! read the file
-      READ(inumcoo) ijpi,ijpj
-      IF( (ijpi /= jpidta) .OR. (ijpj /= jpjdta) ) THEN
-         IF(lwp) THEN
-            WRITE(numout,*)
-            WRITE(numout,*) '         inconsitency in reading coordinate file, unit=',inumcoo
-            WRITE(numout,*) '            jpidta = ',jpidta  ,' jpi  read = ',ijpi
-            WRITE(numout,*) '            jpjdta = ',jpjdta  ,' jpj  read = ',ijpj
-            WRITE(numout,*)
-         ENDIF
-         nstop = nstop + 1
-      ENDIF
-
-      READ(inumcoo) clfield, zdta
-      IF( clfield /= 'GLAMT' ) THEN
-         IF(lwp) THEN
-            WRITE(numout,cform_err)
-            WRITE(numout,*) 'hgrcoo: bad read',clfield,' GLAMT'
-         ENDIF
-         nstop = nstop + 1
-      ENDIF
-      DO jj = 1, nlcj
-         DO ji = 1, nlci
-            glamt(ji,jj) = zdta(mig(ji),mjg(jj))
-         END DO
-      END DO
-      READ(inumcoo) clfield, zdta
-      IF(clfield /= 'GLAMU') THEN
-         IF(lwp) THEN
-            WRITE(numout,cform_err)
-            WRITE(numout,*) 'hgrcoo: bad read',clfield,' GLAMU'
-         ENDIF
-         nstop = nstop + 1
-      ENDIF
-      DO jj = 1, nlcj
-         DO ji = 1, nlci
-            glamu(ji,jj) = zdta(mig(ji),mjg(jj))                    
-         END DO
-      END DO
-      READ(inumcoo) clfield, zdta
-      IF(clfield /= 'GLAMV') THEN
-         IF(lwp) THEN
-            WRITE(numout,cform_err)
-            WRITE(numout,*) 'hgrcoo: bad read',clfield,' GLAMV'
-         ENDIF
-         nstop = nstop + 1
-      ENDIF
-      DO jj = 1, nlcj
-         DO ji = 1, nlci
-            glamv(ji,jj) = zdta(mig(ji),mjg(jj))                    
-         END DO
-      END DO
-      READ(inumcoo) clfield, zdta
-      IF(clfield /= 'GLAMF') THEN
-         IF(lwp) THEN
-            WRITE(numout,cform_err)
-            WRITE(numout,*) 'hgrcoo: bad read',clfield,' GLAMF'
-         ENDIF
-         nstop = nstop + 1
-      ENDIF
-      DO jj = 1, nlcj
-         DO ji = 1, nlci
-            glamf(ji,jj) = zdta(mig(ji),mjg(jj))                    
-         END DO
-      END DO
-      READ(inumcoo) clfield, zdta
-      IF(clfield /= 'GPHIT') THEN
-         IF(lwp) THEN
-            WRITE(numout,cform_err)
-            WRITE(numout,*) 'hgrcoo: bad read',clfield,' GPHIT'
-         ENDIF
-         nstop = nstop + 1
-      ENDIF
-      DO jj = 1, nlcj
-         DO ji = 1, nlci
-            gphit(ji,jj) = zdta(mig(ji),mjg(jj))                    
-         END DO
-      END DO
-      READ(inumcoo) clfield, zdta
-      IF(clfield /= 'GPHIU') THEN
-         IF(lwp) THEN
-            WRITE(numout,cform_err)
-            WRITE(numout,*) 'hgrcoo: bad read',clfield,' GPHIU'
-         ENDIF
-         nstop = nstop + 1
-      ENDIF
-      DO jj = 1, nlcj
-         DO ji = 1, nlci
-            gphiu(ji,jj) = zdta(mig(ji),mjg(jj))                    
-         END DO
-      END DO
-      READ(inumcoo) clfield, zdta
-      IF(clfield /= 'GPHIV') THEN
-         IF(lwp) THEN
-            WRITE(numout,cform_err)
-            WRITE(numout,*) 'hgrcoo: bad read',clfield,' GPHIV'
-         ENDIF
-         nstop = nstop + 1
-      ENDIF
-      DO jj = 1, nlcj
-         DO ji = 1, nlci
-            gphiv(ji,jj) = zdta(mig(ji),mjg(jj))                    
-         END DO
-      END DO
-      READ(inumcoo) clfield, zdta
-      IF(clfield /= 'GPHIF') THEN
-         IF(lwp) THEN
-            WRITE(numout,cform_err)
-            WRITE(numout,*) 'hgrcoo: bad read',clfield,' GPHIF'
-         ENDIF
-         nstop = nstop + 1
-      ENDIF
-      DO jj = 1, nlcj
-         DO ji = 1, nlci
-            gphif(ji,jj) = zdta(mig(ji),mjg(jj))                    
-         END DO
-      END DO
-      READ(inumcoo) clfield, zdta
-      IF(clfield /= 'E1T  ') THEN
-         IF(lwp) THEN
-            WRITE(numout,cform_err)
-            WRITE(numout,*) 'hgrcoo: bad read',clfield,' E1T  '
-         ENDIF
-         nstop = nstop + 1
-      ENDIF
-      DO jj = 1, nlcj
-         DO ji = 1, nlci
-            e1t  (ji,jj) = zdta(mig(ji),mjg(jj))                    
-         END DO
-      END DO
-      READ(inumcoo) clfield, zdta
-      IF(clfield /= 'E1U  ') THEN
-         IF(lwp) THEN
-            WRITE(numout,cform_err)
-            WRITE(numout,*) 'hgrcoo: bad read',clfield,' E1U  '
-         ENDIF
-         nstop = nstop + 1
-      ENDIF
-      DO jj = 1, nlcj
-         DO ji = 1, nlci
-            e1u  (ji,jj) = zdta(mig(ji),mjg(jj))                    
-         END DO
-      END DO
-      READ(inumcoo) clfield, zdta
-      IF(clfield /= 'E1V  ') THEN
-         IF(lwp) THEN
-            WRITE(numout,cform_err)
-            WRITE(numout,*) 'hgrcoo: bad read',clfield,' E1V  '
-         ENDIF
-         nstop = nstop + 1
-      ENDIF
-      DO jj = 1, nlcj
-         DO ji = 1, nlci
-            e1v  (ji,jj) = zdta(mig(ji),mjg(jj))                    
-         END DO
-      END DO
-      READ(inumcoo) clfield, zdta
-      IF(clfield /= 'E1F  ') THEN
-         IF(lwp) THEN
-            WRITE(numout,cform_err)
-            WRITE(numout,*) 'hgrcoo: bad read',clfield,' E1F  '
-         ENDIF
-         nstop = nstop + 1
-      ENDIF
-      DO jj = 1, nlcj
-         DO ji = 1, nlci
-            e1f  (ji,jj) = zdta(mig(ji),mjg(jj))                    
-         END DO
-      END DO
-      READ(inumcoo) clfield, zdta
-      IF(clfield /= 'E2T  ') THEN
-         IF(lwp) THEN
-            WRITE(numout,cform_err)
-            WRITE(numout,*) 'hgrcoo: bad read',clfield,' E2T  '
-         ENDIF
-         nstop = nstop + 1
-      ENDIF
-      DO jj = 1, nlcj
-         DO ji = 1, nlci
-            e2t  (ji,jj) = zdta(mig(ji),mjg(jj))                    
-         END DO
-      END DO
-      READ(inumcoo) clfield, zdta
-      IF(clfield /= 'E2U  ') THEN
-         IF(lwp) THEN
-            WRITE(numout,cform_err)
-            WRITE(numout,*) 'hgrcoo: bad read',clfield,' E2U  '
-         ENDIF
-         nstop = nstop + 1
-      ENDIF
-      DO jj = 1, nlcj
-         DO ji = 1, nlci
-            e2u  (ji,jj) = zdta(mig(ji),mjg(jj))                    
-         END DO
-      END DO
-      READ(inumcoo) clfield, zdta
-      IF(clfield /= 'E2V  ') THEN
-         IF(lwp) THEN
-            WRITE(numout,cform_err)
-            WRITE(numout,*) 'hgrcoo: bad read',clfield,' E2V  '
-         ENDIF
-         nstop = nstop + 1
-      ENDIF
-      DO jj = 1, nlcj
-         DO ji = 1, nlci
-            e2v  (ji,jj) = zdta(mig(ji),mjg(jj))                    
-         END DO
-      END DO
-      READ(inumcoo) clfield, zdta
-      IF(clfield /= 'E2F  ') THEN
-         IF(lwp) THEN
-            WRITE(numout,cform_err)
-            WRITE(numout,*) 'hgrcoo: bad read',clfield,' E2F  '
-         ENDIF
-         nstop = nstop + 1
-      ENDIF
-      DO jj = 1, nlcj
-         DO ji = 1, nlci
-            e2f  (ji,jj) = zdta(mig(ji),mjg(jj))                    
-         END DO
-      END DO
-
-      CLOSE( inumcoo )
-
-      ! set extra rows add in mpp to none zero values
-      DO jj = nlcj+1, jpj
-         DO ji = 1, nlci
-            glamt(ji,jj) = glamt(ji,1)   ;   gphit(ji,jj) = gphit(ji,1)
-            glamu(ji,jj) = glamu(ji,1)   ;   gphiu(ji,jj) = gphiu(ji,1)
-            glamv(ji,jj) = glamv(ji,1)   ;   gphiv(ji,jj) = gphiv(ji,1)
-            glamf(ji,jj) = glamf(ji,1)   ;   gphif(ji,jj) = gphif(ji,1)
-            e1t  (ji,jj) = e1t  (ji,1)   ;   e2t  (ji,jj) = e2t  (ji,1)
-            e1u  (ji,jj) = e1u  (ji,1)   ;   e2u  (ji,jj) = e2u  (ji,1)
-            e1v  (ji,jj) = e1v  (ji,1)   ;   e2v  (ji,jj) = e2v  (ji,1)
-            e1f  (ji,jj) = e1f  (ji,1)   ;   e2f  (ji,jj) = e2f  (ji,1)
-         END DO
-      END DO
-
-      ! set extra columns add in mpp to none zero values
-      DO ji = nlci+1, jpi
-         glamt(ji,:) = glamt(1,:)   ;   gphit(ji,:) = gphit(1,:)
-         glamu(ji,:) = glamu(1,:)   ;   gphiu(ji,:) = gphiu(1,:)
-         glamv(ji,:) = glamv(1,:)   ;   gphiv(ji,:) = gphiv(1,:)
-         glamf(ji,:) = glamf(1,:)   ;   gphif(ji,:) = gphif(1,:)
-         e1t  (ji,:) = e1t  (1,:)   ;   e2t  (ji,:) = e2t  (1,:)
-         e1u  (ji,:) = e1u  (1,:)   ;   e2u  (ji,:) = e2u  (1,:)
-         e1v  (ji,:) = e1v  (1,:)   ;   e2v  (ji,:) = e2v  (1,:)
-         e1f  (ji,:) = e1f  (1,:)   ;   e2f  (ji,:) = e2f  (1,:)
-      END DO
-
-   END SUBROUTINE hgr_read_fdir
-
    !!======================================================================
 END MODULE domhgr
Index: trunk/NEMO/OPA_SRC/DOM/domwri.F90
===================================================================
--- trunk/NEMO/OPA_SRC/DOM/domwri.F90	(revision 238)
+++ trunk/NEMO/OPA_SRC/DOM/domwri.F90	(revision 239)
@@ -26,11 +26,5 @@
 CONTAINS
 
-#if defined key_fdir
-   !!----------------------------------------------------------------------
-   !!   'key_fdir' :                                     direct access file
-   !!----------------------------------------------------------------------
-#  include "domwri_fdir.h90"
-
-#elif ( defined key_mpp_mpi || defined key_mpp_shmem ) && defined key_dimgout
+#if ( defined key_mpp_mpi || defined key_mpp_shmem ) && defined key_dimgout
    !!----------------------------------------------------------------------
    !!   'key_mpp_mpi'     OR
@@ -41,5 +35,4 @@
    !!----------------------------------------------------------------------
 #  include "domwri_dimg.h90"
-
 
 #else
Index: trunk/NEMO/OPA_SRC/DOM/domwri_fdir.h90
===================================================================
--- trunk/NEMO/OPA_SRC/DOM/domwri_fdir.h90	(revision 238)
+++ 	(revision )
@@ -1,95 +1,0 @@
-   !!----------------------------------------------------------------------
-   !!                     ***  domwri_fdir.h90  ***
-   !!----------------------------------------------------------------------
-   !!   OPA 9.0 , LODYC-IPSL  (2003)
-   !!----------------------------------------------------------------------
-
-   SUBROUTINE dom_wri
-      !!---------------------------------------------------------------------
-      !!                  ***  ROUTINE dom_wri  ***
-      !!                   
-      !! ** Purpose :   Create a direct access file named meshmask
-      !!        This file contains all ocean domain informations (mesh and
-      !!      mask arrays). It is used for visualisation (SAXO software)
-      !!      and diagnostic computation.
-      !!        Caution, this file is not assigned so that diagnostics can
-      !!      be computed with a 64 bits precision.
-      !!
-      !! History :
-      !!   8.5  !  02-08  (G. Madec)  F90: Free form and module
-      !!----------------------------------------------------------------------
-      !! * Local declarations
-      CHARACTER (len=5) ::   clfield  ! field name
-      INTEGER ::   inum = 11          ! logical unit used for meshmask file
-      !!----------------------------------------------------------------------
-
-       IF(lwp) WRITE(numout,*)
-       IF(lwp) WRITE(numout,*) 'dom_wri : create a direct acces mesh_mask file'
-       IF(lwp) WRITE(numout,*) '~~~~~~~'
-
-       ! open meshmask file
-       CALL ctlopn( inum, 'mesh_mask','UNKNOWN', 'UNFORMATTED', 'SEQUENTIAL',   &
-                    1 , numout, lwp, 1 )
-
-
-      ! 0. Domain size
-      ! --------------
-      WRITE(inum) jpiglo, jpjglo, jpk
-
-
-      ! 1. Horzontal grid-point position
-      ! --------------------------------
-      clfield='GLAMT'   ;    WRITE(inum) clfield, glamt
-      clfield='GLAMU'   ;    WRITE(inum) clfield, glamu
-      clfield='GLAMV'   ;    WRITE(inum) clfield, glamv
-      clfield='GLAMF'   ;    WRITE(inum) clfield, glamf
-
-      clfield='GPHIT'   ;    WRITE(inum) clfield, gphit
-      clfield='GPHIU'   ;    WRITE(inum) clfield, gphiu
-      clfield='GPHIV'   ;    WRITE(inum) clfield, gphiv
-      clfield='GPHIF'   ;    WRITE(inum) clfield, gphif
-
-
-      ! 2. Horizontal scale factors
-      ! ---------------------------
-      clfield='E1T  '   ;    WRITE(inum) clfield, e1t
-      clfield='E1U  '   ;    WRITE(inum) clfield, e1u
-      clfield='E1V  '   ;    WRITE(inum) clfield, e1v
-      clfield='E1F  '   ;    WRITE(inum) clfield, e1f
-
-      clfield='E2T  '   ;    WRITE(inum) clfield, e2t
-      clfield='E2U  '   ;    WRITE(inum) clfield, e2u
-      clfield='E2V  '   ;    WRITE(inum) clfield, e2v
-      clfield='E2F  '   ;    WRITE(inum) clfield, e2f
-
-
-      ! 3. masks
-      ! --------
-      clfield='TMASK'   ;    WRITE(inum) clfield, tmask
-      clfield='UMASK'   ;    WRITE(inum) clfield, umask
-      clfield='VMASK'   ;    WRITE(inum) clfield, vmask
-      clfield='FMASK'   ;    WRITE(inum) clfield, fmask
-      clfield='FF   '   ;    WRITE(inum) clfield, ff
-
-      ! 4. depth and vertical scale factors
-      ! -----------------------------------
-#if defined key_s_coord
-      clfield='HBATT'   ;    WRITE(inum) clfield, hbatt
-      clfield='HBATU'   ;    WRITE(inum) clfield, hbatu
-      clfield='HBATV'   ;    WRITE(inum) clfield, hbatv
-      clfield='HBATF'   ;    WRITE(inum) clfield, hbatf
-      clfield='GSIGT'   ;    WRITE(inum) clfield, gsigt
-      clfield='GSIGW'   ;    WRITE(inum) clfield, gsigw
-      clfield='GSI3W'   ;    WRITE(inum) clfield, gsi3w
-      clfield='ESIGT'   ;    WRITE(inum) clfield, esigt
-      clfield='ESIGW'   ;    WRITE(inum) clfield, esigw
-#else
-      clfield='GDEPT'   ;    WRITE(inum) clfield, gdept
-      clfield='GDEPW'   ;    WRITE(inum) clfield, gdepw
-      clfield='E3T  '   ;    WRITE(inum) clfield, e3t
-      clfield='E3W  '   ;    WRITE(inum) clfield,  e3w
-#endif
-
-      CLOSE( inum )
-
-   END SUBROUTINE dom_wri
Index: trunk/NEMO/OPA_SRC/DTA/dtasal.F90
===================================================================
--- trunk/NEMO/OPA_SRC/DTA/dtasal.F90	(revision 238)
+++ trunk/NEMO/OPA_SRC/DTA/dtasal.F90	(revision 239)
@@ -43,10 +43,4 @@
 CONTAINS
 
-# if defined key_fdir
-   !!----------------------------------------------------------------------
-   !!   'key_fdir'                                       direct access file
-   !!----------------------------------------------------------------------
-#     include "dtasal_fdir.h90"
-# else
    !!----------------------------------------------------------------------
    !!   Default option:                                         NetCDF file
@@ -291,6 +285,4 @@
    END SUBROUTINE dta_sal
 
-# endif
-
 #else
    !!----------------------------------------------------------------------
Index: trunk/NEMO/OPA_SRC/DTA/dtasal_fdir.h90
===================================================================
--- trunk/NEMO/OPA_SRC/DTA/dtasal_fdir.h90	(revision 238)
+++ 	(revision )
@@ -1,156 +1,0 @@
-   !!----------------------------------------------------------------------
-   !!                   ***  dtasal_fdir  ***
-   !!----------------------------------------------------------------------
-   !!   dta_sal   : read monthly salinity data in direct access file
-   !!----------------------------------------------------------------------
-   !!   OPA 9.0 , LODYC-IPSL  (2003)
-   !!----------------------------------------------------------------------
-
-   SUBROUTINE dta_sal( kt )
-      !!----------------------------------------------------------------------
-      !!                   ***  ROUTINE dta_sal  ***
-      !!                    
-      !! ** Purpose :   Reads monthly salinity data 
-      !!                             
-      !! ** Method  :   Direct acces file case
-      !!     Read on unit numsdt the interpolated Levitus salinity onto
-      !!     the global grid.
-      !!     The value is centered at the middle of month.
-      !!     At each time step, a linear interpolation is applied between
-      !!     two monthly values.
-      !!
-      !! History :
-      !!        !  91-03  ()  Original code
-      !!        !  92-07  (M. Imbard)
-      !!   8.5  !  02-06  (G. Madec)  F90: Free form and module
-      !!----------------------------------------------------------------------
-      !! * Arguments
-      INTEGER, INTENT(in) ::   kt             ! ocean time step
-
-      !! * Local declarations
-      INTEGER ,PARAMETER :: jpmois= 12   &  ! number on month in file
-            &              ,jpf   = 1       ! number of fields
-      INTEGER :: ji,jj,jk,jl,ios, ik
-      INTEGER :: imois,iman
-      INTEGER :: iimlu,ijmlu,ikmlu,ilmlu,immlu
-      INTEGER :: i15, ibloc, ilindta
-      REAL(wp) ::  zxy, zl
-      CHARACTER (len=20) ::   cltit
-      !!----------------------------------------------------------------------
-
-
-      ! 0. Initialization
-      ! -----------------
-
-      iman  = jpmois
-      i15 = nday/16
-
-      imois = nmonth + i15 - 1
-      IF( imois == 0 ) imois = iman
-
-
-      ! 1. First call kt=nit000
-      ! -----------------------
-
-      IF( kt == nit000 .AND. nlecsa == 0 ) THEN
-         ! open sal.dta file
-         ibloc = 4096
-         ilindta = ibloc*((jpidta*jpjdta*jpbytda-1 )/ibloc+1)
-         CALL ctlopn(numsdt,'data_1m_salinity_nomask','OLD', 'UNFORMATTED', 'DIRECT',   &
-                     ilindta,numout,lwp,1)
-         nsal1 = 0
-         IF(lwp) THEN
-            WRITE(numout,*)
-            WRITE(numout,*) 'dta_sal : read monthly salinity in direct acces file in unit= ', numsdt
-            WRITE(numout,*) '~~~~~~~ '
-            WRITE(numout,*)
-         ENDIF
-
-         ! 1.2 Read first records
-         
-         ! title, dimensions and tests
-
-         READ (numsdt,REC=1,IOSTAT=ios) cltit, iimlu, ijmlu, ikmlu,   &
-                                        ilmlu, immlu
-         IF( ios /= 0 ) THEN
-            IF(lwp) WRITE(numout,*) 'e r r o r read numsdt ',ios
-            STOP 'dtasal'
-         ELSE
-            IF ( iimlu /= jpidta ) STOP 4050
-            IF ( ijmlu /= jpjdta ) STOP 4060
-            IF ( ikmlu /= jpk    ) STOP 4070
-            IF ( ilmlu /= jpmois ) STOP 4080
-            IF ( immlu /= jpf    ) STOP 4090
-            IF(lwp) WRITE(numout,*) 'nb of points in the 5 directions '
-            IF(lwp) WRITE(numout,*) iimlu, ijmlu, ikmlu, ilmlu, immlu
-         ENDIF
-
-      ENDIF
-
-
-      ! 2. Read monthly file
-      ! -------------------
-
-      IF( ( kt == nit000 .AND. nlecsa == 0 ) .OR. imois /= nsal1 ) THEN
-         nlecsa = 1
-
-         ! 2.1 Calendar computation
-
-         nsal1 = imois        ! first file record used 
-         nsal2 = nsal1 + 1    ! last  file record used
-         nsal1 = MOD( nsal1, iman )
-         IF( nsal1 == 0 ) nsal1 = iman
-         nsal2 = MOD( nsal2, iman )
-         IF( nsal2 == 0 ) nsal2 = iman
-         IF(lwp) WRITE(numout,*) 'first record file used nsal1 ', nsal1
-         IF(lwp) WRITE(numout,*) 'last  record file used nsal2 ', nsal2
-
-         ! 2.3 Read monthly salinity data Levitus 
-
-         CALL read3d(numsdt,saldta(1,1,1,1),nsal1+1)
-         CALL read3d(numsdt,saldta(1,1,1,2),nsal2+1)
-         
-         IF(lwp) THEN
-            WRITE(numout,*)
-            WRITE(numout,*) ' read Levitus salinity ok'
-            WRITE(numout,*)
-         ENDIF
-
-         ! 2.4 Masks
-
-         DO jl = 1, 2
-            saldta(:,:,:,jl) = saldta(:,:,:,jl)*tmask(:,:,:)
-            saldta(:,:,jpk,jl) = 0.
-            IF( lk_zps ) THEN                   ! z-coordinate with partial steps
-               DO jj = 1, jpj                           ! interpolation of salinity at the last ocean level (i.e. the partial step)
-                  DO ji = 1, jpi
-                     ik = mbathy(ji,jj) - 1
-                     IF( ik > 2 ) THEN
-                        zl = ( gdept(ik) - fsdept(ji,jj,ik) ) / ( gdept(ik) - gdept(ik-1) )
-                        saldta(ji,jj,ik,jl) = (1.-zl) * saldta(ji,jj,ik,jl) +zl * saldta(ji,jj,ik-1,jl)
-                     ENDIF
-                  END DO
-               END DO
-            ENDIF
-         END DO
-
-         IF(lwp) THEN
-            WRITE(numout,*)' salinity Levitus month ',nsal1,nsal2
-            WRITE(numout,*)
-            WRITE(numout,*) ' Levitus mounth = ',nsal1,'  level = 1'
-            CALL prihre(saldta(1,1,1,1),jpi,jpj,1,jpi,20,1,jpj,20,1.,numout)
-            WRITE(numout,*) ' Levitus mounth = ',nsal1,'  level = ',jpk/2
-            CALL prihre(saldta(1,1,jpk/2,1),jpi,jpj,1,jpi,20,1,jpj,20,1.,numout)
-            WRITE(numout,*) ' Levitus mounth = ',nsal1,'  level = ',jpkm1
-            CALL prihre(saldta(1,1,jpkm1,1),jpi,jpj,1,jpi,20,1,jpj,20,1.,numout)
-         ENDIF
-      ENDIF
-
-
-      ! 3. At every time step compute salinity data
-      ! ----------------------------------------------
-
-      zxy = FLOAT(nday + 15 - 30*i15)/30.
-      sdta(:,:,:)= ( (1.-zxy)*saldta(:,:,:,1) + zxy*saldta(:,:,:,2) )
-
-   END SUBROUTINE dta_sal
Index: trunk/NEMO/OPA_SRC/DTA/dtatem.F90
===================================================================
--- trunk/NEMO/OPA_SRC/DTA/dtatem.F90	(revision 238)
+++ trunk/NEMO/OPA_SRC/DTA/dtatem.F90	(revision 239)
@@ -45,11 +45,4 @@
 CONTAINS
 
-# if defined key_fdir
-   !!----------------------------------------------------------------------
-   !!   'key_fdir'                                       direct access file
-   !!----------------------------------------------------------------------
-#  include "dtatem_fdir.h90"
-
-# else
    !!----------------------------------------------------------------------
    !!   Default case                                            NetCDF file
@@ -284,6 +277,4 @@
    END SUBROUTINE dta_tem
 
-# endif
-
 #else
    !!----------------------------------------------------------------------
Index: trunk/NEMO/OPA_SRC/DTA/dtatem_fdir.h90
===================================================================
--- trunk/NEMO/OPA_SRC/DTA/dtatem_fdir.h90	(revision 238)
+++ 	(revision )
@@ -1,153 +1,0 @@
-   SUBROUTINE dtatem ( kt )
-      !!----------------------------------------------------------------------
-      !!                  ***  ROUTINE dtatem  ***
-      !!                     
-      !! ** Purpose :   Reads temperature data (Levitus monthly data)
-      !!
-      !! ** Method  :   Read on unit numtdt the interpolated Levitus 
-      !!      temperature onto the global grid.
-      !!      Data begin at january.
-      !!      The value is centered at the middle of month.
-      !!      In the opa model, kt=1 agree with january 1.
-      !!      At each time step, a linear interpolation is applied between
-      !!      two monthly values.
-      !!      Read on unit numtdt
-      !!
-      !! ** Action :
-      !!      define t_dta array at time-step kt
-      !!
-      !! References :
-      !!      Sydney Levitus, climatological atlas of the world ocean
-      !!      NOAA professional paper 13, december 1982
-      !!
-      !! History :
-      !!        !  91-03  ()  Original code
-      !!        !  92-07  (M. Imbard)
-      !!        !  99-10  (M.A. Foujols, M. Imbard)  NetCDF FORMAT
-      !!   8.5  !  02-09  (G. Madec)  F90: Free form and module
-      !!----------------------------------------------------------------------
-      !! * Arguments
-      INTEGER, INTENT( in ) ::   kt         ! ocean time-step
-
-      !! * Local declarations
-      INTEGER, PARAMETER ::   jpmois=12, jpf=1
-      INTEGER ::   ji, jj, jl, ios, ik
-      INTEGER ::   ibloc, ilindta
-      INTEGER ::   imois, iman
-      INTEGER ::   iimlu, ijmlu, ikmlu, ilmlu, immlu
-      INTEGER ::   i15
-      REAL(wp) ::   zxy, zl
-      CHARACTER (len=20) ::   cltit
-      !!----------------------------------------------------------------------
-
-
-      ! 0. Initialization
-      ! -----------------
-
-      iman  = jpmois
-      i15 = nday/16
-      imois = nmonth + i15 - 1
-      IF( imois == 0 ) imois = iman
-
-
-      ! 1. First call kt=nit000
-      ! -----------------------
-
-      IF( kt == nit000 .AND. nlecte == 0 ) THEN
-         ! open temp.dta file
-         ibloc = 4096
-         ilindta = ibloc*((jpidta*jpjdta*jpbytda-1 )/ibloc+1)
-         CALL ctlopn(numtdt,'data_1m_potiential_temperature_nomask','OLD', 'UNFORMATTED', 'DIRECT',   &
-                     ilindta,numout,lwp,1)
-         ntem1 = 0
-         IF(lwp) WRITE(numout,*)
-         IF(lwp) WRITE(numout,*) 'dta_tem : read monthly temperature in direct acces file'
-         IF(lwp) WRITE(numout,*) '~~~~~~~'
-         IF(lwp) WRITE(numout,*)
-
-         ! 1.2 Read first records
-
-         ! title, dimensions and tests
-
-         READ( numtdt, REC=1, IOSTAT=ios ) cltit, iimlu, ijmlu, ikmlu,   &
-                                           ilmlu, immlu
-         IF( ios /= 0 ) THEN
-            IF(lwp) WRITE(numout,*) 'e r r o r read numtdt ', ios
-            STOP 'dtatem'
-         ELSE
-            IF ( iimlu /= jpidta ) STOP 4050
-            IF ( ijmlu /= jpjdta ) STOP 4060
-            IF ( ikmlu /= jpk    ) STOP 4070
-            IF ( ilmlu /= jpmois ) STOP 4080
-            IF ( immlu /= jpf    ) STOP 4090
-            IF(lwp) WRITE(numout,*) 'nb of points in the 5 directions '
-            IF(lwp) WRITE(numout,*) iimlu, ijmlu, ikmlu, ilmlu, immlu
-         ENDIF
-
-      ENDIF
-
-
-      ! 2. Read monthly file
-      ! -------------------
-
-      IF( ( kt == nit000 .AND. nlecte == 0 ) .OR. imois /= ntem1 ) THEN
-         nlecte = 1
-
-         ! 2.1 Calendar computation
-         
-         ntem1 = imois        ! first file record used 
-         ntem2 = ntem1 + 1    ! last  file record used
-         ntem1 = MOD( ntem1, iman )
-         IF( ntem1 == 0 )   ntem1 = iman
-         ntem2 = MOD( ntem2, iman )
-         IF( ntem2 == 0 )   ntem2 = iman
-         IF(lwp) WRITE(numout,*) 'first record file used ntem1 ', ntem1
-         IF(lwp) WRITE(numout,*) 'last  record file used ntem2 ', ntem2
-         
-         ! 2.3 Read monthly temperature data Levitus 
-
-         CALL read3d( numtdt, temdta(1,1,1,1), ntem1+1 )
-         CALL read3d( numtdt, temdta(1,1,1,2), ntem2+1 )
-         
-         IF(lwp) WRITE(numout,*)
-         IF(lwp) WRITE(numout,*) ' read Levitus temperature ok'
-         IF(lwp) WRITE(numout,*)
-         
-         ! 2.4 Masks
-
-         DO jl = 1, 2
-            temdta(:,:,:,jl) = temdta(:,:,:,jl) * tmask(:,:,:)
-            temdta(:,:,jpk,jl) = 0.
-            IF( lk_zps ) THEN                ! z-coord. with partial steps
-               DO jj = 1, jpj                     ! interpolation of temperature at the last level
-                  DO ji = 1, jpi
-                     ik = mbathy(ji,jj) - 1
-                     IF ( ik > 2 ) THEN
-                        zl = ( gdept(ik) - fsgdept(ji,jj,ik) ) / ( gdept(ik) - gdept(ik-1) )
-                        temdta(ji,jj,ik,jl) = (1.-zl) * temdta(ji,jj,ik,jl) +zl * temdta(ji,jj,ik-1,jl
-                     ENDIF
-                  END DO
-               END DO
-            ENDIF
-         END DO
-
-         IF(lwp) THEN
-            WRITE(numout,*) 'temperature Levitus month ', ntem1, ntem2
-            WRITE(numout,*)
-            WRITE(numout,*) ' Levitus mounth = ', ntem1, '  level = 1'
-            CALL prihre( temdta(1,1,1,1), jpi, jpj, 1, jpi, 20, 1, jpj, 20, 1., numout )
-            WRITE(numout,*) ' Levitus mounth = ', ntem1, '  level = ', jpk/2
-            CALL prihre( temdta(1,1,jpk/2,1), jpi, jpj, 1, jpi, 20, 1, jpj, 20, 1., numout )
-            WRITE(numout,*) ' Levitus mounth = ',ntem1,'  level = ', jpkm1
-            CALL prihre( temdta(1,1,jpkm1,1), jpi, jpj, 1, jpi, 20, 1, jpj, 20, 1., numout )
-         ENDIF
-      ENDIF
-
- 
-      ! 2. At every time step compute temperature data
-      ! ----------------------------------------------
-
-      zxy = FLOAT( nday + 15 - 30 * i15 ) / 30.
-      t_dta(:,:,:) = (1.-zxy) * temdta(:,:,:,1) + zxy * temdta(:,:,:,2)
-
-   END SUBROUTINE dta_tem
Index: trunk/NEMO/OPA_SRC/SBC/flx_bulk_monthly_fdir.h90
===================================================================
--- trunk/NEMO/OPA_SRC/SBC/flx_bulk_monthly_fdir.h90	(revision 238)
+++ 	(revision )
@@ -1,282 +1,0 @@
-   !!----------------------------------------------------------------------
-   !!                 ***  flx_bulk_monthly_fdir.h90  ***
-   !!----------------------------------------------------------------------
-
-   !!----------------------------------------------------------------------
-   !!   flx          : define the thermohaline fluxes for the ocean using
-   !!                  bulk formulea and monthly mean fields read in direct
-   !!                  access files.
-   !!----------------------------------------------------------------------
-   !! * Modules used     C A U T I O N  already defined in flxmod.F90
-
-   !! * Module variables
-   INTEGER ::          &
-      numfl1, numfl2,  &  ! logical units for surface fluxes data
-      numfl3, numfl4,  &  !
-      numfl5,          &  !
-      nflx1, nflx2,    &  !  first and second record used
-      nflx11, nflx12      ! ???
-   REAL(wp), DIMENSION(jpi,jpj,2,7) ::   &
-      flxdta              ! 2 consecutive set of CLIO monthly fluxes
-   !!----------------------------------------------------------------------
-   !!   OPA 9.0 , LODYC-IPSL  (2003)
-   !!----------------------------------------------------------------------
-
-CONTAINS
-
-   SUBROUTINE flx( kt )
-      !!---------------------------------------------------------------------
-      !!                    ***  ROUTINE flx  ***
-      !!                  
-      !! ** Purpose :   provide the thermohaline fluxes (heat and freshwater)
-      !!      to the ocean at each time step.
-      !!
-      !! ** Method  :   bulk formulae with monthly mean fields read in direct
-      !!      access file
-      !!
-      !! ** Method :
-      !!
-      !! History :
-      !!   8.5  !  02-09  (G. Madec)  F90: Free form and module
-      !!----------------------------------------------------------------------
-      !! * Modules used
-      USE bulk
-
-      !! * arguments
-      INTEGER, INTENT( in  ) ::   kt ! ocean time step
-
-      !! * Local declarations
-      INTEGER, PARAMETER ::   jpnk=1, jpmois=12, jpf=7
-      INTEGER ::   ji, jj, jm, ios, jt
-      INTEGER ::   iimlu, ijmlu, ikmlu, ilmlu, immlu
-      INTEGER ::   imois, iman, imois2, i15
-
-      REAL(wp) ::   zpdtan,zman,zpdtmo,zdemi
-      REAL(wp) ::   zxy,zdtt,zdatet,zttbt,zttat
-      REAL(wp) ::   zdtts6
-      INTEGER  ::   ildta,ibloc,ilseq
-
-      CHARACTER (len=30) ::   cltit
-      CHARACTER (len=21) ::   clunf,clold,cldir
-      CHARACTER (len=32) ::   clname
-      !!---------------------------------------------------------------------
-
-
-      ! Initialization
-      ! --------------
-
-      ! Open specifier
-
-      clold='OLD'
-      clunf='UNFORMATTED'
-      cldir='DIRECT'
-
-      ilseq = 1
-
-      ! computation of the record length for direct access file
-      ! this length depend of 4096 (device specification)
-
-      ibloc = 4096
-      ildta = ibloc*((jpidta*jpjdta*jpbytda-1 )/ibloc+1)
-
-      zpdtan= raass/rdttra(1)
-      zman  = 12.
-      iman  = int(zman)
-      zpdtmo= zpdtan/zman
-      zdemi = zpdtmo/2.
-
-      i15 = INT( 2.* FLOAT( nday ) / ( FLOAT( nobis(nmonth) ) + 0.5 ) )
-
-      imois = nmonth + i15 - 1
-      IF( imois == 0 ) imois = iman
-      imois2 = nmonth
-      numfl2=81
-      numfl3=82
-      numfl4=83
-      numfl5=84
-
-
-      ! First call kt=nit000
-      ! --------------------
-
-      IF( kt == nit000 ) THEN
-         nflx1 = 0
-         nflx11 = 0
-         IF(lwp) WRITE(numout,*)
-         IF(lwp) WRITE(numout,*) ' **** flx '
-         IF(lwp) WRITE(numout,*)
-         IF(lwp) WRITE(numout,*) 'read global ocean fluxes '
-         IF(lwp) WRITE(numout,9100) zpdtmo,zdemi
-         IF(lwp) WRITE(numout,*)
-         IF(lwp) WRITE(numout,*) ' read global ocean monthly fields'
-         IF(lwp) WRITE(numout,*) ' --------------------------------'
-         IF(lwp) WRITE(numout,*)
-         IF(lwp) WRITE(numout,*) 'opal file numfl1 = ',numfl1
- 9100    FORMAT (' esbensen : zpdtmo,zdemi :',2f12.3)
-
-
-         ! Read first records
-
-         ! title, dimensions and tests
-         clname='humidata_clio_orca'
-         CALL ctlopn(numfl1,clname,clold,clunf,cldir,ildta,numout,lwp,1)
-         READ (numfl1,REC=1,IOSTAT=ios) cltit,iimlu,ijmlu,ikmlu,ilmlu,immlu
-         
-         clname='winddata_clio_orca'
-         CALL ctlopn(numfl2,clname,clold,clunf,cldir,ildta,numout,lwp,1)
-         READ (numfl2,REC=1,IOSTAT=ios) cltit,iimlu,ijmlu,ikmlu,ilmlu,immlu
-         
-         clname='berdata_clio_orca'
-         CALL ctlopn(numfl3,clname,clold,clunf,cldir,ildta,numout,lwp,1)
-         READ (numfl3,REC=1,IOSTAT=ios) cltit,iimlu,ijmlu,ikmlu,ilmlu,immlu
-         
-         clname='xuedata_clio_orca'
-         CALL ctlopn(numfl4,clname,clold,clunf,cldir,ildta,numout,lwp,1)
-         READ (numfl4,REC=1,IOSTAT=ios) cltit,iimlu,ijmlu,ikmlu,ilmlu,immlu
-         
-         clname='ncardata_spline_orca'
-         CALL ctlopn(numfl5,clname,clold,clunf,cldir,ildta,numout,lwp,1)
-         READ (numfl5,REC=1,IOSTAT=ios) cltit,iimlu,ijmlu,ikmlu,ilmlu,immlu
-         ! temperature
-         ! Utilisation d'un spline, on lit le champ a mois=1
-         CALL read2D(numfl5,flxdta(1,1,1,5),1,3)
-         
-      ENDIF
-
-
-      ! Read monthly file
-      ! ----------------
-
-      IF( kt == nit000 .OR. imois /= nflx1 ) THEN
-
-         ! Calendar computation
-
-         ! nflx1 number of the first file record used in the simulation
-         ! nflx2 number of the last  file record
-
-         nflx1 = imois
-         nflx2 = nflx1+1
-         nflx1 = MOD(nflx1,iman)
-         IF( nflx1 == 0 ) nflx1 = iman
-         nflx2 = MOD(nflx2,iman)
-         IF( nflx2 == 0 ) nflx2 = iman
-         IF(lwp) WRITE(numout,*) 'first record file used nflx1 ',nflx1
-         IF(lwp) WRITE(numout,*) 'last  record file used nflx2 ',nflx2
-         
-         ! Read monthly fluxes data Esbensen Kushnir 
-
-         ! humidite
-         CALL read2D(numfl1,flxdta(1,1,1,1),1,nflx1+1)
-         CALL read2D(numfl1,flxdta(1,1,2,1),1,nflx2+1)
-         ! vent
-         CALL read2D(numfl2,flxdta(1,1,1,2),1,nflx1+1)
-         CALL read2D(numfl2,flxdta(1,1,2,2),1,nflx2+1)
-         ! nuages
-         CALL read2D(numfl3,flxdta(1,1,1,3),1,nflx1+1)
-         CALL read2D(numfl3,flxdta(1,1,2,3),1,nflx2+1)
-         ! precipitations
-         CALL read2D(numfl4,flxdta(1,1,1,4),1,nflx1+1)
-         CALL read2D(numfl4,flxdta(1,1,2,4),1,nflx2+1)
-         ! temperature
-         ! Utilisation d'un spline, on lit le champ a mois=nflx1 et nflx2
-         ! CALL read2D(numfl5,flxdta(1,1,1,6),1,3*(nflx1-1)+3)
-         ! CALL read2D(numfl5,flxdta(1,1,2,6),1,3*(nflx2-1)+3)
-         ! on lit la derivee
-         ! CALL read2D(numfl5,flxdta(1,1,1,7),1,3*(nflx1-1)+4)
-         ! CALL read2D(numfl5,flxdta(1,1,2,7),1,3*(nflx2-1)+4)
-
-         IF(lwp) THEN
-            WRITE(numout,*)
-            WRITE(numout,*) ' read clio flx ok'
-            WRITE(numout,*)
-            DO jm = 1, 4
-               WRITE(numout,*)
-               WRITE(numout,*) 'Clio mounth: ',nflx1,'  field: ',jm,' multiply by ',0.1
-               CALL prihre(flxdta(1,1,1,jm),jpi,jpj,1,jpi,20,1,jpj,10,.1,numout)
-            END DO
-         ENDIF
-
-      ENDIF
-
-      IF( kt == nit000 .OR. imois2 /= nflx11 ) THEN
-
-         ! calendar computation
-         
-         ! nflx1 number of the first file record used in the simulation
-         ! nflx2 number of the last  file record
-         
-         nflx11 = imois2
-         nflx12 = nflx11+1
-         nflx11 = MOD(nflx11,iman)
-         IF( nflx11 == 0 ) nflx11 = iman
-         nflx12 = MOD(nflx12,iman)
-         IF( nflx12 == 0 ) nflx12 = iman
-         IF(lwp) WRITE(numout,*) 'first record file used nflx11 ',nflx11
-         IF(lwp) WRITE(numout,*) 'last  record file used nflx12 ',nflx12
-         
-         ! Read monthly fluxes data Esbensen Kushnir 
-         
-         ! temperature
-         ! Utilisation d'un spline, on lit le champ a mois=nflx1 et nflx2
-         CALL read2D(numfl5,flxdta(1,1,1,6),1,3*(nflx11-1)+3)
-         CALL read2D(numfl5,flxdta(1,1,2,6),1,3*(nflx12-1)+3)
-         ! on lit la derivee
-         CALL read2D(numfl5,flxdta(1,1,1,7),1,3*(nflx11-1)+4)
-         CALL read2D(numfl5,flxdta(1,1,2,7),1,3*(nflx12-1)+4)
-
-         IF(lwp) THEN
-            WRITE(numout,*)
-            WRITE(numout,*) ' read CLIO flx ok'
-            WRITE(numout,*)
-            DO jm = 6, jpf
-               WRITE(numout,*)
-               WRITE(numout,*) 'Clio mounth: ',nflx11,'  field: ',jm,' multiply by ',0.1
-               CALL prihre(flxdta(1,1,1,jm),jpi,jpj,1,jpi,20,1,jpj,10,.1,numout)
-            END DO
-         ENDIF
-         
-      ENDIF
-
-
-      ! 3. at every time step interpolation of fluxes
-      ! ---------------------------------------------
-
-      zxy = FLOAT(nday) / FLOAT(nobis(nflx1)) + 0.5 - i15
-
-      zdtt = raajj/raamo
-      zdatet = 0.
-      DO jt = 1, nmonth-1
-         zdatet = zdatet + nobis(jt)
-      END DO 
-      zdatet = ( zdatet + FLOAT(nday) -1. )/zdtt
-      zttbt = zdatet - int(zdatet)
-      zttat = 1. - zttbt
-      zdtts6 = zdtt/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) )
-      tatm(:,:) = ( flxdta(:,:,2,6) - flxdta(:,:,1,6) )/zdtt     &
-                - ((3. * zttat * zttat - 1.) * flxdta(:,:,1,7)   &
-                - ( 3. * zttbt * zttbt - 1.) * flxdta(:,:,2,7) ) * zdtts6   &
-                + flxdta(:,:,1,5)
-
-      CALL blk(kt)
-
-      CALL FLUSH(numout)
-
-      ! ------------------- !
-      ! Last call kt=nitend !
-      ! ------------------- !
-
-      ! Closing of the 5 files (required in mpp) ????? it smells bug ...
-      IF( kt == nitend ) THEN
-          CALL flinclo(numfl1)
-          CALL flinclo(numfl2)
-          CALL flinclo(numfl3)
-          CALL flinclo(numfl4)
-          CALL flinclo(numfl5)
-      ENDIF
-
-   END SUBROUTINE flx
Index: trunk/NEMO/OPA_SRC/SBC/flxmod.F90
===================================================================
--- trunk/NEMO/OPA_SRC/SBC/flxmod.F90	(revision 238)
+++ trunk/NEMO/OPA_SRC/SBC/flxmod.F90	(revision 239)
@@ -27,12 +27,4 @@
 
 #if defined key_flx_bulk_monthly
-# if defined key_fdir
-   !!----------------------------------------------------------------------
-   !!   'key_flx_bulk_monthly'   and                           MONTHLY bulk
-   !!   'key_fdir'                                       direct access file
-   !!----------------------------------------------------------------------
-#  include "flx_bulk_monthly_fdir.h90"
-
-# else
    !!----------------------------------------------------------------------
    !!   'key_flx_bulk_monthly'   and                           MONTHLY bulk
@@ -41,5 +33,4 @@
 #  include "flx_bulk_monthly.h90"
 
-# endif
 #elif defined key_flx_bulk_daily
    !!----------------------------------------------------------------------
Index: trunk/NEMO/OPA_SRC/SBC/tau_forced_monthly_fdir.h90
===================================================================
--- trunk/NEMO/OPA_SRC/SBC/tau_forced_monthly_fdir.h90	(revision 238)
+++ 	(revision )
@@ -1,199 +1,0 @@
-   !!----------------------------------------------------------------------
-   !!                ***  tau_forced_monthly_fdir.h90  ***
-   !!----------------------------------------------------------------------
-
-   !!----------------------------------------------------------------------
-   !!   tau     : update surface stress from monthly mean fields read in 
-   !!             a direct access file
-   !!----------------------------------------------------------------------
-   !! * local modules variables
-   INTEGER ::           &
-      numtau = 64,      &  ! logical unit for the i-component of the wind data
-      ntau1, ntau2         ! index of the first and second record used
-   CHARACTER (len=32) ::   &
-      cl_tau = 'tauxy_1m'  &
-      !                    ! name of the monthly direct acces file
-      !                    ! which containt the 2 surface stress components
-   REAL(wp), DIMENSION(jpi,jpj,2,4) ::   &
-      taudta               ! the 2 components of the surface stress (Pascal)
-      !                    ! at 2 consecutive time-steps in the (i,j) referential
-   !!----------------------------------------------------------------------
-   !!   OPA 9.0 , LODYC-IPSL  (2003)
-   !!----------------------------------------------------------------------
-
-CONTAINS
-
-   SUBROUTINE tau( kt )
-      !!---------------------------------------------------------------------
-      !!                    ***  ROUTINE tau  ***
-      !!              
-      !! ** Purpose :   provide to the ocean the stress at each time step
-      !!
-      !! ** Method  : - Read the 2 monthly surface stress components in a 
-      !!      direct access file at 2 consecutive time-steps
-      !!        They are given in the (i,j) referential 
-      !!        The i-component is given at U-point (INTERP package)
-      !!        The j-component is given at V-point (INTERP package)
-      !!              - a linear time-interpolation is performed to provide 
-      !!      the stress at the kt time-step.
-      !!
-      !!    CAUTION: never mask the surface stress field !
-      !!
-      !! ** Action :
-      !!        update at each time-step the two components of the surface
-      !!      stress in both (i,j) and geographical referencial
-      !!
-      !! History :
-      !!   4.0  !  91-03  (G. Madec)  Original code
-      !!   8.5  !  02-11  (G. Madec)  F90: Free form and module
-      !!----------------------------------------------------------------------
-      !! * Arguments
-      INTEGER, INTENT( in  ) ::   kt   ! ocean time step
-
-      !! * Local declarations
-      INTEGER :: ji, jj, ios
-      INTEGER :: iimlu, ijmlu, ikmlu, ilmlu, immlu
-      INTEGER :: imois, iman
-      INTEGER :: i15
-      INTEGER :: ildta,ibloc,ilseq
-
-      CHARACTER (len=30) ::   cltit
-      CHARACTER (len=21) ::   clunf, clold, cldir
-
-      REAL(wp) ::   zxy, zfacto
-      REAL(wp), DIMENSION(jpi,jpj) ::   ztauxg, ztauyg
-!!---------------------------------------------------------------------
-
-
-! 0. Initialization
-! -----------------
-! Open specifier
-
-      clold = 'OLD'
-      clunf = 'UNFORMATTED'
-      cldir = 'DIRECT'
-
-      ilseq = 1
-
-! computation of the record length for direct access file
-! this length depend of 4096 (device specification)
-
-      ibloc = 4096
-      ildta = ibloc*((jpidta*jpjdta*jpbytda-1 )/ibloc+1)
-
-! iman=number of dates in data file (12 for a year of monthly values)
-      iman  = int(raamo)
-
-      i15 = INT( 2 * FLOAT( nday ) / ( FLOAT( nobis(nmonth) ) + 0.5 ) )
-
-      imois = nmonth + i15 - 1
-      IF ( imois == 0 ) imois = iman
-
-
-! 1. first call kt=nit000
-! -----------------------
-
-      IF( kt == nit000 ) THEN
-          ntau1 = 0
-          IF(lwp) WRITE(numout,*) ' '
-          IF(lwp) WRITE(numout,*) ' tau    : monthly stress direct access file'
-          IF(lwp) WRITE(numout,*) ' ~~~~~~'
-          IF(lwp) WRITE(numout,*)
-          IF(lwp) WRITE(numout,*) 'file numtau = ', numtau
-
-! title, dimensions and tests
-
-          CALL ctlopn(numtau, cl_tau, clold, clunf, cldir, ildta, numout, lwp, 1 )
-          READ ( numtau, REC=1, IOSTAT=ios ) cltit, iimlu, ijmlu, ikmlu, ilmlu, immlu
-
-          IF(lwp) WRITE(numout,*)' number of points in the 5 directions '
-          IF(lwp) WRITE(numout,*) iimlu, ijmlu, ikmlu, ilmlu, immlu
-      ENDIF
-
-
-! 2. Read monthly file
-! -------------------
-
-      IF ( kt == nit000 .OR. imois /= ntau1 ) THEN
-
-! 2.1 calendar computation
-
-! ntau1 number of the first file record used in the simulation
-! ntau2 number of the last  file record
-
-          ntau1 = imois
-          ntau2 = ntau1+1
-          ntau1 = mod( ntau1, iman )
-          IF ( ntau1 == 0 ) ntau1 = iman
-          ntau2 = MOD( ntau2, iman )
-          IF ( ntau2 == 0 ) ntau2 = iman
-          IF(lwp) WRITE(numout,*) 'first record file used ntau1 ', ntau1
-          IF(lwp) WRITE(numout,*) 'last  record file used ntau2 ', ntau2
-
-! 2.3 Read monthly stress data Hellerman
-
-! ntau1
-! ...Txu
-          CALL read2D(numtau,taudta(1,1,1,1),1,6*(ntau1-1)+3)
-! ...Txv
-          CALL read2D(numtau,taudta(1,1,1,2),1,6*(ntau1-1)+4)
-! ...Tyu
-          CALL read2D(numtau,taudta(1,1,1,3),1,6*(ntau1-1)+6)
-! ...Tyv
-          CALL read2D(numtau,taudta(1,1,1,4),1,6*(ntau1-1)+7)
-! ntau2
-! ...Txu
-          CALL read2D(numtau,taudta(1,1,2,1),1,6*(ntau2-1)+3)
-! ...Txv
-          CALL read2D(numtau,taudta(1,1,2,2),1,6*(ntau2-1)+4)
-! ...Tyu
-          CALL read2D(numtau,taudta(1,1,2,3),1,6*(ntau2-1)+6)
-! ...Tyv
-          CALL read2D(numtau,taudta(1,1,2,4),1,6*(ntau2-1)+7)
-
-          IF(lwp) THEN
-          WRITE(numout,*) ' '
-          WRITE(numout,*) ' read Clio stress ok'
-          WRITE(numout,*) ' '
-          WRITE(numout,*) ' month: ', ntau1, '  field: 1 multiply by ', 1.
-          CALL prihre( taudta(1,1,1,1), jpi, jpj, 1, jpi, 20, 1, jpj, 10, 1., numout )
-          WRITE(numout,*) ' '
-          WRITE(numout,*) ' month: ', ntau2, '  field: 2 multiply by ', 1.
-          CALL prihre( taudta(1,1,2,4), jpi, jpj, 1, jpi, 20, 1, jpj, 10, 1., numout )
-          ENDIF
-
-      ENDIF
-
- 
-! 4. At every time step compute stress data
-! -----------------------------------------
-
-      zfacto     = 1.
-! zxy : coefficient for linear interpolation in time
-      zxy = FLOAT( nday ) / FLOAT( nobis(ntau1) ) + 0.5 - i15
-
-! ...Txu
-      tauxg (:,:) = zfacto * ( (1.-zxy) * taudta(:,:,1,1) + zxy * taudta(:,:,2,1) )
-! ...Tyu
-      tauyg (:,:) = zfacto * ( (1.-zxy) * taudta(:,:,1,3) + zxy * taudta(:,:,2,3) )
-! ...Txv
-      ztauxg(:,:) = zfacto * ( (1.-zxy) * taudta(:,:,1,2) + zxy * taudta(:,:,2,2) )
-! ...Tyv
-      ztauyg(:,:) = zfacto * ( (1.-zxy) * taudta(:,:,1,4) + zxy * taudta(:,:,2,4) ) 
-
-! 2.4 changing data grid coordinates --> global grid coordinates
-
-      CALL repcmo( tauxg, tauyg, ztauxg, ztauyg, taux, tauy, kt )
-
-! 2.5 Save components 
-
-      tauxg(:,:) = taux(:,:)
-      tauyg(:,:) = tauy(:,:)
-
-      CALL FLUSH(numout)
-      GO TO 412
- 410  IF(lwp)WRITE(numout,*) 'e r r o r read numtau ', ios
-      nstop = nstop +1
- 412  CONTINUE
-
-   END SUBROUTINE tau
Index: trunk/NEMO/OPA_SRC/SBC/taumod.F90
===================================================================
--- trunk/NEMO/OPA_SRC/SBC/taumod.F90	(revision 238)
+++ trunk/NEMO/OPA_SRC/SBC/taumod.F90	(revision 239)
@@ -32,11 +32,4 @@
 #if defined key_tau_monthly
    ! Monthly climatology in (i,j) referential  (i-comp. at U-pt and j-comp. at V-pt)
-#  if defined key_fdir
-   !!----------------------------------------------------------------------
-   !!   'key_tau_monthly'                        MONTHLY climatology stress
-   !!   'key_fdir'                                  direct access files
-   !!----------------------------------------------------------------------
-#   include "tau_forced_monthly_fdir.h90"
-#  else
    !!----------------------------------------------------------------------
    !!   'key_tau_monthly'                        MONTHLY climatology stress
@@ -44,5 +37,4 @@
    !!----------------------------------------------------------------------
 #   include "tau_forced_monthly.h90"
-#  endif
 
 # elif defined key_tau_daily
Index: trunk/NEMO/OPA_SRC/SOL/solisl.F90
===================================================================
--- trunk/NEMO/OPA_SRC/SOL/solisl.F90	(revision 238)
+++ trunk/NEMO/OPA_SRC/SOL/solisl.F90	(revision 239)
@@ -536,11 +536,4 @@
    END SUBROUTINE isl_pth
 
-# if defined key_fdir
-   !!----------------------------------------------------------------------
-   !!   'key_fdir' :                                     direct access file
-   !!----------------------------------------------------------------------
-#  include "solisl_fdir.h90"
-
-# else
    !!----------------------------------------------------------------------
    !!   Default option :                                        NetCDF file
@@ -692,6 +685,6 @@
       CALL linrg( jpisl, aisl, jpisl, aislm1, jpisl )
 
-! 2.2 Control print
-
+      ! 2.2 Control print
+      
       IF(lwp) THEN
          WRITE(numout,*)
@@ -706,6 +699,6 @@
       
 
-! 3. Output of aisl and aislm1 in numisl
-! --------------------------------------
+      ! 3. Output of aisl and aislm1 in numisl
+      ! --------------------------------------
 
       CALL restput( numisl, 'aisl'  , jpisl, jpisl, 1, 0, aisl   )
@@ -1160,5 +1153,4 @@
    END SUBROUTINE isl_bsf
 
-#endif
 
    SUBROUTINE isl_dyn_spg
Index: trunk/NEMO/OPA_SRC/SOL/solisl_fdir.h90
===================================================================
--- trunk/NEMO/OPA_SRC/SOL/solisl_fdir.h90	(revision 238)
+++ 	(revision )
@@ -1,529 +1,0 @@
-   !!----------------------------------------------------------------------
-   !!                   ***  solisl_fdir.h90  ***
-   !!----------------------------------------------------------------------
-
-   !!----------------------------------------------------------------------
-   !!   islmat     : Compute the matrix associated with islands
-   !!                and save it in a direct access file
-   !!   islbsf     : Compute the barotropic streamfunction of each island
-   !!                and save it in a direct access file
-   !!----------------------------------------------------------------------
-
-   SUBROUTINE islmat
-      !!----------------------------------------------------------------------
-      !!                  ***  ROUTINE islmat  ***
-      !!                   
-      !! ** Purpose :   Compute and invert the island matrix 
-      !!
-      !! ** Method  :   aisl(jni,jnj) matrix constituted by bsfisl circulation
-      !!
-      !! ** Action  : - aisl   : island matrix
-      !!              - aislm1 : invert of the island matrix
-      !!
-      !! ** file    :   islands: contain bsfisl, aisl and aislm1
-      !!
-      !! History :
-      !!   1.0  !  88-10  (G. Madec)  Original code
-      !!   7.0  !  96-01  (G. Madec)  suppression of common work arrays
-      !!   8.5  !  02-08  (G. Madec)  Free form, F90
-      !!----------------------------------------------------------------------
-      !! * Local declarations
-      INTEGER  ::   ji, jj, jni, jnj, ios, jl
-      REAL(wp) ::   zwx(jpi,jpj,2)
-      !!----------------------------------------------------------------------
-
-
-      ! I. Island matrix lecture in numisl (if it exists)
-      ! ==================================
-      ! file already open in islbsf routine
-      ! Lecture
-      READ( numisl, REC=jpisl+2, IOSTAT=ios ) aisl, aislm1
-      IF( ios /= 0 ) GOTO 110
-
-      ! Control print
-      IF(lwp) THEN
-         WRITE(numout,*)
-         WRITE(numout,*) ' islmat: lecture aisl/aislm1 in numisl done'
-         WRITE(numout,*) ' ~~~~~~'
-         WRITE(numout,*)
-         WRITE(numout,*) ' island matrix'
-         WRITE(numout,*) ' -------------'
-         WRITE(numout,*)
-         
-         DO jnj = 1, jpisl
-            WRITE(numout,'(8e12.4)') ( aisl(jni,jnj), jni = 1, jpisl )
-         END DO
-         
-         WRITE(numout,*)
-         WRITE(numout,*) ' inverse of the island matrix'
-         WRITE(numout,*) ' ----------------------------'
-         WRITE(numout,*)
-         
-         DO jnj = 1, jpisl
-            WRITE(numout,'(12e11.3)') ( aislm1(jni,jnj), jni=1, jpisl )
-         END DO
-      ENDIF
-
-      CLOSE(numisl)
-
-      RETURN
-
- 110  CONTINUE
-
-
-      ! II. Island matrix computation
-      ! =============================
-
-      DO jnj = 1, jpisl
-
-         ! 1.1 Circulation of bsf(jnj) around island jni
-         
-         DO jj = 2, jpj
-            zwx(:,jj,1) = -( bsfisl(:,jj,jnj) - bsfisl(:,jj-1,jnj) )
-         END DO
-         DO ji = 1, jpi
-            zwx(ji,1,1) = 0.e0
-         END DO
-         
-         DO jj = 1, jpj
-            DO ji = 2, jpi
-               zwx(ji,jj,2) = ( bsfisl(ji,jj,jnj) - bsfisl(ji-1,jj,jnj) )
-            END DO
-         END DO
-         DO jj = 1, jpj
-            zwx(1,jj,2) = 0.e0
-         END DO
-
-         ! 1.2 Island matrix
-
-         DO jni = 1, jpisl
-            aisl(jni,jnj) = 0.
-            DO jl = 1, 2
-               DO jj = 1, jpj
-                  DO ji = 1, jpi
-                     aisl(jni,jnj) = aisl(jni,jnj) + acisl2(ji,jj,jl,jni) * zwx(ji,jj,jl)
-                  END DO
-               END DO
-            END DO
-         END DO
-
-      END DO
-      IF( lk_mpp )   CALL mpp_sum( aisl, jpisl*jpisl )   ! sum over the global domain
-
-      ! 1.3 Control print
-      IF(lwp) THEN
-         WRITE(numout,*)
-         WRITE(numout,*) ' islmat: island matrix'
-         WRITE(numout,*) ' ~~~~~~'
-         WRITE(numout,*)
-         
-         DO jnj = 1, jpisl
-            WRITE(numout,'(8e12.4)') ( aisl(jni,jnj), jni = 1, jpisl )
-         END DO
-      ENDIF
-
-
-      ! 2. Invertion of the island matrix
-      ! ---------------------------------
-
-      ! 2.1 Call of an imsl routine for the matrix invertion
-
-      CALL linrg( jpisl, aisl, jpisl, aislm1, jpisl )
-
-      ! 2.2 Control print
-
-      IF(lwp) THEN
-         WRITE(numout,*)
-         WRITE(numout,*) ' islmat: inverse of the island matrix'
-         WRITE(numout,*) ' ~~~~~~'
-         WRITE(numout,*)
-         
-         DO jnj = 1, jpisl
-            WRITE(numout, '(12e11.3)') ( aislm1(jni,jnj), jni=1, jpisl )
-         END DO
-      ENDIF
-
-
-      ! 3. Output of aisl and aislm1 in numisl
-      ! --------------------------------------
-
-      IF(lwp) WRITE(numisl,REC=jpisl+2) aisl, aislm1
-
-      CLOSE( numisl )
-      
-   END SUBROUTINE islmat
-
-
-   SUBROUTINE islbsf
-      !!----------------------------------------------------------------------
-      !!                  ***  ROUTINE islbsf  ***
-      !!
-      !! ** Purpose :   Compute the barotropic stream function associated with
-      !!      each island using FETI or preconditioned conjugate gradient 
-      !!      method or read them in numisl.
-      !!
-      !! ** Method  :   Direct acces file
-      !!
-      !! ** file    :   numisl: barotropic stream function associated
-      !!                        with each island of the domain
-      !!
-      !! ** Action  : - bsfisl, the streamfunction which takes the value 1 
-      !!                over island ni, and 0 over the others islands
-      !!              - update 'numisl' file
-      !!
-      !! History :
-      !!        !  87-10  (G. Madec)  Original code
-      !!        !  91-11  (G. Madec)
-      !!        !  93-03  (G. Madec)  release 7.1
-      !!        !  93-04  (M. Guyon)  loops and suppress pointers
-      !!        !  96-11  (A. Weaver)  correction to preconditioning
-      !!        !  98-02  (M. Guyon)  FETI method
-      !!        !  99-11  (M. Imbard)  NetCDF FORMAT with IOIPSL
-      !!   8.5  !  02-08  (G. Madec)  Free form, F90
-      !!----------------------------------------------------------------------
-      !! * Local declarations
-      INTEGER  ::   ji, jj, jni, jii, jnp
-      INTEGER  ::   iimlu, ijmlu, inmlu, ios, iju, iloc
-      INTEGER  ::   ii, ij, icile, icut, inmax, indic
-      REAL(wp) ::   zepsr, zeplu, zgwgt
-      REAL(wp) ::   zep(jpisl)
-      !!----------------------------------------------------------------------
-
-
-      ! 0. Initializations
-      ! ==================
-
-      ! set to zero the convergence indicator
-      icile = 0
-
-      ! set to zero of bsfisl
-      bsfisl(:,:,1:jpisl) = 0.e0
-
-
-      ! I. Lecture of bsfisl in numisl (if it exists)
-      ! =============================================
-
-      ! open islands file
-      ibloc = 4096
-      ilglo = ibloc*((jpiglo*jpjglo*jpbyt-1 )/ibloc+1)
-      clname = 'islands'
-      CALL ctlopn( numisl, 'islands', 'UNKNOWN', 'UNFORMATTED', 'DIRECT',   &
-                   ilglo,numout,lwp,0)
-
-      icut  = 0
-      iimlu = 0
-      ijmlu = 0
-      inmlu = 0
-      zeplu = 0.
-      READ (numisl, REC=1, IOSTAT=ios) iimlu, ijmlu, inmlu, zeplu
-      IF( ios /= 0 ) GOTO 110
-      DO jni = 1, jpisl
-         CALL read2( numisl, bsfisl(1,1,jni), 1, jni+1 )
-      END DO
-
- 110  CONTINUE
-
-      ! the read precision is not the required one : icut=888
-      IF( zeplu > epsisl ) icut = 888
-
-      ! the read domain does not correspond to the model one : icut=999
-      IF( iimlu /= jpiglo .OR. ijmlu /= jpjglo .OR. inmlu /= jpisl   ) icut = 999
-
-      ! Control print
-      IF( icut == 999 ) THEN
-         IF(lwp) THEN
-            WRITE(numout,*)
-            WRITE(numout,*) ' islbsf : lecture bsfisl in numisl failed'
-            WRITE(numout,*) ' ~~~~~~'
-            WRITE(numout,*) ' icut= ', icut
-            WRITE(numout,*) ' imlu= ', iimlu, ' jmlu= ', ijmlu,   &
-               ' nilu= ', inmlu, ' epsisl lu= ', zeplu
-            WRITE(numout,*) ' the bsfisl are computed from zero'
-         ENDIF
-      ELSEIF( icut == 888 ) THEN
-         IF(lwp) THEN
-            WRITE(numout,*)
-            WRITE(numout,*) ' islbsf : lecture bsfisl in numisl done'
-            WRITE(numout,*) ' ~~~~~~'
-            WRITE(numout,*) ' the required accuracy is not reached'
-            WRITE(numout,*) ' epsisl lu= ', zeplu,' epsisl required ', epsisl
-            WRITE(numout,*) ' the bsfisl are computed from the read values'
-         ENDIF
-      ELSE
-         IF(lwp) THEN
-            WRITE(numout,*)
-            WRITE(numout,*) ' islbsf : lecture bsfisl in numisl done'
-            WRITE(numout,*) ' ~~~~~~'
-         ENDIF
-         RETURN
-      ENDIF
-
-
-      ! II. Compute the bsfisl (if icut=888 or 999)
-      ! ======================
-
-      ! save nmax
-      inmax  = nmax
-
-      ! set the number of iteration of island computation
-      nmax = nmisl
-
-      ! Loop over islands
-      ! -----------------
-
-      DO jni = 1, jpisl
-
-
-         ! 1. Initalizations of island computation
-         ! ---------------------------------------
-         
-         ! 1.0 Set the pcg solution gcb to zero
-         gcb(:,:) = 0.e0
-
-         ! 1.1 Set first guess gcx either to zero or to the read bsfisl
-
-         IF( icut == 999 ) THEN
-            gcx(:,:) = 0.e0
-         ELSEIF( icut == 888 ) THEN
-            IF(lwp) WRITE(numout,*) ' islbsf: bsfisl read are used as first guess'
-            ! C a u t i o n : bsfisl masked because it contains 1 along island seaside
-            gcx(:,:) = bsfisl(:,:,jni) * bmask(:,:)
-         ENDIF
-         
-         ! 1.2 Right hand side of the stream FUNCTION equation
-         
-         IF( lk_mpp ) THEN
-            ! north fold treatment
-            IF( npolj == 3 ) iloc = jpiglo -(nimpp-1+nimppt(nono+1)-1)
-            IF( npolj == 4 ) iloc = jpiglo - 2*(nimpp-1)
-            t2p1(:,1,1) = 0.
-            ! north and south grid-points
-            DO jii = 1, 2
-               DO jnp = 1, mnisl(jii,jni)
-                  ii = miisl(jnp,jii,jni)
-                  ij = mjisl(jnp,jii,jni)
-                  IF( ( npolj == 3 .OR. npolj == 4 ) .AND. ( ij == nlcj-1 .AND. jii == 1) ) THEN 
-                     iju=iloc-ii+1
-                     t2p1(iju,1,1) =  t2p1(iju,1,1) + hur(ii,ij) * e1u(ii,ij) / e2u(ii,ij) 
-                  ELSE  
-                     gcb(ii,ij-jii+1) =  gcb(ii,ij-jii+1) + hur(ii,ij) * e1u(ii,ij) / e2u(ii,ij) 
-                  ENDIF
-               END DO
-            END DO
-         
-            ! east and west grid-points
-
-            DO jii = 3, 4
-               DO jnp = 1, mnisl(jii,jni)
-                  ii = miisl(jnp,jii,jni)
-                  ij = mjisl(jnp,jii,jni)
-                  gcb(ii-jii+3,ij) = gcb(ii-jii+3,ij) + hvr(ii,ij) * e2v(ii,ij) / e1v(ii,ij)
-               END DO
-            END DO
-
-            IF( lk_mpp )   CALL mpplnks( gcb )   !!bug ? should use an lbclnk ? is it possible???
-
-         ELSE
-            ! north and south grid-points
-            DO jii = 1, 2
-               DO jnp = 1, mnisl(jii,jni)
-                  ii = miisl(jnp,jii,jni)
-                  ij = mjisl(jnp,jii,jni)
-                  IF( ( nperio == 3 .OR. nperio == 4 ) .AND. ( ij == jpj-1 .AND. jii == 1) ) THEN 
-                     gcb(jpi-ii+1,ij-1) = gcb(jpi-ii+1,ij-1) + hur(ii,ij) * e1u(ii,ij) / e2u(ii,ij) 
-                  ELSE  
-                     gcb(ii,ij-jii+1) =  gcb(ii,ij-jii+1) + hur(ii,ij) * e1u(ii,ij) / e2u(ii,ij)
-                  ENDIF
-               END DO
-            END DO
-
-            ! east and west grid-points
-            DO jii = 3, 4
-               DO jnp = 1, mnisl(jii,jni)
-                  ii = miisl(jnp,jii,jni)
-                  ij = mjisl(jnp,jii,jni)
-                  IF( bmask(ii-jii+3,ij) /= 0. ) THEN
-                     gcb(ii-jii+3,ij) = gcb(ii-jii+3,ij) + hvr(ii,ij) * e2v(ii,ij) / e1v(ii,ij)
-                  ELSE
-                     ! east-west cyclic boundary conditions
-                     IF( ii-jii+3 == 1 ) THEN
-                        gcb(jpim1,ij) = gcb(jpim1,ij) + hvr(ii,ij) * e2v(ii,ij) / e1v(ii,ij)
-                     ENDIF
-                  ENDIF
-               END DO
-            END DO
-         ENDIF
-
-         ! 1.4 Preconditioned right hand side and absolute precision
-
-         IF( nsolv == 3 ) THEN 
-            ! FETI method
-            ncut = 0
-            rnorme=0.
-            DO jj = 1, jpj
-               DO ji = 1, jpi
-                  gcb  (ji,jj) = bmask(ji,jj) * gcb(ji,jj)
-                  rnorme = rnorme + gcb(ji,jj) * gcb(ji,jj)
-               END DO
-            END DO
-            
-            CALL mpp_sum( rnorme )
-
-            IF(lwp) WRITE(numout,*) 'rnorme ', rnorme
-            epsr = epsisl * epsisl * rnorme
-            indic = 0
-         ELSE
-            ncut = 0
-            rnorme = 0.
-            DO jj = 1, jpj
-               DO ji = 1, jpi
-                  gcb  (ji,jj) = gcdprc(ji,jj) * gcb(ji,jj)
-                  zgwgt = gcdmat(ji,jj) * gcb(ji,jj)
-                  rnorme = rnorme + gcb(ji,jj) * zgwgt
-               END DO
-            END DO
-            IF( lk_mpp )   CALL mpp_sum( rnorme )   ! sum over the global domain
-
-            IF(lwp) WRITE(numout,*) 'rnorme ', rnorme
-            epsr = epsisl * epsisl * rnorme
-            indic = 0
-         ENDIF
-
-
-         ! 3. PCG solver for gcp.gcx=gcb in monotask
-         ! -------------------------------------------
-
-         IF(nsolv == 3) THEN 
-            ! FETI method
-            ! precision to compute Islands matrix A
-            
-            epsilo = epsisl
-            CALL solfet( indic )
-            !                      --->
-            ! precision to compute grad PS
-            
-            epsilo = eps
-         ELSE 
-            
-            CALL solpcg( indic )
-            
-         ENDIF
-         
-         
-         ! 4. Save the solution in bsfisl
-         ! ------------------------------
-         
-         DO jj = 1, jpj
-            DO ji = 1, jpi
-               bsfisl(ji,jj,jni) = gcx(ji,jj)
-            END DO
-         END DO
-
-
-         ! 5. Boundary conditions
-         ! ----------------------
-         
-         ! set to 1. coastal gridpoints of the island
-         DO jnp = 1, mnisl(0,jni)
-            ii = miisl(jnp,0,jni)
-            ij = mjisl(jnp,0,jni)
-            bsfisl(ii,ij,jni) = 1.
-         END DO
-         
-         ! cyclic boundary conditions
-         IF( nperio == 1 .OR. nperio == 4 ) THEN
-            DO jj = 1, jpj
-               bsfisl( 1 ,jj,jni) = bsfisl(jpim1,jj,jni)
-               bsfisl(jpi,jj,jni) = bsfisl(  2  ,jj,jni)
-            END DO
-         ENDIF
-         IF( nperio == 3 .OR. nperio == 4 ) THEN
-            DO ji = 1, jpim1
-               iju = jpi-ji+1
-               bsfisl(ji,jpj-1,jni) = bsfisl(iju,jpj-2,jni)
-               bsfisl(ji, jpj ,jni) = bsfisl(iju,jpj-3,jni)
-            END DO
-         ENDIF
-         IF( lk_mpp )   CALL lbc_lnk( bsfisl(:,:,jni), 'G', 1. )   ! link at G-point
-         
-         
-         ! 6. Control print
-         ! ----------------
-         
-         IF(lwp)WRITE(numout,*)
-         IF(lwp)WRITE(numout,*) ' islbsf: island number: ', jni
-         IF(lwp)WRITE (numout,9290) niter, res, SQRT(epsr)/epsisl
-         zep(jni) =  MAX(epsisl, res/(SQRT(epsr)/epsisl))
-         IF(indic < 0) THEN
-            icile = icile-1
-            IF(lwp)WRITE(numout,*) '  pcg do not converge for island: ', jni
-            IF(lwp)WRITE(numout,*) '      Precision reached: ',zep(jni)
-         ENDIF
-         
- 9290    FORMAT('        niter :',i4,' , res :',e20.10,' , gcb :',e20.10)
-
-
-         ! End loop for islands
-         ! --------------------
-         
-      END DO
-
-
-      ! 7. Reset PCG
-      ! ------------
-
-      ! reset the number of iteration for pcg
-      nmax = inmax
-
-      ! reset to zero pcg arrays
-      gcx  (:,:) = 0.e0
-      gcxb (:,:) = 0.e0
-      gcb  (:,:) = 0.e0
-      gcr  (:,:) = 0.e0
-      gcdes(:,:) = 0.e0
-      gccd (:,:) = 0.e0
-
-
-      ! III. Output of bsfisl in numisl
-      ! ===============================
-
-      IF( icile == 0 .AND. icut /= 0 ) THEN
-         IF(lwp) THEN
-            WRITE(numout,*)
-            WRITE(numout,*)' islbsf : write bsfisl in numisl ', numisl
-            WRITE(numout,*)' ~~~~~~'
-         ENDIF
-         
-         IF(lwp) WRITE(numisl,REC=1) jpiglo, jpjglo, jpisl, epsisl
-         DO jni = 1, jpisl
-            CALL write2( numisl, bsfisl(1,1,jni), 1, jni+1 )
-         END DO
-      ENDIF
-
-      IF( icile < 0 ) THEN
-         IF(lwp) THEN
-            WRITE(numout,*)
-            WRITE(numout,*) ' islbsf : number of island without convergence: ',ABS(icile)
-            WRITE(numout,*) ' ~~~~~~'
-         ENDIF
-         zepsr = epsisl
-         DO jni = 1, jpisl
-            IF(lwp)WRITE(numout,*) '    isl ',jni,' precision reached ', zep(jni)
-            zepsr = MAX( zep(jni), zepsr )
-         END DO
-         IF( zepsr == 0. ) zepsr = epsisl
-         IF(lwp) THEN
-            WRITE(numout,*) ' save value of precision reached: ',zepsr
-            WRITE(numout,*)
-            WRITE(numout,*)' islbsf : save bsfisl in numisl ',numisl
-            WRITE(numout,*)' ~~~~~~'
-         ENDIF
-         
-         IF(lwp) WRITE(numisl,REC=1) jpiglo, jpjglo, jpisl, zepsr
-         DO jni = 1, jpisl
-            CALL write2( numisl, bsfisl(1,1,jni), 1, jni+1 )
-         END DO
-         nstop = nstop + 1
-      ENDIF
-      
-   END SUBROUTINE islbsf
Index: trunk/NEMO/OPA_SRC/istate.F90
===================================================================
--- trunk/NEMO/OPA_SRC/istate.F90	(revision 238)
+++ trunk/NEMO/OPA_SRC/istate.F90	(revision 239)
@@ -224,7 +224,5 @@
       USE eosbn2     ! eq. of state, Brunt Vaisala frequency (eos     routine)
       USE divcur     ! hor. divergence & rel. vorticity      (div_cur routine)
-#if ! defined key_fdir
       USE ioipsl
-#endif
  
       !! * Local declarations
Index: trunk/NEMO/OPA_SRC/lib_io_fdir.F90
===================================================================
--- trunk/NEMO/OPA_SRC/lib_io_fdir.F90	(revision 238)
+++ 	(revision )
@@ -1,660 +1,0 @@
-MODULE lib_io_fdir
-   !!======================================================================
-   !!   ???
-   !!======================================================================
-#if defined key_fdir
-   !!======================================================================
-   !!  IO Routines for OPA
-   !!
-   !!  read2     read a direct access 2D field (jpiglo,jpjglo)
-   !!  read2d    read a direct access 2D field (jpidta,jpjdta)
-   !!  read3     read a direct access 3D field (jpiglo,jpjglo,jpk)
-   !!  read3d    read a direct access 3D field (jpidta,jpjdta,jpk)
-   !!
-   !!  write2    write a direct access 2D field (jpiglo,jpjglo)
-   !!  write3    write a direct access 3D field (jpiglo,jpjglo,jpk)
-   !!  write4    write a 4bytes direct access 2D field (jpiglo,jpjglo)
-   !!
-   !!======================================================================
-   !! * Modules used
-   USE dom_oce         ! ocean space and time domain 
-   USE lib_mpp         ! distributed memory computing library
-
-   IMPLICIT NONE
-
-   !! * Module variables
-   INTEGER, PARAMETER ::            &
-      jpkmod  = 1 + (jpk-1)/jpnij      ! used for mpp outputs
-
-   REAL(wp), DIMENSION(jpi,jpj,jpnij,jpkmod) ::   &
-      tabio              ! i/o workspace array
-   REAL(wp), DIMENSION(jpiglo,jpjglo) ::   &
-      tabglo             ! global auxilary array
-   REAL(wp), DIMENSION(jpidta,jpjdta) ::   &
-      tabdta             ! global auxilary array
-   !!----------------------------------------------------------------------
-   !!   OPA 9.0 , LODYC-IPSL  (2003)
-   !!----------------------------------------------------------------------
-
-CONTAINS
-
-   SUBROUTINE read2( kunit, ptab, kdim, krec )
-   !!---------------------------------------------------------------------
-   !!                  ***  ROUTINE read2  ***
-   !!      
-   !! ** Purpose :   Opa standard input for a 2D array
-   !!
-   !! ** Method : - Read a binary array ( direct access file )
-   !!      If key_mpp is used, write with an auxilary array
-   !!
-   !! History
-   !!      original  : 93-09 (M. Imbard)
-   !!      additions : 96-05 (J. Escobar)
-   !!----------------------------------------------------------------------
-   !! * Arguments
-      INTEGER , INTENT( in  ) ::   &
-         kunit           ! output unit
-      REAL(wp), INTENT(inout), DIMENSION(jpi,jpj) ::   &
-         ptab            ! variable array
-      INTEGER , INTENT( in  ) ::   &
-         kdim ,       &  ! record length
-         krec            ! record unit for direct access file
-
-#if defined key_mpp_mpi   ||   defined key_mpp_shmem
-   !! * Local declarations
-      INTEGER ji, jj, jproc   ! dummy loop indices
-      INTEGER imess, ic
-      INTEGER ilci, ilcj, iilb, ijlb
-   !!---------------------------------------------------------------------
-
-   ! 1. Read global array
-   ! --------------------
-
-   ! only the main processor
-
-      IF( narea == 1 ) THEN
-         READ(kunit,REC=kdim*(krec-1)+1) tabglo
-         DO jproc = 1, jpnij
-            ilci = nlcit (jproc)
-            ilcj = nlcjt (jproc)
-            iilb = nimppt(jproc)
-            ijlb = njmppt(jproc)
-            DO jj = 1, ilcj
-               DO ji = 1, ilci
-                  tabio(ji,jj,jproc,1) = tabglo(ji+iilb-1,jj+ijlb-1)
-               END DO
-             END DO
-         END DO
-      ENDIF
-      CALL mppsync
-
-   ! 2. Scaterring of auxilary array
-   ! -------------------------------
-
-      CALL mppscatter( tabio, 1, 0, ptab )
-      CALL mppsync
-
-      ! mask
-      DO jj = nlcj+1, jpj
-         DO ji = 1, nlci
-            ptab(ji,jj) = 0.e0
-         END DO
-      END DO
-      DO ji = nlci+1, jpi
-         ptab(ji,:) = 0.e0
-      END DO
-      CALL mppsync
-
-#  else
-     READ(kunit,REC=kdim*(krec-1)+1) ptab
-#endif
-
-   END SUBROUTINE read2
-
-
-   SUBROUTINE read2d( kunit, ptab, kdim, krec )
-   !!---------------------------------------------------------------------
-   !!                  ***  ROUTINE read2D  ***
-   !!
-   !! ** Purpose :   Opa standard input for a 2D data array
-   !!     (its possible to read only a subdomain - zoom )
-   !!
-   !! ** Method  :   Read a binary array ( direct access file )
-   !!      If key_mpp is used, write with an auxilary array
-   !!
-   !! ** Action :
-   !!
-   !! History :
-   !!      original  : 93-09 (M. Imbard)
-   !!      additions : 96-05 (j. Escobar)
-   !!      additions : 98-11 (J. Vialard) vpp
-   !!----------------------------------------------------------------------
-   !! * Arguments 
-      INTEGER , INTENT( in  ) ::   &
-         kunit           ! output unit
-      REAL(wp), INTENT(inout), DIMENSION(jpi,jpj) ::   &
-         ptab            ! variable array
-      INTEGER , INTENT( in  ) ::   &      
-         kdim ,       &  ! record length
-         krec            ! record unit for direct access file
-
-#if defined key_mpp_mpi   ||   defined key_mpp_shmem
-      INTEGER ji, jj, jproc
-      INTEGER imess, ic
-      INTEGER ilci, ilcj, iilb, ijlb
-   !!---------------------------------------------------------------------
-
-
-   ! 1. Read global array
-   ! --------------------
-
-   ! only the main processor
-
-      IF( narea == 1 ) THEN
-         READ(kunit,REC=kdim*(krec-1)+1) tabdta
-         DO jproc=1,jpnij
-            ilci = nlcit (jproc)
-            ilcj = nlcjt (jproc)
-            iilb = nimppt(jproc)
-            ijlb = njmppt(jproc)
-            DO jj = 1, ilcj
-               DO ji = 1, ilci
-                  tabio(ji,jj,jproc,1)=tabdta(ji+jpizoom-1+iilb-1,jj+jpjzoom-1+ijlb-1)
-               END DO
-            END DO
-         END DO
-      ENDIF
-      CALL mppsync
-
-   ! 2. Scaterring of auxilary array
-   ! -------------------------------
-
-      CALL mppscatter( tabio, 1, 0, ptab )
-
-   ! mask
-
-      DO jj = nlcj+1, jpj
-         DO ji = 1, nlci
-            ptab(ji,jj) = 0.e0
-         END DO
-      END DO
-      DO ji = nlci+1, jpi
-         ptab(ji,:) = 0.e0
-      END DO
-      CALL mppsync
-
-#  else
-
-      INTEGER ji, jj
-
-      READ(kunit,REC=kdim*(krec-1)+1) tabdta
-      DO jj = 1, jpj
-        DO ji = 1, jpi
-          ptab(ji,jj) = tabdta( mig(ji), mjg(jj) )
-        END DO
-      END DO
-#endif
-
-  END SUBROUTINE read2d
-
-
-   SUBROUTINE read3( kunit, ptab, krec )
-   !!---------------------------------------------------------------------
-   !!                  ***  ROUTINE read3  ***
-   !!                 
-   !! ** Purpose :   Opa standard input for a 3d array
-   !!
-   !! ** Method  :   Read a binary array ( direct access FILE )
-   !!      If key_mpp is used, write with an auxilary array
-   !!
-   !! ** Action :
-   !!
-   !! History :
-   !!      original  : 93-09 (M. Imbard)
-   !!----------------------------------------------------------------------
-   !! * Arguments 
-      INTEGER , INTENT( in  ) ::   &
-         kunit           ! output unit
-      REAL(wp), INTENT(inout), DIMENSION(jpi,jpj,jpk) ::   &
-         ptab            ! variable array
-      INTEGER , INTENT( in  ) ::   &      
-         krec            ! record unit for direct access file
-
-#if defined key_mpp_mpi   ||   defined key_mpp_shmem
-      INTEGER ji, jj, jk, jproc
-      INTEGER ikloc, ikpe
-      INTEGER ilci, ilcj, iilb, ijlb
-   !!---------------------------------------------------------------------
-
-
-   ! 1. Read horizontal slab by horizontal slab
-   ! -------------------------------------------
-   ! each slab is associed with a processor
-   ! the input is read in a auxilary array
-
-      DO jk = 1, jpk
-        ikloc = 1 + (jk-1) / jpnij
-        ikpe  = 1 + MOD( jk-1, jpnij )
-        IF( narea == ikpe ) THEN
-            READ(kunit,REC=jpk*(krec-1)+jk) tabglo
-            DO jproc = 1, jpnij
-              ilci = nlcit (jproc)
-              ilcj = nlcjt (jproc)
-              iilb = nimppt(jproc)
-              ijlb = njmppt(jproc)
-              DO jj = 1, ilcj
-                DO ji = 1, ilci
-                  tabio(ji,jj,jproc,ikloc) = tabglo(ji+iilb-1,jj+ijlb-1)
-                END DO
-              END DO
-            END DO
-        ENDIF
-      END DO
-      CALL mppsync
-
-   ! 2. Scaterring of auxilary array
-   ! -------------------------------
-
-      DO jk = 1,jpk
-        ikloc = 1 + (jk-1) / jpnij
-        ikpe  = 1 + MOD( jk-1, jpnij )
-        CALL mppscatter( tabio(1,1,1,ikloc), jk, ikpe-1, ptab(1,1,jk) )
-
-   ! mask
-
-        DO jj = nlcj+1, jpj
-          DO ji = 1, nlci
-            ptab(ji,jj,jk) = 0.e0
-          END DO
-        END DO
-        DO ji = nlci+1, jpi
-          DO jj = 1, jpj
-            ptab(ji,jj,jk) = 0.e0
-          END DO
-        END DO
-      END DO
-      CALL mppsync
-
-#  else
-
-      INTEGER jk
-
-      DO jk = 1, jpk
-         READ(kunit,REC=jpk*(krec-1)+jk) tabglo
-         ptab(:,:,jk) = tabglo(:,:)
-      END DO
-#endif
-
-   END SUBROUTINE read3
-
-
-   SUBROUTINE read3d( kunit, ptab, krec )
-   !!---------------------------------------------------------------------
-   !!                  ***  ROUTINE read3D  ***
-   !!  
-   !! ** Purpose :   Opa standard input for a 3D data array
-   !!     (its possible to read only a subdomain - zoom )
-   !!
-   !! ** Method  :   Read a binary array ( direct access file )
-   !!      IF key_mpp is used, write with an auxilary array
-   !!
-   !! ** Action :
-   !!
-   !! History :
-   !!      original  : 93-09 (M. Imbard)
-   !!      additions : 98-11 (J. Vialard) vpp
-   !!----------------------------------------------------------------------
-   !! * Arguments 
-      INTEGER , INTENT( in  ) ::   &
-         kunit           ! output unit
-      REAL(wp), INTENT(inout), DIMENSION(jpi,jpj,jpk) ::   &
-         ptab            ! variable array
-      INTEGER , INTENT( in  ) ::   &      
-         krec            ! record unit for direct access file
-
-#if defined key_mpp_mpi   ||   defined key_mpp_shmem
-      INTEGER ji, jj, jk, jproc
-      INTEGER ikloc, ikpe
-      INTEGER ilci, ilcj, iilb, ijlb
-   !!---------------------------------------------------------------------
-
-
-   ! 1. Read horizontal slab by horizontal slab
-   ! -------------------------------------------
-   ! each slab is associed with a processor
-   ! the input is read in a auxilary array
-
-      DO jk = 1,jpk
-        ikloc = 1 + (jk-1) / jpnij
-        ikpe  = 1 + MOD( jk-1, jpnij )
-        IF( narea == ikpe ) THEN
-            READ(kunit,REC=jpk*(krec-1)+jk) tabdta
-            DO jproc = 1, jpnij
-              ilci = nlcit (jproc)
-              ilcj = nlcjt (jproc)
-              iilb = nimppt(jproc)
-              ijlb = njmppt(jproc)
-              DO jj = 1, ilcj
-                DO ji = 1, ilci
-                  tabio(ji,jj,jproc,ikloc) = tabdta(ji+jpizoom-1+iilb-1,jj+jpjzoom-1+ijlb-1)
-                END DO
-              END DO
-            END DO
-        ENDIF
-      END DO
-      CALL mppsync
-
-   ! 2. Scaterring of auxilary array
-   ! -------------------------------
-
-      DO jk = 1, jpk
-         ikloc = 1 + (jk-1) / jpnij
-         ikpe  = 1 + MOD( jk-1, jpnij )
-         CALL mppscatter( tabio(1,1,1,ikloc), jk, ikpe-1, ptab(1,1,jk) )
-
-   ! mask
-
-         DO jj = nlcj+1, jpj
-            DO ji = 1,nlci
-               ptab(ji,jj,jk) = 0.e0
-            END DO
-         END DO
-         DO ji = nlci+1, jpi
-            ptab(ji,:,jk) = 0.e0
-         END DO
-      END DO
-      CALL mppsync
-
-#  else
-
-      INTEGER ji, jj, jk
-
-      DO jk = 1, jpk
-         READ(kunit,REC=jpk*(krec-1)+jk) tabdta
-         DO jj = 1, jpj
-            DO ji = 1, jpi
-               ptab(ji,jj,jk) = tabdta( mig(ji), mjg(jj) )
-            END DO
-         END DO
-      END DO
-#endif
-
-   END SUBROUTINE read3d
-
-
-   SUBROUTINE write2( kunit, ptab, kdim, krec )
-   !!---------------------------------------------------------------------
-   !!                  ***  ROUTINE write2  ***
-   !!
-   !! ** Purpose :   OPA standard output for a 2D array
-   !!
-   !! ** Method  :   write a binary array
-   !!      If key_mpp is used, write with an auxilary array
-   !!
-   !! History :
-   !!       original  : 93-09 (M. Imbard)
-   !!       additions : 96-05 (J. Escobar)
-   !!----------------------------------------------------------------------
-   !! * Arguments 
-      INTEGER , INTENT( in  ) ::   &
-         kunit           ! output unit
-      REAL(wp), INTENT(inout), DIMENSION(jpi,jpj) ::   &
-         ptab            ! variable array
-      INTEGER , INTENT( in  ) ::   &      
-         kdim ,       &  ! record length
-         krec            ! record unit for direct access file
-
-#if defined key_mpp_mpi   ||   defined key_mpp_shmem
-      INTEGER ji,jj,jproc
-      INTEGER ildi,ilei,ildj,ilej
-      INTEGER iilb,ijlb
-   !!---------------------------------------------------------------------
-
-
-      tabglo(:,:) = 0.e0
-
-   ! 1. Receive of each subdomain array
-   ! ----------------------------------
-   ! processor position dependance
-   ! the main processor 0 receive each contribution
-
-      CALL mppgather( ptab, 1, 0, tabio )
-      CALL mppsync
-
-
-   ! 2. Write
-   ! --------
-
-   ! only the main processor
-
-      IF( narea == 1 ) THEN
-
-   !  write in an global auxilary array
-         DO jproc = 1, jpnij
-            ildi = nldit (jproc)   
-            ilei = nleit (jproc)   
-            ildj = nldjt (jproc)   
-            ilej = nlejt (jproc)   
-            iilb = nimppt(jproc)
-            ijlb = njmppt(jproc)
-            DO jj = ildj, ilej
-               DO ji = ildi, ilei
-                  tabglo(ji+iilb-1,jj+ijlb-1) = tabio(ji,jj,jproc,1)
-               END DO
-            END DO
-         END DO
-
-   ! global periodicity
-         IF( jperio == 1 ) THEN
-            tabglo(  1   ,:) = tabglo(jpiglo-1,:)
-            tabglo(jpiglo,:) = tabglo(   2    ,:)
-         ENDIF
-
-   ! write
-          WRITE(kunit,REC=kdim*(krec-1)+1) tabglo
-
-      ENDIF
-
-      CALL mppsync
-
-#  else
-      WRITE(kunit,REC=kdim*(krec-1)+1) ptab
-#endif
-
-   END SUBROUTINE write2
-
-
-   SUBROUTINE write3( kunit, ptab, krec )
-   !!---------------------------------------------------------------------
-   !!                  ***  ROUTINE write3  ***
-   !!             
-   !! ** Purpose :   OPA standard output for a 3D array
-   !!
-   !! ** Method  :   write a binary array
-   !!      If key_mpp is used, write with an auxilary array
-   !!
-   !! ** Action :
-   !!
-   !! History :
-   !!       original  : 93-09 (M. Imbard)
-   !!       additions : 96-05 (J. Escobar)
-   !!----------------------------------------------------------------------
-   !! * Arguments 
-      INTEGER , INTENT( in  ) ::   &
-         kunit           ! output unit
-      REAL(wp), INTENT(inout), DIMENSION(jpi,jpj,jpk) ::   &
-         ptab            ! variable array
-      INTEGER , INTENT( in  ) ::   &      
-         krec            ! record unit for direct access file
-
-#if defined key_mpp_mpi   ||   defined key_mpp_shmem
-      INTEGER ji,jj,jk,jproc
-      INTEGER ikloc,ikpe
-      INTEGER ildi,ilei,ildj,ilej
-      INTEGER iilb,ijlb
-   !!---------------------------------------------------------------------
-
-      tabglo(:,:) = 0.e0
-
-
-   ! 1. Receive of each subdomain array
-   ! ----------------------------------
-   ! processor position dependance
-   ! each processor receive the vertical slab which is attributed to it
-
-      DO jk = 1, jpk
-         ikloc = 1 + (jk-1) / jpnij
-         ikpe  = 1 + MOD( jk-1, jpnij )
-         CALL mppgather( ptab(1,1,jk), jk, ikpe-1, tabio(1,1,1,ikloc) )
-      END DO
-      CALL mppsync
-
-
-   ! 2. Write horizontal slab by horizontal slab
-   ! -------------------------------------------
-
-      DO jk = 1, jpk
-         ikloc = 1 + (jk-1) / jpnij
-         ikpe  = 1 + MOD( jk-1, jpnij )
-         IF( narea == ikpe ) THEN
-
-   !  write in an global auxilary array
-
-            DO jproc = 1, jpnij
-               ildi = nldit (jproc)   
-               ilei = nleit (jproc)   
-               ildj = nldjt (jproc)   
-               ilej = nlejt (jproc)   
-               iilb = nimppt(jproc)
-               ijlb = njmppt(jproc)
-               DO jj = ildj,ilej
-                  DO ji = ildi,ilei
-                     tabglo(ji+iilb-1,jj+ijlb-1) = tabio(ji,jj,jproc,ikloc)
-                  END DO
-               END DO
-            END DO
-
-   ! global periodicity
-
-            IF( jperio == 1 ) THEN
-               tabglo(  1   ,:) = tabglo(jpiglo-1,:)
-               tabglo(jpiglo,:) = tabglo(   2    ,:)
-            ENDIF
-
-   ! write
-
-            WRITE(kunit,REC=jpk*(krec-1)+jk) tabglo
-        ENDIF
-      END DO
-      CALL mppsync
-
-#  else
-
-      INTEGER  ::   ji,jj,jk
-      REAL(wp) ::   ztab(jpi,jpj)
-
-      DO jk = 1,jpk
-         ztab(:,:) = ptab(:,:,jk)
-         WRITE(kunit,REC=jpk*(krec-1)+jk) ztab
-      END DO
-#endif
-
-      END SUBROUTINE write3
-
-
-      SUBROUTINE write4( kunit, ptab, krec )
-   !!---------------------------------------------------------------------
-   !!                  ***  ROUTINE write4  ***
-   !!        
-   !! ** Purpose :   OPA ieee 4 bytes output for a 3D array
-   !!
-   !! ** Method  :   write a binary array
-   !!      If key_mpp is used, write with an auxilary array
-   !!
-   !! History :
-   !!       original  : 93-09 (M. Imbard)
-   !!       additions : 96-05 (J. Escobar)
-   !!      additions : 98-11 (J. Vialard) vpp
-   !!----------------------------------------------------------------------
-   !! * Arguments
-      INTEGER , INTENT( in  ) ::   &
-         kunit,       &  ! output unit
-         krec            ! record unit for direct access file
-      REAL(wp), INTENT(inout), DIMENSION(jpi,jpj,jpk) ::   &
-         ptab            ! variable array
-
-#if defined key_mpp_mpi   ||   defined key_mpp_shmem
-   !! * Local declarations
-      INTEGER jk, jproc
-      INTEGER ikloc, ikpe
-      INTEGER ildi,ilei,ildj,ilej
-      INTEGER iilb,ijlb
-   !!---------------------------------------------------------------------
-
-      tabglo(:,:) = 0.e0
-
-
-   ! 1. Receive of each subdomain array
-   ! ----------------------------------
-   ! processor position dependance
-   ! each processor receive the vertical slab which is attributed to it
-
-      DO jk = 1, jpk
-         ikloc = 1 + (jk-1) / jpnij
-         ikpe  = 1 + MOD( jk-1, jpnij )
-         CALL mppgather( ptab(1,1,jk), jk, ikpe-1, tabio(1,1,1,ikloc) )
-      END DO
-      CALL mppsync
-
-
-   ! 2. Write horizontal slab by horizontal slab
-   ! -------------------------------------------
-
-      DO jk = 1, jpk
-         ikloc = 1 + ( jk - 1 ) / jpnij
-         ikpe  = 1 + MOD( jk-1, jpnij )
-         IF( narea == ikpe ) THEN
-
-         ! write in an global auxilary array
-            DO jproc = 1, jpnij
-               ildi = nldit (jproc)   
-               ilei = nleit (jproc)   
-               ildj = nldjt (jproc)   
-               ilej = nlejt (jproc)   
-               iilb = nimppt(jproc)
-               ijlb = njmppt(jproc)
-               DO jj = ildj, ilej
-                  DO ji = ildi, ilei
-                     tabglo(ji+iilb-1,jj+ijlb-1) = tabio(ji,jj,jproc,ikloc)
-                  END DO
-               END DO
-            END DO
-
-         ! global periodicity
-            IF( jperio == 1 ) THEN
-               tabglo(  1   ,:) = tabglo(jpiglo-1,:)
-               tabglo(jpiglo,:) = tabglo(   2    ,:)
-            ENDIF
-
-   ! write
-            WRITE(kunit,REC=jpk*(krec-1)+jk) tabglo
-        ENDIF
-      END DO
-      CALL mppsync
-
-#  else
-
-      INTEGER jk
-      REAL(wp), DIMENSION(jpi,jpj) ::   ztab
-
-      DO jk = 1, jpk
-         ztab(:,:) = ptab(:,:,jk)
-         WRITE(kunit,REC=jpk*(krec-1)+jk) ztab
-      END DO
-#endif
-
-   END SUBROUTINE write4
-
-   !!======================================================================
-#endif
-END MODULE lib_io_fdir
Index: trunk/NEMO/OPA_SRC/mppini.F90
===================================================================
--- trunk/NEMO/OPA_SRC/mppini.F90	(revision 238)
+++ trunk/NEMO/OPA_SRC/mppini.F90	(revision 239)
@@ -481,7 +481,7 @@
 #  include "mppini_2.h90"
 
-# if defined key_fdir   ||   defined key_dimgout
-   !!----------------------------------------------------------------------
-   !!   'key_fdir' OR 'key_dimgout'                  NO use of NetCDF files
+# if defined key_dimgout
+   !!----------------------------------------------------------------------
+   !!   'key_dimgout'                  NO use of NetCDF files
    !!----------------------------------------------------------------------
    SUBROUTINE mpp_init_ioipsl       ! Dummy routine
Index: trunk/NEMO/OPA_SRC/restart.F90
===================================================================
--- trunk/NEMO/OPA_SRC/restart.F90	(revision 238)
+++ trunk/NEMO/OPA_SRC/restart.F90	(revision 239)
@@ -40,11 +40,5 @@
 CONTAINS
 
-#if defined key_fdir
-   !!----------------------------------------------------------------------
-   !!   'key_fdir'                                       direct access file
-   !!----------------------------------------------------------------------
-#  include "restart_fdir.h90"
-
-#elif  ( defined key_mpp_mpi   ||   defined key_mpp_shmem ) && defined key_dimgout
+#if  ( defined key_mpp_mpi   ||   defined key_mpp_shmem ) && defined key_dimgout
    !!----------------------------------------------------------------------
    !!   'key_mpp_mpi'     OR      MPI massively parallel processing library
Index: trunk/NEMO/OPA_SRC/restart_fdir.h90
===================================================================
--- trunk/NEMO/OPA_SRC/restart_fdir.h90	(revision 238)
+++ 	(revision )
@@ -1,227 +1,0 @@
-   SUBROUTINE rst_write( kt )
-      !!---------------------------------------------------------------------
-      !!                  ***  ROUTINE rst_write  ***
-      !!
-      !! ** Purpose :   Write restart fields in direct access format
-      !!
-      !! ** Method :   restart.output file, each nstock time step , save
-      !!      fields which are necessary for restart
-      !!
-      !! History :
-      !!        !  91-03  ()  original code
-      !!        !  91-11  (G. Madec)
-      !!        !  92-06  (M. Imbard)  correction restart file
-      !!        !  92-07  (M. Imbard)  split into diawri and rstwri
-      !!        !  98-02  (M. Guyon)  FETI method
-      !!        !  98-05  (G. Roullet)  free surface
-      !!        !  99-11  (M. Imbard)  NetCDF FORMAT with ioipsl
-      !!   8.5  !  02-08  (G. Madec)  F90: Free form
-      !!----------------------------------------------------------------------
-      !! * Arguments 
-      INTEGER, INTENT( in ) ::   kt         ! ocean time-step
-
-      !! * Local declarations
-      INTEGER ::   ino0, it0, ipcg0, isor0, itke0
-      INTEGER ::   ibloc, ilglo
-      !!----------------------------------------------------------------------
-      !!  OPA 8.5, LODYC-IPSL (2002)
-      !!----------------------------------------------------------------------
-
-      IF( kt == nit000 ) THEN
-         IF(lwp) WRITE(numout,*)
-         IF(lwp) WRITE(numout,*) 'rst_write : write restart.output direct access file'
-         IF(lwp) WRITE(numout,*) '~~~~~~~~~'
-         ibloc = 4096
-         ilglo = ibloc*((jpiglo*jpjglo*jpbyt-1 )/ibloc+1)
-         CALL ctlopn( numwrs,'restart.output', 'UNKNOWN','UNFORMATTED','DIRECT', ilglo, numout, lwp, 1 )
-      ENDIF
-
-      IF( MOD( kt, nstock ) == 0 .OR. kt == nitend ) THEN
-
-         ! 0. Initializations
-         ! ------------------
-
-         IF(lwp) THEN
-            WRITE(numout,*) '             output done in numwrs = ', numwrs,' at it= ',kt,' date= ',ndastp
-         ENDIF
-         
-         ino0  = no
-         it0   = kt
-         ipcg0 = 0
-         isor0 = 0
-         itke0 = 0
-         isor0 = nsolv - 1
-         ipcg0 = 2 - nsolv
-         IF( lk_zdftke )   itke0 = 1
-         ! FETI method
-         IF (nsolv == 3) THEN 
-            isor0 = 2
-            ipcg0 = 2
-         ENDIF
-
-         ! 1. Write in numwrs
-         ! ------------------
-         
-         IF(lwp) WRITE(numwrs,REC=1)   &                 ! first record
-            ino0, it0, isor0, ipcg0, itke0, ndastp
-         !                                               ! prognostic variables
-         CALL write3(numwrs,ub   ,2 )                       ! before fields
-         CALL write3(numwrs,vb   ,3 )
-         CALL write3(numwrs,tb   ,5 )
-         CALL write3(numwrs,sb   ,6 )
-         CALL write3(numwrs,rotb ,7 )
-         CALL write3(numwrs,hdivb,8 )
-         CALL write3(numwrs,un   ,9 )                       ! now fields
-         CALL write3(numwrs,vn   ,10)
-         CALL write3(numwrs,tn   ,12)
-         CALL write3(numwrs,sn   ,13)
-         CALL write3(numwrs,rotn ,14)
-         CALL write3(numwrs,hdivn,15)
-         CALL write2(numwrs,gcx ,jpk,17)                 ! Read elliptic solver arrays
-         CALL write2(numwrs,gcxb,jpk,18)
-#if defined key_dynspg_fsc
-         CALL write2(numwrs,sshb,jpk,4 )                 ! free surface formulation (ssh)
-         CALL write2(numwrs,sshn,jpk,11)
-#else
-         CALL write2(numwrs,bsfb,jpk,4 )                 ! Rigid-lid formulation (bsf)
-         CALL write2(numwrs,bsfn,jpk,11)
-         CALL write2(numwrs,bsfd,jpk,16)
-#endif
-         IF( lk_zdftke )   CALL write3(numwrs,en,19)     ! TKE arrays
-      ENDIF
-
-   END SUBROUTINE rst_write
-
-
-   SUBROUTINE rst_read
-      !!----------------------------------------------------------------------
-      !!                  ***  ROUTINE rst_read  ***
-      !!
-      !!----------------------------------------------------------------------
-      !! * Local declarations
-      INTEGER :: ino0, it0, ipcg0, isor0, itke0
-      INTEGER :: ino1, it1, isor1, ipcg1, itke1, idast1
-      INTEGER ::   ibloc, ilglo
-      INTEGER ::   inum            ! temporary logical unit
-      !!----------------------------------------------------------------------
-      !!  OPA 8.5, LODYC-IPSL (2002)
-      !!----------------------------------------------------------------------
-
-      ! open restart file
-      ibloc = 4096
-      ilglo = ibloc*((jpiglo*jpjglo*jpbyt-1 )/ibloc+1)
-      CALL ctlopn(inum,'restart','OLD','UNFORMATTED','DIRECT',   &
-                  ilglo,numout,lwp,1)
-      ! restart options
-      IF(nrstdt == 0) THEN
-         IF(lwp) WRITE(numout,*) ' nrstdt = 0 no control of nit000'
-      ELSE IF(nrstdt == 1) THEN
-         IF(lwp) WRITE(numout,*) ' nrstdt = 1 we control the date'
-      ELSE
-         IF(lwp) WRITE(numout,*) '  ===>>>> nrstdt not equal 0 or 1'
-         IF(lwp) WRITE(numout,*) ' =======                   ======'
-         IF(lwp) WRITE(numout,*) ' we dont control the date'
-      ENDIF
-
-
-      ! 0. Initialisations
-      ! ------------------
-      
-      ino0  = no
-      it0   = nit000
-      ipcg0 = 0
-      isor0 = 0
-      itke0 = 0
-      isor0 = nsolv-1
-      ipcg0 = 2-nsolv
-      IF( lk_zdftke ) itke0 = 1
-      ! FETI method
-      IF( nsolv == 3 ) THEN 
-          isor0=2
-          ipcg0=2
-      ENDIF
-
-      IF(lwp) THEN
-          WRITE(numout,*)
-          WRITE(numout,*) ' *** dtrlec:  beginning of restart'
-          WRITE(numout,*) ' '
-          WRITE(numout,*) ' the present run :'
-          WRITE(numout,*) '   job number : ', no 
-          WRITE(numout,*) '   with nit000 : ', nit000
-          WRITE(numout,*) '   with pcg option ipcg0 : ', ipcg0
-          WRITE(numout,*) '   with sor option isor0 : ', isor0
-          WRITE(numout,*) '   with FETI solver option ipcg0 & isor0 : ', ipcg0,' & ',isor0
-          WRITE(numout,*) '   with tke option itke0 : ', itke0
-      ENDIF
-
-      ! 1. Read inum
-      ! --------------
-
-      ! First record
-
-      READ(inum,REC=1) ino1, it1, isor1, ipcg1, itke1, idast1
-
-      IF(lwp) THEN
-         WRITE(numout,*)
-         WRITE(numout,*) ' READ inum with '
-         WRITE(numout,*) '   job number : ', ino1
-         WRITE(numout,*) '   with time step it : ', it1
-         WRITE(numout,*) '   with pcg option ipcg1 : ', ipcg1
-         WRITE(numout,*) '   with sor option isor1 : ', isor1
-         WRITE(numout,*) '   with tke option itke1 : ', itke1
-         WRITE(numout,*) '   with FETI solver option ipcg1 + isor1 : ', ipcg1 + isor1
-         WRITE(numout,*)
-      ENDIF
-
-      ! Control of date
-
-      IF( (it0-it1) /= 1 .AND. ABS(nrstdt) == 1 ) THEN
-         IF(lwp) THEN
-            WRITE(numout,*) ' ===>>>> : problem with nit000 for the restart'
-            WRITE(numout,*) ' =======                               ======='
-            WRITE(numout,*) ' we stop. verify the file'
-            WRITE(numout,*) ' or rerun with the value  0 for the'
-            WRITE(numout,*) ' control of time parameter  nrstdt'
-            WRITE(numout,*)
-         ENDIF
-         STOP 'dtrlec'
-      ENDIF
-
-      CALL read3(inum,ub   ,2 )                  ! Read prognostic variables
-      CALL read3(inum,vb   ,3 )
-      CALL read3(inum,tb   ,5 )
-      CALL read3(inum,sb   ,6 )
-      CALL read3(inum,rotb ,7 )
-      CALL read3(inum,hdivb,8 )
-      CALL read3(inum,un   ,9 )
-      CALL read3(inum,vn   ,10)
-      CALL read3(inum,tn   ,12)
-      CALL read3(inum,sn   ,13)
-      CALL read3(inum,rotn ,14)
-      CALL read3(inum,hdivn,15)
-
-      CALL read2(inum,gcx ,jpk,17)               ! Read elliptic solver arrays
-      CALL read2(inum,gcxb,jpk,18)
-
-#   if defined key_dynspg_fsc
-      CALL read2(inum,sshb ,jpk,4 )              ! free surface formulation (ssh)
-      CALL read2(inum,sshn ,jpk,11)
-#   else
-      CALL read2(inum,bsfb ,jpk,4 )              ! Rigid-lid formulation (bsf)
-      CALL read2(inum,bsfn ,jpk,11)
-      CALL read2(inum,bsfd ,jpk,16)
-#   endif
-
-      IF( lk_zdftke ) THEN
-         IF( itke1 == 1 ) THEN                   ! Read tke arrays
-            CALL read3(inum,en,19)
-         ELSE
-            IF(lwp) WRITE(numout,*) ' ===>>>> : the previous restart file didnot used  tke scheme'
-            IF(lwp) WRITE(numout,*) ' =======                ======='
-            nrstdt = 2
-         ENDIF
-      ENDIF
-
-      CLOSE( inum )
-
-   END SUBROUTINE rst_read
