Index: trunk/NEMO/OPA_SRC/SBC/ocesbc.F90
===================================================================
--- trunk/NEMO/OPA_SRC/SBC/ocesbc.F90	(revision 128)
+++ trunk/NEMO/OPA_SRC/SBC/ocesbc.F90	(revision 129)
@@ -653,5 +653,5 @@
           zemp_sais= 0.1
           zTstar   = 28.3      ! intemsity from 28.3 à -5°
-          zcos_sais = COS( (ztime - ztimemax) / (ztimemin - ztimemax) * rpi )         ! 1/2 period between 21th June and 21th December
+          zcos_sais = COS( (ztime - ztimemax) / (ztimemin - ztimemax) * rpi )    ! 1/2 period between 21th June and 21th December
           ztrp= - 40.          ! retroaction term (W/m2/K)
           zconv = 3.16e-5      ! convert 1m/yr->3.16e-5mm/s
Index: trunk/NEMO/OPA_SRC/TRD/trdvor.F90
===================================================================
--- trunk/NEMO/OPA_SRC/TRD/trdvor.F90	(revision 128)
+++ trunk/NEMO/OPA_SRC/TRD/trdvor.F90	(revision 129)
@@ -12,16 +12,15 @@
    !!----------------------------------------------------------------------
    !! * Modules used
+   USE oce             ! ocean dynamics and tracers variables
    USE dom_oce         ! ocean space and time domain variables
-
-   USE oce             ! ocean dynamics and tracers variables
-   USE trddyn_oce     ! ocean active tracer trend variables
+   USE trddyn_oce      ! ocean active tracer trend variables
    USE zdf_oce         ! ocean vertical physics
    USE in_out_manager  ! I/O manager
 
    USE phycst          ! Define parameters for the routines
-   USE ldfdyn_oce     ! ocean active tracers: lateral physics
+   USE ldfdyn_oce      ! ocean active tracers: lateral physics
    USE daymod          ! calandar
    USE dianam          ! build the name of file (routine)
-   USE ldfslp	       ! iso-neutral slopes
+   USE ldfslp          ! iso-neutral slopes
    USE zdfmxl
    USE ioipsl
@@ -30,5 +29,7 @@
    IMPLICIT NONE
    PRIVATE
-  !! * Accessibility
+
+
+   !! * Accessibility
    PUBLIC trd_vor   ! routine called by step.F90
 
@@ -37,25 +38,22 @@
 
    !! * Module variables
-
    INTEGER,PARAMETER :: jplvor=11
-
-
-   INTEGER ::   &
-      nh_t,nmoydpvor,        &  ! ???
-      nidvor,nhoridvor,    &
-      ndexvor1(jpi*jpj),ndimvor1
+   INTEGER ::                &
+      nh_t, nmoydpvor  ,     &
+      nidvor, nhoridvor,     &
+      ndexvor1(jpi*jpj),     &
+      ndimvor1              
 
    REAL(wp), DIMENSION(jpi,jpj) ::  &
-     vor_avr,    &  ! average
-     vor_avrb,   &  ! before vorticity (kt-1)
-     vor_avrbb,   &  ! vorticity at begining of the nwrite-1 timestep averaging period
-      vor_avrbn,  &  ! after vorticity at time step after the
-      rotot ! begining of the NWRITE-1 timesteps
-
-   REAL(wp), DIMENSION(jpi,jpj) ::   &
-      udpvor ,          &  ! total cumulative trends
-      vdpvor
-
-   REAL(wp), DIMENSION(jpi,jpj,jplvor)::vortrd   ! curl of trends
+     vor_avr    ,     &  ! average
+     vor_avrb   ,     &  ! before vorticity (kt-1)
+     vor_avrbb  ,     &  ! vorticity at begining of the nwrite-1 timestep averaging period
+      vor_avrbn ,     &  ! after vorticity at time step after the
+      rotot     ,     &  ! begining of the NWRITE-1 timesteps
+      udpvor    ,     &  ! total cumulative trends
+      vdpvor             ! "       "        "
+
+   REAL(wp), DIMENSION(jpi,jpj,jplvor)::   &  !: curl of trends
+      vortrd   
 
    !! * Substitutions
@@ -65,5 +63,5 @@
 
    !!----------------------------------------------------------------------
-   !!  2004 
+   !!   OPA 9.0 , LODYC-IPS (2004)
    !!----------------------------------------------------------------------
   
