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 trunk/NEMO/OPA_SRC/BDY – NEMO

source: trunk/NEMO/OPA_SRC/BDY/bdytra.F90 @ 911

Last change on this file since 911 was 911, checked in by ctlod, 16 years ago

Implementation of the BDY package, see ticket: #126

  • Property svn:executable set to *
File size: 3.6 KB
Line 
1MODULE bdytra
2   !!=================================================================================
3   !!                       ***  MODULE  bdytra  ***
4   !! Ocean tracers:   Flow Relaxation Scheme of tracers on each open boundary
5   !!=================================================================================
6#if defined key_bdy
7   !!---------------------------------------------------------------------------------
8   !!   'key_bdy'      :                         Unstructured Open Boundary Conditions
9   !!---------------------------------------------------------------------------------
10   !!   bdy_tra        : Relaxation of tracers on unstructured open boundaries
11   !!---------------------------------------------------------------------------------
12   !! * Modules used
13   USE oce             ! ocean dynamics and tracers variables
14   USE dom_oce         ! ocean space and time domain variables
15   USE bdy_oce         ! ocean open boundary conditions
16   USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
17
18   IMPLICIT NONE
19   PRIVATE
20
21   !! * Accessibility
22   PUBLIC bdy_tra     ! routine called in tranxt.F90
23
24   !! * Substitutions
25
26   !!---------------------------------------------------------------------------------
27   !!   OPA 9.0 , LODYC-IPSL  (2003)
28   !!---------------------------------------------------------------------------------
29
30CONTAINS
31
32   SUBROUTINE bdy_tra( kt )
33      !!------------------------------------------------------------------------------
34      !!                 ***  SUBROUTINE bdy_tra  ***
35      !!                   
36      !! ** Purpose : Apply the Flow Relaxation Scheme for tracers in the 
37      !!              case of unstructured open boundaries.
38      !!
39      !! Reference : Engedahl H., 1995: Use of the flow relaxation scheme in
40      !!             a three-dimensional baroclinic ocean model with realistic
41      !!             topography. Tellus, 365-382.
42      !!  History :
43      !!   9.0  !  05-01 (J. Chanut, A. Sellar) Original
44      !!------------------------------------------------------------------------------
45      !! * Arguments
46      INTEGER, INTENT( in ) ::   kt
47
48      !! * Local declarations
49      REAL(wp) :: zwgt                       ! boundary weight
50      INTEGER ::   jb, jk, jgrd              ! dummy loop indices
51      INTEGER ::   ii, ij                    ! 2D addresses
52      !!------------------------------------------------------------------------------
53
54      jgrd=1 !: Everything is at T-points here
55 
56      DO jb = 1, nblen(jgrd)
57        DO jk = 1, jpkm1
58          ii = nbi(jb,jgrd)
59          ij = nbj(jb,jgrd)
60          zwgt = nbw(jb,jgrd)
61
62          ! Temperature relaxation at the boundary   
63          ta(ii,ij,jk) = ( ta(ii,ij,jk)*(1.-zwgt)  +  tbdy(jb,jk)*zwgt ) &
64                                                          * tmask(ii,ij,jk)         
65
66          ! Salinity relaxation at the boundary   
67          sa(ii,ij,jk) = ( sa(ii,ij,jk)*(1.-zwgt)  +  sbdy(jb,jk)*zwgt ) &
68                                                          * tmask(ii,ij,jk)
69   
70        END DO
71      END DO
72
73      CALL lbc_lnk( ta, 'T', 1. ) ! Boundary points should be updated
74      CALL lbc_lnk( sa, 'T', 1. ) !
75
76   END SUBROUTINE bdy_tra
77#else
78   !!---------------------------------------------------------------------------------
79   !!   Default option                                                    Empty module
80   !!---------------------------------------------------------------------------------
81CONTAINS
82   SUBROUTINE bdy_tra      ! Empty routine
83   END SUBROUTINE bdy_tra
84#endif
85
86   !!=================================================================================
87END MODULE bdytra
Note: See TracBrowser for help on using the repository browser.