Index: branches/2011/dev_CMCC/DOC/TexFiles/Biblio/Biblio.bib
===================================================================
--- branches/2011/dev_CMCC/DOC/TexFiles/Biblio/Biblio.bib	(revision 3031)
+++ branches/2011/dev_CMCC/DOC/TexFiles/Biblio/Biblio.bib	(revision 3032)
@@ -722,4 +722,16 @@
   year = {2000},
   pages = {237--313}
+}
+
+
+@ARTICLE{Dobricic_al_OS07,
+  author = {S. Dobricic and N. Pinardi and M. Adani and M. Tonani and 
+            C. Fratianni and A. Bonazzi and V. Fernandez},
+  title = {Daily oceanographic analysis by the Mediterranean basin scale 
+           assimilation system},
+  journal = OS,
+  year = {2007},
+  volume = {3},
+  pages = {149-157}
 }
 
@@ -2485,4 +2497,14 @@
   volume = {359},
   pages = {123--129}
+}
+
+@ARTICLE{Talagrand_JAS72,
+  author = {O. Talagrand},
+  title = {On the damping of high-frequency motions in four-dimensional 
+           assimilation of meteorological data},
+  journal = JAS,
+  year = {1972},
+  volume = {29},
+  pages = {1571-1574}
 }
 
Index: branches/2011/dev_CMCC/DOC/TexFiles/Chapters/Chap_ASM.tex
===================================================================
--- branches/2011/dev_CMCC/DOC/TexFiles/Chapters/Chap_ASM.tex	(revision 3031)
+++ branches/2011/dev_CMCC/DOC/TexFiles/Chapters/Chap_ASM.tex	(revision 3032)
@@ -86,4 +86,39 @@
 
 %==========================================================================