@@ -71,5 +69,5 @@
 
    SUBROUTINE trd_vor( kt )
-      !!-----------------------------------------vortrd-----------------------------
+      !!----------------------------------------------------------------------------
       !!                  ***  ROUTINE trd_vor  ***
       !!
@@ -152,5 +150,4 @@
          ENDIF
 
-
          ! cumulated trends array init
          nmoydpvor = 0
@@ -167,6 +164,6 @@
 
        IF( idebug /= 0 ) THEN
-         WRITE(numout,*) ' debuging trd_vor: 0. done '
-         CALL FLUSH(numout)
+          WRITE(numout,*) ' debuging trd_vor: 0. done '
+          CALL FLUSH(numout)
       ENDIF
 
@@ -183,6 +180,6 @@
       ! vertically averaged velocity
       DO jk = 1, jpk - 1
-        zun(:,:)=zun(:,:) + e1u(:,:)*un(:,:,jk)*fse3u(:,:,jk)
-        zvn(:,:)=zvn(:,:) + e2v(:,:)*vn(:,:,jk)*fse3v(:,:,jk)
+         zun(:,:)=zun(:,:) + e1u(:,:)*un(:,:,jk)*fse3u(:,:,jk)
+         zvn(:,:)=zvn(:,:) + e2v(:,:)*vn(:,:,jk)*fse3v(:,:,jk)
       END DO
 
@@ -193,11 +190,10 @@
       !Curl
       DO ji=1,jpim1
-          DO jj=1,jpjm1
- 
-               vor_avr(ji,jj)=((zvn(ji+1,jj)-zvn(ji,jj))- &
-	                      (zun(ji,jj+1)-zun(ji,jj))) &
-			      / ( e1f(ji,jj) * e2f(ji,jj) )
-                vor_avr(ji,jj)=vor_avr(ji,jj)*fmask(ji,jj,1)
-          END DO
+         DO jj=1,jpjm1
+            vor_avr(ji,jj) = ((zvn(ji+1,jj)-zvn(ji,jj))-   &
+                              (zun(ji,jj+1)-zun(ji,jj)))   &
+                             /( e1f(ji,jj) * e2f(ji,jj) )
+            vor_avr(ji,jj) = vor_avr(ji,jj)*fmask(ji,jj,1)
+         END DO
       END DO
       
@@ -212,5 +208,5 @@
       !  =================================
 
-#include "trdvor_ncinit.h90"
+#     include "trdvor_ncinit.h90"
 
       IF( idebug /= 0 ) THEN
@@ -219,84 +215,81 @@
       ENDIF
       
-     !  =====================================
-     !  III vertical integration of 3D trends
-     !  =====================================
-   ! Beta.V : intergration, no average
-   utrd(:,:,:,9)=utrd(:,:,:,4)
-   vtrd(:,:,:,9)=vtrd(:,:,:,4)
-
-   DO jl=1,jplvor
-
-      udpvor(:,:)=0
-      vdpvor(:,:)=0
-	
-      !bottom friction
-      IF(jl==jplvor) THEN
+      !  =====================================
+      !  III vertical integration of 3D trends
+      !  =====================================
+      ! Beta.V : intergration, no average
+      utrd(:,:,:,9)=utrd(:,:,:,4)
+      vtrd(:,:,:,9)=vtrd(:,:,:,4)
+
+      DO jl=1,jplvor
+
+         udpvor(:,:)=0
+         vdpvor(:,:)=0
+
+         !bottom friction
+         IF( jl == jplvor ) THEN
         
