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.
trcsbc.F90 in trunk/NEMO/TOP_SRC/TRP – NEMO

source: trunk/NEMO/TOP_SRC/TRP/trcsbc.F90 @ 941

Last change on this file since 941 was 941, checked in by cetlod, 16 years ago

phasing the passive tracer transport module to the new version of NEMO, see ticket 143

  • Property svn:executable set to *
File size: 5.0 KB
Line 
1MODULE trcsbc
2   !!==============================================================================
3   !!                       ***  MODULE  trcsbc  ***
4   !! Ocean passive tracers:  surface boundary condition
5   !!==============================================================================
6#if defined key_top
7   !!----------------------------------------------------------------------
8   !!   'key_top'                                                TOP models
9   !!----------------------------------------------------------------------
10   !!   trc_sbc      : update the tracer trend at ocean surface
11   !!----------------------------------------------------------------------
12   !! * Modules used
13   USE oce_trc             ! ocean dynamics and active tracers variables
14   USE trc                 ! ocean  passive tracers variables
15   USE prtctl_trc          ! Print control for debbuging
16
17
18   IMPLICIT NONE
19   PRIVATE
20
21   !! * Routine accessibility
22   PUBLIC trc_sbc              ! routine called by step.F90
23
24   !! * Substitutions
25#  include "top_substitute.h90"
26   !!----------------------------------------------------------------------
27   !!   TOP 1.0 , LOCEAN-IPSL (2005)
28   !! $Header: /home/opalod/NEMOCVSROOT/NEMO/TOP_SRC/TRP/trcsbc.F90,v 1.10 2007/10/12 09:26:30 opalod Exp $
29   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt
30   !!----------------------------------------------------------------------
31
32CONTAINS
33
34   SUBROUTINE trc_sbc ( kt )
35      !!----------------------------------------------------------------------
36      !!                  ***  ROUTINE trc_sbc  ***
37      !!                   
38      !! ** Purpose :   Compute the tracer surface boundary condition trend of
39      !!      (concentration/dilution effect) and add it to the general
40      !!       trend of tracer equations.
41      !!
42      !! ** Method :
43      !!      * concentration/dilution effect:
44      !!            The surface freshwater flux modify the ocean volume
45      !!         and thus the concentration of a tracer as :
46      !!            tra = tra + emp * trn / e3t   for k=1
47      !!         where emp, the surface freshwater budget (evaporation minus
48      !!         precipitation minus runoff) given in kg/m2/s is divided
49      !!         by 1000 kg/m3 (density of plain water) to obtain m/s.
50      !!
51      !! ** Action  : - Update the 1st level of tra with the trend associated
52      !!                with the tracer surface boundary condition
53      !!
54      !! History :
55      !!   8.2  !  98-10  (G. Madec, G. Roullet, M. Imbard)  Original code
56      !!   8.2  !  01-02  (D. Ludicone)  sea ice and free surface
57      !!   8.5  !  02-06  (G. Madec)  F90: Free form and module
58      !!   9.0  !  04-03  (C. Ethe)  adapted for passive tracers
59      !!----------------------------------------------------------------------
60      !! * Arguments
61      INTEGER, INTENT( in ) ::   kt          ! ocean time-step index
62
63      !! * Local declarations
64      INTEGER  ::   ji, jj, jn           ! dummy loop indices
65      REAL(wp) ::   ztra, zsrau, zse3t   ! temporary scalars
66      CHARACTER (len=22) :: charout
67      !!----------------------------------------------------------------------
68
69      IF( kt == nittrc000 ) THEN
70         IF(lwp) WRITE(numout,*)
71         IF(lwp) WRITE(numout,*) 'trc_sbc : Passive tracers surface boundary condition'
72         IF(lwp) WRITE(numout,*) '~~~~~~~ '
73      ENDIF
74
75      ! 0. initialization
76      zsrau = 1. / rauw
77      IF( .NOT. ln_sco )  zse3t = 1. / fse3t(1,1,1)
78#if defined key_trc_diatrd
79      DO jn = 1, jptra
80        IF (luttrd(jn)) trtrd(:,:,:,ikeep(jn),jpdiatrc) = 0.0
81      END DO
82#endif
83
84      DO jn = 1, jptra
85         ! 1. Concentration dillution effect on tra
86         DO jj = 2, jpj
87            DO ji = fs_2, fs_jpim1   ! vector opt.
88               IF( ln_sco ) zse3t = 1. / fse3t(ji,jj,1)
89               ! concent./dilut. effect
90               ztra = emps(ji,jj) * zsrau * trn(ji,jj,1,jn) * zse3t * tmask(ji,jj,1)
91               
92               ! add the trend to the general tracer trend
93               tra(ji,jj,1,jn) = tra(ji,jj,1,jn) + ztra
94#if defined key_trc_diatrd
95               IF (luttrd(jn)) trtrd(ji,jj,1,ikeep(jn),jpdiatrc) = trtrd(ji,jj,1,jn,jpdiatrc) + ztra
96#endif
97            END DO
98         END DO
99         
100      END DO
101
102      IF(ln_ctl)   THEN  ! print mean trends (used for debugging)
103         WRITE(charout, FMT="('sbc')")
104         CALL prt_ctl_trc_info(charout)
105         CALL prt_ctl_trc(tab4d=tra, mask=tmask, clinfo=ctrcnm,clinfo2='trd')
106      ENDIF
107
108   END SUBROUTINE trc_sbc
109
110#else
111   !!----------------------------------------------------------------------
112   !!   Dummy module :                      NO passive tracer
113   !!----------------------------------------------------------------------
114CONTAINS
115   SUBROUTINE trc_sbc (kt)              ! Empty routine
116      INTEGER, INTENT(in) :: kt
117      WRITE(*,*) 'trc_sbc: You should not have seen this print! error?', kt
118   END SUBROUTINE trc_sbc
119#endif
120   
121   !!======================================================================
122END MODULE trcsbc
Note: See TracBrowser for help on using the repository browser.