+% Divergence damping description %%%
+\section{Divergence damping initialisation}
+\label{ASM_details}
+
+The velocity increments may be initialized by the iterative application of 
+a divergence damping operator. In iteration step $n$ new estimates of 
+velocity increments $u^{n}_I$ and $v^{n}_I$ are updated by:
+\begin{equation} \label{eq:asm_dmp}
+\left\{ \begin{aligned}
+ u^{n}_I = u^{n-1}_I + \frac{1}{e_{1u} } \delta _{i+1/2} \left( {A_D
+\;\chi^{n-1}_I } \right) \\
+\\
+ v^{n}_I = v^{n-1}_I + \frac{1}{e_{2v} } \delta _{j+1/2} \left( {A_D
+\;\chi^{n-1}_I } \right) \\
+\end{aligned} \right,
+\end{equation}
+where
+\begin{equation} \label{eq:asm_div}
+\chi^{n-1}_I = \frac{1}{e_{1t}\,e_{2t}\,e_{3t} }
+                \left( {\delta _i \left[ {e_{2u}\,e_{3u}\,u^{n-1}_I} \right]
+                       +\delta _j \left[ {e_{1v}\,e_{3v}\,v^{n-1}_I} \right]} \right).
+\end{equation}
+By the application of \eqref{eq:asm_dmp} and \eqref{eq:asm_dmp} the divergence is filtered
+in each iteration, and the vorticity is left unchanged. In the presence of coastal boundaries
+with zero velocity increments perpendicular to the coast the divergence is strongly damped.
+This type of the initialisation reduces the vertical velocity magnitude  and alleviates the
+problem of the excessive unphysical vertical mixing in the first steps of the model 
+integration \citep{Talagrand_JAS72, Dobricic_al_OS07}. Diffusion coefficients are defined as 
+$A_D = \alpha e_{1t} e_{2t}$, where $\alpha = 0.2$. The divergence damping is activated by
+assigning to \textit{ndivdmp} in the \textit{nam\_asminc} namelist a value greater than zero. 
+By choosing this value to be of the order of 100 the increments in the vertical velocity will 
+be significantly reduced.
+
+
+%==========================================================================
 
 \section{Implementation details}
Index: branches/2011/dev_CMCC/DOC/TexFiles/Namelist/namasm
===================================================================
--- branches/2011/dev_CMCC/DOC/TexFiles/Namelist/namasm	(revision 3031)
+++ branches/2011/dev_CMCC/DOC/TexFiles/Namelist/namasm	(revision 3032)
@@ -17,3 +17,4 @@
     ln_salfix = .false.    !  Logical switch for ensuring that the sa > salfixmin
     salfixmin = -9999      !  Minimum salinity after applying the increments
+    ndivdmp   = 0          !  Number of iterations of divergence damping operator
 /
Index: branches/2011/dev_CMCC/NEMOGCM/CONFIG/GYRE/EXP00/namelist
===================================================================
--- branches/2011/dev_CMCC/NEMOGCM/CONFIG/GYRE/EXP00/namelist	(revision 3031)
+++ branches/2011/dev_CMCC/NEMOGCM/CONFIG/GYRE/EXP00/namelist	(revision 3032)
@@ -862,3 +862,4 @@
     ln_salfix = .false.    !  Logical switch for ensuring that the sa > salfixmin
     salfixmin = -9999      !  Minimum salinity after applying the increments
-/
+    ndivdmp   = 0          !  Number of iterations of divergence damping operator
+/
Index: branches/2011/dev_CMCC/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/namelist
===================================================================
--- branches/2011/dev_CMCC/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/namelist	(revision 3031)
+++ branches/2011/dev_CMCC/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/namelist	(revision 3032)
@@ -862,3 +862,4 @@
     ln_salfix = .false.    !  Logical switch for ensuring that the sa > salfixmin
     salfixmin = -9999      !  Minimum salinity after applying the increments
-/
+    ndivdmp   = 0          !  Number of iterations of divergence damping operator
+/
Index: branches/2011/dev_CMCC/NEMOGCM/CONFIG/ORCA2_OFF_PISCES/EXP00/namelist
===================================================================
--- branches/2011/dev_CMCC/NEMOGCM/CONFIG/ORCA2_OFF_PISCES/EXP00/namelist	(revision 3031)
+++ branches/2011/dev_CMCC/NEMOGCM/CONFIG/ORCA2_OFF_PISCES/EXP00/namelist	(revision 3032)
@@ -877,3 +877,4 @@
     ln_salfix = .false.    !  Logical switch for ensuring that the sa > salfixmin
     salfixmin = -9999      !  Minimum salinity after applying the increments
-/
+    ndivdmp   = 0          !  Number of iterations of divergence damping operator
+/
Index: branches/2011/dev_CMCC/NEMOGCM/CONFIG/POMME/EXP00/namelist
===================================================================
--- branches/2011/dev_CMCC/NEMOGCM/CONFIG/POMME/EXP00/namelist	(revision 3031)
+++ branches/2011/dev_CMCC/NEMOGCM/CONFIG/POMME/EXP00/namelist	(revision 3032)
@@ -867,3 +867,4 @@
     ln_salfix = .false.    !  Logical switch for ensuring that the sa > salfixmin
     salfixmin = -9999      !  Minimum salinity after applying the increments
-/
+    ndivdmp   = 0          !  Number of iterations of divergence damping operator
+/
Index: branches/2011/dev_CMCC/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90
===================================================================
--- branches/2011/dev_CMCC/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90	(revision 3031)
+++ branches/2011/dev_CMCC/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90	(revision 3032)
@@ -25,4 +25,5 @@
    USE oce              ! Dynamics and active tracers defined in memory
    USE divcur           ! Horizontal divergence and relative vorticity
+   USE ldfdyn_oce       ! ocean dynamics: lateral physics
    USE eosbn2           ! Equation of state - in situ and potential density
    USE zpshde           ! Partial step : Horizontal Derivative
@@ -55,4 +56,5 @@
    LOGICAL, PUBLIC :: ln_sshinc = .FALSE. !: No sea surface height assimilation increment
    LOGICAL, PUBLIC :: ln_salfix = .FALSE. !: Apply minimum salinity check
+   INTEGER, PUBLIC ::   ndivdmp = 0       !: Apply divergence damping filter ndivdmp times
 
    REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE ::   t_bkg   , s_bkg      !: Background temperature and salinity
@@ -76,4 +78,9 @@
    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::   ssh_bkg, ssh_bkginc   ! Background sea surface height and its increment
 
+   !! * Substitutions
+#  include "domzgr_substitute.h90"
+#  include "ldfdyn_substitute.h90"
+#  include "vectopt_loop_substitute.h90"
+
    !!----------------------------------------------------------------------
    !! NEMO/OPA 3.3 , NEMO Consortium (2010)
@@ -93,4 +100,9 @@
       !! ** Action  : 
       !!----------------------------------------------------------------------
+      !!
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released, wrk_2d_1
+      USE wrk_nemo, ONLY: hdiv => wrk_2d_1  ! Horizontal divergence
+      !!
+      INTEGER :: ji,jj,jk
       INTEGER :: jt
       INTEGER :: imid
@@ -116,5 +128,6 @@
          &                 ln_asmdin, ln_asmiau,                           &
          &                 nitbkg, nitdin, nitiaustr, nitiaufin, niaufn,   &
-         &                 nittrjfrq, ln_salfix, salfixmin
+         &                 nittrjfrq, ln_salfix, salfixmin,                &
+         &                 ndivdmp
       !!----------------------------------------------------------------------
 
@@ -420,4 +433,58 @@
 
       !-----------------------------------------------------------------------
+      ! Apply divergence damping filter
+      !-----------------------------------------------------------------------
+
+
+      IF ( ln_dyninc .AND. ndivdmp.gt.0 ) THEN
+
+       IF( wrk_in_use( 2, 1) ) THEN
+         CALL ctl_stop('asm_inc_init : requested workspace for divergence unavailable.')
+       ENDIF
+
+
+       DO  jt = 1, ndivdmp
+
+           DO jk = 1, jpkm1
+
+                  hdiv(:,:) = 0._wp
+
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  hdiv(ji,jj) =   &
+                     (  e2u(ji  ,jj)*fse3u(ji  ,jj,jk) * u_bkginc(ji  ,jj,jk)       &
+                      - e2u(ji-1,jj)*fse3u(ji-1,jj,jk) * u_bkginc(ji-1,jj,jk)       &
+                      + e1v(ji,jj  )*fse3v(ji,jj  ,jk) * v_bkginc(ji,jj  ,jk)       &
+                      - e1v(ji,jj-1)*fse3v(ji,jj-1,jk) * v_bkginc(ji,jj-1,jk)  )    &
+                      / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
+               END DO
+            END DO
+
+            CALL lbc_lnk( hdiv, 'T', 1. )   ! lateral boundary cond. (no sign change)
+
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  u_bkginc(ji,jj,jk) = u_bkginc(ji,jj,jk) + 0.2 * ( e1t(ji+1,jj)*e2t(ji+1,jj) * hdiv(ji+1,jj)   &
+                                                                  - e1t(ji  ,jj)*e2t(ji  ,jj) * hdiv(ji  ,jj) ) &
+                                                                / e1u(ji,jj) * umask(ji,jj,jk) 
+                  v_bkginc(ji,jj,jk) = v_bkginc(ji,jj,jk) + 0.2 * ( e1t(ji,jj+1)*e2t(ji,jj+1) * hdiv(ji,jj+1)   &
+                                                                  - e1t(ji,jj  )*e2t(ji,jj  ) * hdiv(ji,jj  ) ) &
+                                                                / e2v(ji,jj) * vmask(ji,jj,jk) 
+               END DO
+            END DO
+
+           END DO
+
+       END DO
+
+       IF( wrk_not_released( 2, 1) ) THEN
+         CALL ctl_stop('asm_inc_init : failed to release divergence')
+       ENDIF
+
+      ENDIF
+
+
+
+      !-----------------------------------------------------------------------
       ! Allocate and initialize the background state arrays
       !-----------------------------------------------------------------------