-        call lbc_lnk( tautrd(:,:,3),  'U' , -1. )
-        call lbc_lnk( tautrd(:,:,4),  'V' , -1. )
-
-        DO jj = 2, jpjm1
-         DO ji = fs_2, fs_jpim1 
-
-	  ikbu   = min( mbathy(ji+1,jj), mbathy(ji,jj) )
-          ikbum1 = max( ikbu-1, 1 )
-          ikbv   = min( mbathy(ji,jj+1), mbathy(ji,jj) )
-          ikbvm1 = max( ikbv-1, 1 )
-          
-	  udpvor(ji,jj)=tautrd(ji,jj,3)*fse3u(ji,jj,ikbum1)*e1u(ji,jj)*umask(ji,jj,ikbum1)
-          vdpvor(ji,jj)=tautrd(ji,jj,4)*fse3v(ji,jj,ikbvm1)*e2v(ji,jj)*vmask(ji,jj,ikbvm1)
+            CALL lbc_lnk( tautrd(:,:,3),  'U' , -1. )
+            CALL lbc_lnk( tautrd(:,:,4),  'V' , -1. )
+
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1 
+                  ikbu   = min( mbathy(ji+1,jj), mbathy(ji,jj) )
+                  ikbum1 = max( ikbu-1, 1 )
+                  ikbv   = min( mbathy(ji,jj+1), mbathy(ji,jj) )
+                  ikbvm1 = max( ikbv-1, 1 )
+               
+                  udpvor(ji,jj)=tautrd(ji,jj,3)*fse3u(ji,jj,ikbum1)*e1u(ji,jj)*umask(ji,jj,ikbum1)
+                  vdpvor(ji,jj)=tautrd(ji,jj,4)*fse3v(ji,jj,ikbvm1)*e2v(ji,jj)*vmask(ji,jj,ikbvm1)
+               END DO
+            END DO
+
+         !wind stress
+         ELSE IF( jl == (jplvor-1) ) THEN
+
+            CALL lbc_lnk( tautrd(:,:,1),  'U' , -1. )
+            CALL lbc_lnk( tautrd(:,:,2),  'V' , -1. )
+
+            udpvor(:,:)=tautrd(:,:,1)*fse3u(:,:,1)*e1u(:,:)*umask(:,:,1)
+            vdpvor(:,:)=tautrd(:,:,2)*fse3v(:,:,1)*e2v(:,:)*vmask(:,:,1)
+
+         ELSE
+
+            CALL lbc_lnk( utrd(:,:,:,jl), 'U' , -1. )
+            CALL lbc_lnk( vtrd(:,:,:,jl), 'V' , -1. )
+
+            !utrd and vtrd terms
+            DO jk = 1,jpk
+              udpvor(:,:)=udpvor(:,:)+utrd(:,:,jk,jl)*fse3u(:,:,jk)*e1u(:,:)*umask(:,:,jk)
+              vdpvor(:,:)=vdpvor(:,:)+vtrd(:,:,jk,jl)*fse3v(:,:,jk)*e2v(:,:)*vmask(:,:,jk)
+            END DO
+
+         ENDIF
+
+         !average except for Beta.V
+         IF (jl/=9) THEN
+         udpvor(:,:) = udpvor(:,:) * hur(:,:)
+         vdpvor(:,:) = vdpvor(:,:) * hvr(:,:)
+         ENDIF
+   
+         !Curl
+         DO ji=1,jpim1
+            DO jj=1,jpjm1
+               vortrd(ji,jj,jl)=( vdpvor(ji+1,jj)-vdpvor(ji,jj)       &
+                                - ( udpvor(ji,jj+1)-udpvor(ji,jj) ) ) &
+                                / ( e1f(ji,jj) * e2f(ji,jj) )
+            END DO
          END DO
-	END DO
-
-      !wind stress
-      ELSE IF(jl==(jplvor-1)) THEN
-
-        call lbc_lnk( tautrd(:,:,1),  'U' , -1. )
-        call lbc_lnk( tautrd(:,:,2),  'V' , -1. )
-
-        udpvor(:,:)=tautrd(:,:,1)*fse3u(:,:,1)*e1u(:,:)*umask(:,:,1)
-        vdpvor(:,:)=tautrd(:,:,2)*fse3v(:,:,1)*e2v(:,:)*vmask(:,:,1)
-      
-      ELSE
-
-      call lbc_lnk( utrd(:,:,:,jl), 'U' , -1. )
-      call lbc_lnk( vtrd(:,:,:,jl), 'V' , -1. )
-
-      !utrd and vtrd terms
-      DO jk = 1,jpk
-        udpvor(:,:)=udpvor(:,:)+utrd(:,:,jk,jl)*fse3u(:,:,jk)*e1u(:,:)*umask(:,:,jk)
-        vdpvor(:,:)=vdpvor(:,:)+vtrd(:,:,jk,jl)*fse3v(:,:,jk)*e2v(:,:)*vmask(:,:,jk)
+   
+         vortrd(:,:,9)=vortrd(:,:,9)*hur(:,:)
+   
+         !surface mask
+         DO ji=1,jpi
+            DO jj=1,jpj
+               vortrd(ji,jj,jl)=vortrd(ji,jj,jl)*fmask(ji,jj,1) !surface mask
+            END DO
+         END DO
+   
       END DO
