New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
bdytra.F90 in branches/DEV_r2191_3partymerge2010/NEMO/OPA_SRC/BDY – NEMO

source: branches/DEV_r2191_3partymerge2010/NEMO/OPA_SRC/BDY/bdytra.F90 @ 2207

Last change on this file since 2207 was 2207, checked in by acc, 13 years ago

#733 DEV_r2191_3partymerge2010. Merged in changes from devukmo2010 branch

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 3.8 KB
Line 
1MODULE bdytra
2   !!======================================================================
3   !!                       ***  MODULE  bdytra  ***
4   !! Ocean tracers:   Flow Relaxation Scheme of tracers on each open boundary
5   !!======================================================================
6   !! History :  1.0  !  2005-01  (J. Chanut, A. Sellar)  Original code
7   !!            3.0  !  2008-04  (NEMO team)  add in the reference version
8   !!----------------------------------------------------------------------
9#if defined key_bdy
10   !!----------------------------------------------------------------------
11   !!   'key_bdy'                     Unstructured Open Boundary Conditions
12   !!----------------------------------------------------------------------
13   !!   bdy_tra        : Relaxation of tracers on unstructured open boundaries
14   !!----------------------------------------------------------------------
15   USE oce             ! ocean dynamics and tracers variables
16   USE dom_oce         ! ocean space and time domain variables
17   USE bdy_oce         ! ocean open boundary conditions
18   USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
19   USE in_out_manager  ! I/O manager
20
21   IMPLICIT NONE
22   PRIVATE
23
24   PUBLIC bdy_tra     ! routine called in tranxt.F90
25
26   !!----------------------------------------------------------------------
27   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
28   !! $Id$
29   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
30   !!----------------------------------------------------------------------
31CONTAINS
32
33   SUBROUTINE bdy_tra( kt )
34      !!----------------------------------------------------------------------
35      !!                 ***  SUBROUTINE bdy_tra  ***
36      !!                   
37      !! ** Purpose : Apply the Flow Relaxation Scheme for tracers in the 
38      !!              case of unstructured open boundaries.
39      !!
40      !! Reference : Engedahl H., 1995, Tellus, 365-382.
41      !!----------------------------------------------------------------------
42      INTEGER, INTENT( in ) ::   kt
43      !!
44      REAL(wp) ::   zwgt           ! boundary weight
45      INTEGER  ::   ib, ik, igrd   ! dummy loop indices
46      INTEGER  ::   ii, ij         ! 2D addresses
47      !!----------------------------------------------------------------------
48      !
49      IF(ln_bdy_tra_frs) THEN       ! If this is false, then this routine does nothing.
50         !
51         IF( kt == nit000 ) THEN
52            IF(lwp) WRITE(numout,*)
53            IF(lwp) WRITE(numout,*) 'bdy_tra : Flow Relaxation Scheme for tracers'
54            IF(lwp) WRITE(numout,*) '~~~~~~~'
55         ENDIF
56         !
57         igrd = 1                       ! Everything is at T-points here
58         DO ib = 1, nblen(igrd)
59            DO ik = 1, jpkm1
60               ii = nbi(ib,igrd)
61               ij = nbj(ib,igrd)
62               zwgt = nbw(ib,igrd)
63               ta(ii,ij,ik) = ( ta(ii,ij,ik) * (1.-zwgt) + tbdy(ib,ik) * zwgt ) * tmask(ii,ij,ik)         
64               sa(ii,ij,ik) = ( sa(ii,ij,ik) * (1.-zwgt) + sbdy(ib,ik) * zwgt ) * tmask(ii,ij,ik)
65            END DO
66         END DO 
67         !
68         CALL lbc_lnk( ta, 'T', 1. )   ; CALL lbc_lnk( sa, 'T', 1. )    ! Boundary points should be updated
69         !
70      ENDIF ! ln_bdy_tra_frs
71      !
72   END SUBROUTINE bdy_tra
73   
74#else
75   !!----------------------------------------------------------------------
76   !!   Dummy module                   NO Unstruct Open Boundary Conditions
77   !!----------------------------------------------------------------------
78CONTAINS
79   SUBROUTINE bdy_tra(kt)      ! Empty routine
80      WRITE(*,*) 'bdy_tra: You should not have seen this print! error?', kt
81   END SUBROUTINE bdy_tra
82#endif
83
84   !!======================================================================
85END MODULE bdytra
Note: See TracBrowser for help on using the repository browser.