  SUBROUTINE cas_advspotmount

!&E---------------------------------------------------------------------
!&E                 ***  ROUTINE cas_advspotmount  ***
!&E
!&E ** Purpose : advection of a spot of salinity by a 2D constant
!&E              velocity field u=v=1
!&E
!&E ** Description :
!&E
!&E ** Called by : cas_init
!&E
!&E ** External calls :
!&E
!&E ** Used ij-arrays :
!&E
!&E ** Modified variables :
!&E
!&E ** Reference :
!&E
!&E ** History :
!&E       !  2007-09  (T. Duhaut)  Original code
!&E       !  2008-12  (V. Garnier) shift of sigma values : -1 < sig < 0
!&E
!&E---------------------------------------------------------------------





























































!! * Modules used
   USE parameters, ONLY : pi,rsh,rlg,riolg,imin,imax,jmin,jmax,kmax,   &
                          ljmin,ljminm1,ljminm2,limax,limaxp1,limaxp2, &
                          ljmax,ljmaxp1,ljmaxp2,limin,liminm1,liminm2, &
                          ishift_obc_west,ishift_obc_east,jshift_obc_south,jshift_obc_north
   USE comvars2d, ONLY : fisac,gwac,fu,fv,dtmin,dtmax,dt,suffix,l_maxu, &
                         l_obc_cycl_x,l_obc_cycl_y,l_modele2d,qmax,halfdt, &
                         ierrorlog,hex,hey,hx,hy,dhx,dhy,hx_g,hy_g,h0_g, &
                         h0fond,dx,t,tfin,h0,dx_u,ig,id,jb,jh
   USE comvarp2d, ONLY : ssh,u,v,temp
   USE comvarp3d, ONLY : uz,vz,boz
   USE comvars3d, ONLY : qmaxz,rhoref,tetaref,kzinit,nzinit,wz,dsigu
   USE output,    ONLY : pasor,l_out_sal,l_out_zaxis_w, &
                         l_out_ubt,l_out_ssh
   USE obccombine,ONLY : l_obc_cycl
   USE comfluxdo, ONLY : fxeau,fyeau
   USE toolgeom,  ONLY : f_zw,f_zu,f_dzu

   USE comsubstance, ONLY : nvpc,nvp,nv_cp,nv_dis,nv_fix,nv_dri,nv_int,nv_sorb,     &
                            name_var,long_name_var,standard_name_var,nv_ncp,        &
                            valid_min_var,valid_max_var,cv_wat,nb_var,date_startsub,&
                            name_filesubs,itypv,ws_free_opt,ws_free_min,ws_free_max
   USE casinit,   ONLY : cas_init_subs,cas_init_subs_disspart

   USE toolmpi, ONLY: ex_i_rsh,ex_j_rsh,ex_peri_x_rsh,ex_peri_y_rsh
   USE casinit,   ONLY : cas_init_param,cas_init_grid,cas_init_bathy, &
                         cas_init_io,cas_init_obc,cas_init_meteo,     &
                         cas_init_visc,cas_init_turb,cas_init_tspar,  &
                         cas_init_progvar,cas_init_misc,cas_init_river



   IMPLICIT NONE


   INCLUDE 'mpif.h'


!! * Arguments

!! * Local declarations
   LOGICAL           :: l_nc4par
   CHARACTER(LEN=19) :: date_start,date_end,date_start3d,date_startagrif
   CHARACTER(LEN=19) :: tool_sectodat
   INTEGER           :: i,j,k,IERR_MPI
   REAL(KIND=rlg)    :: x,y,z,xini,yini,zini,radius,dist,dtemp,dz
   REAL(KIND=rsh)    :: z0bottom,z0surface,depthcst
   REAL(KIND=rsh)    :: cff1,cff2,x0,cff,dh,drho,dhu,dhum,dhup,sigma
   REAL(KIND=rsh)    :: xx,xx0,yy,y0,rotation,limit
   REAL(KIND=rsh), PARAMETER    :: Lx = 300000.0_rsh, &  ! length of the domain
                                   cfl = 0.1_rsh,     &  ! CFL criterion

                                   dxval = Lx / (imax-(ishift_obc_west+ishift_obc_east)-2), & ! horizontal resolution

                                   dyval = dxval,     &
                                   vel = 6.666666666666667E-002

   INTEGER           :: isubs
   LOGICAL           :: l_filesubs

!!----------------------------------------------------------------------
!! * Executable part

   PRINT*, '!!!!!!!!!!!!!!!!!!!!'
   PRINT*, 'TEST CASE : AdvLense'
   PRINT*, '!!!!!!!!!!!!!!!!!!!!'


   WRITE(ierrorlog,*) 'For this test case, you must use key_tssub_casadvlense ccp key'
   WRITE(ierrorlog,*) 'Simulation stopped.'
   CALL MPI_FINALIZE(IERR_MPI)
   STOP


  END SUBROUTINE cas_advspotmount