-
-      ENDIF
-
-      !average except for Beta.V
-      IF (jl/=9) THEN
-      udpvor(:,:) = udpvor(:,:) * hur(:,:)
-      vdpvor(:,:) = vdpvor(:,:) * hvr(:,:)
-      ENDIF
-
-      !Curl
-      DO ji=1,jpim1
-        DO jj=1,jpjm1
-
-           vortrd(ji,jj,jl)=(vdpvor(ji+1,jj)-vdpvor(ji,jj) &
-                          - (udpvor(ji,jj+1)-udpvor(ji,jj))) &
-			  / ( e1f(ji,jj) * e2f(ji,jj) )
-
-        END DO
-      END DO
-
-    vortrd(:,:,9)=vortrd(:,:,9)*hur(:,:)
-
-   !surface mask
-      DO ji=1,jpi
-         DO jj=1,jpj
-              vortrd(ji,jj,jl)=vortrd(ji,jj,jl)*fmask(ji,jj,1) !surface mask
-         END DO
-      END DO
-
-   END DO
 
       IF( idebug /= 0 ) THEN
@@ -321,5 +314,4 @@
       ENDIF
 
-
       ! IV.2 cumulated trends over analysis period (kt=2 to nwrite)
       ! ----------------------
@@ -329,7 +321,7 @@
          nmoydpvor = nmoydpvor + 1
          DO jl = 1, jplvor
-		IF (jl/=9) THEN
- 	    rotot(:,:) = rotot(:,:) + vortrd(:,:,jl)
-		ENDIF
+            IF( jl /= 9 ) THEN
+               rotot(:,:) = rotot(:,:) + vortrd(:,:,jl)
+            ENDIF
          END DO
       ENDIF
@@ -339,6 +331,4 @@
          CALL FLUSH(numout)
       ENDIF
-
-
 
       !  =============================================
@@ -352,19 +342,17 @@
 
          vor_avrtot(:,:) = ( vor_avr(:,:) - vor_avrbn(:,:) + vor_avrb(:,:) - &
-	                     vor_avrbb(:,:) ) /  (zmean * 2. * rdt)
-
-         IF(idebug /= 0) THEN
-            WRITE(numout,*) ' zmean = ',zmean
-            WRITE(numout,*) ' debuging trd_vor: V.1 done'
-            CALL FLUSH(numout)
-         ENDIF
-
+                             vor_avrbb(:,:) ) /  (zmean * 2. * rdt)
+
+         IF( idebug /= 0 ) THEN
+             WRITE(numout,*) ' zmean = ',zmean
+             WRITE(numout,*) ' debuging trd_vor: V.1 done'
+             CALL FLUSH(numout)
+         ENDIF
 
          ! V.2 compute residual
          ! ---------------------
-
          vor_avrres(:,:) = vor_avrtot(:,:) - rotot(:,:) / zmean
-	  ! Boundary conditions
-
+
+         ! Boundary conditions
          CALL lbc_lnk( vor_avrtot, 'F', 1. )
          CALL lbc_lnk( vor_avrres, 'F', 1. )
@@ -374,5 +362,4 @@
             CALL FLUSH(numout)
          ENDIF
-
 
          ! V.3 time evolution array swap
@@ -386,5 +373,5 @@
          ENDIF
 
-          nmoydpvor=0
+         nmoydpvor=0
 
       ENDIF
@@ -394,5 +381,4 @@
       IF( kt >=  nit000+1 ) THEN
 
-
 #include "trdvor_ncwrite.h90"
 
@@ -404,12 +390,11 @@
       ENDIF
 
-IF( MOD( kt - nit000+1, ntrd ) == 0 ) THEN
-          rotot(:,:)=0
-ENDIF
+      IF( MOD( kt - nit000+1, ntrd ) == 0 ) THEN
+         rotot(:,:)=0
+      ENDIF
 
       IF( kt == nitend )  THEN
- CALL histclo( nidvor )
-!CLOSE(99)
-	ENDIF
+         CALL histclo( nidvor )
+      ENDIF
 
    END SUBROUTINE trd_vor
@@ -422,5 +407,5 @@
 CONTAINS
    SUBROUTINE trd_vor( kt )        ! Empty routine
-      WRITE(*,*) kt
+      WRITE(*,*) 'trd_vor: You should not have seen this print! error?', kt
    END SUBROUTINE trd_vor
 #endif
@@ -428,12 +413,2 @@
    !!======================================================================
 END MODULE trdvor
