MODULE bdytra !!================================================================================= !! *** MODULE bdytra *** !! Ocean tracers: Flow Relaxation Scheme of tracers on each open boundary !!================================================================================= #if defined key_bdy !!--------------------------------------------------------------------------------- !! 'key_bdy' : Unstructured Open Boundary Conditions !!--------------------------------------------------------------------------------- !! bdy_tra : Relaxation of tracers on unstructured open boundaries !!--------------------------------------------------------------------------------- !! * Modules used USE oce ! ocean dynamics and tracers variables USE dom_oce ! ocean space and time domain variables USE bdy_oce ! ocean open boundary conditions USE lbclnk ! ocean lateral boundary conditions (or mpp link) IMPLICIT NONE PRIVATE !! * Accessibility PUBLIC bdy_tra ! routine called in tranxt.F90 !! * Substitutions !!--------------------------------------------------------------------------------- !! OPA 9.0 , LODYC-IPSL (2003) !!--------------------------------------------------------------------------------- CONTAINS SUBROUTINE bdy_tra( kt ) !!------------------------------------------------------------------------------ !! *** SUBROUTINE bdy_tra *** !! !! ** Purpose : Apply the Flow Relaxation Scheme for tracers in the !! case of unstructured open boundaries. !! !! Reference : Engedahl H., 1995: Use of the flow relaxation scheme in !! a three-dimensional baroclinic ocean model with realistic !! topography. Tellus, 365-382. !! History : !! 9.0 ! 05-01 (J. Chanut, A. Sellar) Original !!------------------------------------------------------------------------------ !! * Arguments INTEGER, INTENT( in ) :: kt !! * Local declarations REAL(wp) :: zwgt ! boundary weight INTEGER :: jb, jk, jgrd ! dummy loop indices INTEGER :: ii, ij ! 2D addresses !!------------------------------------------------------------------------------ jgrd=1 !: Everything is at T-points here DO jb = 1, nblen(jgrd) DO jk = 1, jpkm1 ii = nbi(jb,jgrd) ij = nbj(jb,jgrd) zwgt = nbw(jb,jgrd) ! Temperature relaxation at the boundary ta(ii,ij,jk) = ( ta(ii,ij,jk)*(1.-zwgt) + tbdy(jb,jk)*zwgt ) & * tmask(ii,ij,jk) ! Salinity relaxation at the boundary sa(ii,ij,jk) = ( sa(ii,ij,jk)*(1.-zwgt) + sbdy(jb,jk)*zwgt ) & * tmask(ii,ij,jk) END DO END DO CALL lbc_lnk( ta, 'T', 1. ) ! Boundary points should be updated CALL lbc_lnk( sa, 'T', 1. ) ! END SUBROUTINE bdy_tra #else !!--------------------------------------------------------------------------------- !! Default option Empty module !!--------------------------------------------------------------------------------- CONTAINS SUBROUTINE bdy_tra ! Empty routine END SUBROUTINE bdy_tra #endif !!================================================================================= END MODULE bdytra