-
-
-
-
-
-
-
-
-
-
Index: trunk/NEMO/OPA_SRC/TRD/trdvor_ncinit.h90
===================================================================
--- trunk/NEMO/OPA_SRC/TRD/trdvor_ncinit.h90	(revision 128)
+++ trunk/NEMO/OPA_SRC/TRD/trdvor_ncinit.h90	(revision 129)
@@ -2,5 +2,4 @@
       ! II.1 Define frequency of output and means
       ! -----------------------------------------
-
 #if defined key_diainstant
       zsto = nwrite*rdt
@@ -13,55 +12,49 @@
 
       IF( kt == nit000 ) THEN
-
          IF(lwp) WRITE (numout,*) ' Diavor: netCDF initialization'
 
          ! II.2 Compute julian date from starting date of the run
          ! ------------------------
-
          CALL ymds2ju( nyear, nmonth, nday, 0.e0, zjulian )
          IF (lwp) WRITE(numout,*)' '  
-         IF (lwp) WRITE(numout,*)' Date 0 used :',nit000   &
+         IF (lwp) WRITE(numout,*)' Date 0 used :',nit000         &
               ,' YEAR ', nyear,' MONTH ', nmonth,' DAY ', nday   &
               ,'Julian day : ', zjulian
 
-
          ! II.3 Define the T grid trend file (nidvor)
          ! ---------------------------------
-
          CALL dia_nam( clhstnam, ntrd, 'vort' )                  ! filename
          IF(lwp) WRITE(numout,*) ' Name of NETCDF file ', clhstnam
          CALL histbeg( clhstnam, jpi, glamf, jpj, gphif,1, jpi,   &  ! Horizontal grid : glamt and gphit
-              1, jpj, 0, zjulian, rdt, nh_t, nidvor)
+            &          1, jpj, 0, zjulian, rdt, nh_t, nidvor)
          CALL wheneq( jpi*jpj, fmask, 1, 1., ndexvor1, ndimvor1 )    ! surface
-         
 
          ! Declare output fields as netCDF variables
-
-         CALL histdef( nidvor, "sovortPh", cvort//"grad Ph" , "s-2",   & ! grad Ph
-           & jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout)
-         CALL histdef( nidvor, "sovortEk", cvort//"Energy", "s-2",   & ! Energy
-           & jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout)
+         CALL histdef( nidvor, "sovortPh", cvort//"grad Ph" , "s-2",        & ! grad Ph
+            &          jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout)
+         CALL histdef( nidvor, "sovortEk", cvort//"Energy", "s-2",          & ! Energy
+            &          jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout)
          CALL histdef( nidvor, "sovozeta", cvort//"rel vorticity", "s-2",   & ! rel vorticity
-           & jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout)
-         CALL histdef( nidvor, "sovortif", cvort//"coriolis", "s-2",   & ! coriolis
-           & jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout)
-         CALL histdef( nidvor, "sovodifl", cvort//"lat diff ", "s-2",   & ! lat diff
-           & jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout)
-         CALL histdef( nidvor, "sovoadvv", cvort//"vert adv", "s-2",   & ! vert adv
-           & jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout)
-         CALL histdef( nidvor, "sovodifv", cvort//"vert diff" , "s-2",   & ! vert diff
-           & jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout)
-         CALL histdef( nidvor, "sovortPs", cvort//"grad Ps", "s-2",   & ! grad Ps
-           & jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout)
-         CALL histdef( nidvor, "sovortbv", cvort//"Beta V", "s-2",   & ! beta.V
-           & jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout)
-         CALL histdef( nidvor, "sovowind", cvort//"wind stress", "s-2",   & ! wind stress
-           & jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout)
-         CALL histdef( nidvor, "sovobfri", cvort//"bottom friction", "s-2",   & ! bottom friction
-           & jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout)
-         CALL histdef( nidvor, "1st_mbre", cvort//"1st mbre", "s-2",   & !First membre
-           & jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout)
-         CALL histdef( nidvor, "sovorgap", cvort//"gap", "s-2",   & !gap between 1st and 2 nd mbre
-           & jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout)
+            &          jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout)
+         CALL histdef( nidvor, "sovortif", cvort//"coriolis", "s-2",        & ! coriolis
+            &          jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout)
+         CALL histdef( nidvor, "sovodifl", cvort//"lat diff ", "s-2",       & ! lat diff
+            &          jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout)
+         CALL histdef( nidvor, "sovoadvv", cvort//"vert adv", "s-2",        & ! vert adv
+            &          jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout)
+         CALL histdef( nidvor, "sovodifv", cvort//"vert diff" , "s-2",      & ! vert diff
+            &          jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout)
+         CALL histdef( nidvor, "sovortPs", cvort//"grad Ps", "s-2",         & ! grad Ps
+            &          jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout)
+         CALL histdef( nidvor, "sovortbv", cvort//"Beta V", "s-2",          & ! beta.V
+            &          jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout)
+         CALL histdef( nidvor, "sovowind", cvort//"wind stress", "s-2",     & ! wind stress
+            &          jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout)
+         CALL histdef( nidvor, "sovobfri", cvort//"bottom friction", "s-2", & ! bottom friction
+            &          jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout)
+         CALL histdef( nidvor, "1st_mbre", cvort//"1st mbre", "s-2",        & ! First membre
+            &          jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout)
+         CALL histdef( nidvor, "sovorgap", cvort//"gap", "s-2",             & ! gap between 1st and 2 nd mbre
+            &          jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout)
          CALL histend( nidvor )
 
Index: trunk/NEMO/OPA_SRC/TRD/trdvor_ncwrite.h90
===================================================================
--- trunk/NEMO/OPA_SRC/TRD/trdvor_ncwrite.h90	(revision 128)
+++ trunk/NEMO/OPA_SRC/TRD/trdvor_ncwrite.h90	(revision 129)
@@ -2,18 +2,16 @@
       it= kt-nit000+1
       IF( lwp .AND. MOD( kt, ntrd ) == 0 ) THEN
-
          WRITE(numout,*) '     diavor : write NetCDF fields'
       ENDIF
-
  
-      CALL histwrite( nidvor,"sovortPh",it,vortrd(:,:,1),ndimvor1,ndexvor1) ! grad Ph
-      CALL histwrite( nidvor,"sovortEk",it,vortrd(:,:,2),ndimvor1,ndexvor1) ! Energy
-      CALL histwrite( nidvor,"sovozeta",it,vortrd(:,:,3),ndimvor1,ndexvor1) ! rel vorticity
-      CALL histwrite( nidvor,"sovortif",it,vortrd(:,:,4),ndimvor1,ndexvor1) ! coriolis
-      CALL histwrite( nidvor,"sovodifl",it,vortrd(:,:,5),ndimvor1,ndexvor1) ! lat diff
-      CALL histwrite( nidvor,"sovoadvv",it,vortrd(:,:,6),ndimvor1,ndexvor1) ! vert adv
-      CALL histwrite( nidvor,"sovodifv",it,vortrd(:,:,7),ndimvor1,ndexvor1) ! vert diff
-      CALL histwrite( nidvor,"sovortPs",it,vortrd(:,:,8),ndimvor1,ndexvor1) ! grad Ps
-      CALL histwrite( nidvor,"sovortbv",it,vortrd(:,:,9),ndimvor1,ndexvor1) ! beta.V
+      CALL histwrite( nidvor,"sovortPh",it,vortrd(:,:,1),ndimvor1,ndexvor1)  ! grad Ph
+      CALL histwrite( nidvor,"sovortEk",it,vortrd(:,:,2),ndimvor1,ndexvor1)  ! Energy
+      CALL histwrite( nidvor,"sovozeta",it,vortrd(:,:,3),ndimvor1,ndexvor1)  ! rel vorticity
+      CALL histwrite( nidvor,"sovortif",it,vortrd(:,:,4),ndimvor1,ndexvor1)  ! coriolis
+      CALL histwrite( nidvor,"sovodifl",it,vortrd(:,:,5),ndimvor1,ndexvor1)  ! lat diff
+      CALL histwrite( nidvor,"sovoadvv",it,vortrd(:,:,6),ndimvor1,ndexvor1)  ! vert adv
+      CALL histwrite( nidvor,"sovodifv",it,vortrd(:,:,7),ndimvor1,ndexvor1)  ! vert diff
+      CALL histwrite( nidvor,"sovortPs",it,vortrd(:,:,8),ndimvor1,ndexvor1)  ! grad Ps
+      CALL histwrite( nidvor,"sovortbv",it,vortrd(:,:,9),ndimvor1,ndexvor1)  ! beta.V
       CALL histwrite( nidvor,"sovowind",it,vortrd(:,:,10),ndimvor1,ndexvor1) ! wind stress
       CALL histwrite( nidvor,"sovobfri",it,vortrd(:,:,11),ndimvor1,ndexvor1) ! bottom friction
