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.
trcsed.F in trunk/NEMO/TOP_SRC/SMS – NEMO

source: trunk/NEMO/TOP_SRC/SMS/trcsed.F @ 331

Last change on this file since 331 was 274, checked in by opalod, 19 years ago

nemo_v1_update_005:RB: update headers for the TOP component.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.8 KB
Line 
1CCC$Header$
2CCC  TOP 1.0 , LOCEAN-IPSL (2005)
3C This software is governed by CeCILL licence see modipsl/doc/NEMO_CeCILL.txt
4C ---------------------------------------------------------------------------
5CDIR$ LIST
6      SUBROUTINE trcsed(kt)
7CCC---------------------------------------------------------------------
8CCC
9CCC                       ROUTINE trcsed
10CCC                     *******************
11CCC
12CCC  PURPOSE :
13CCC  ---------
14CCC     compute the now trend due to the vertical sedimentation of
15CCC     detritus and add it to the general trend of detritus equations.
16CCC
17CCC
18CC   METHOD :
19CC   -------
20CC      this ROUTINE compute not exactly the advection but the
21CC      transport term, i.e.  dz(wt) and dz(ws)., dz(wtr)
22CC      using an upstream scheme
23CC
24CC the now vertical advection of tracers is given by:
25CC
26CC       dz(trn wn) = 1/bt dk+1( e1t e2t vsed (trn) )
27CC
28CC add this trend now to the general trend of tracer (ta,sa,tra):
29CC
30CC                     tra = tra + dz(trn wn)
31CC
32CC      IF 'key_trc_diabio' key is activated, the now vertical advection
33CC      trend of passive tracers is saved for futher diagnostics.
34CC
35CC multitasked on vertical slab (jj-loop)
36CC
37CC
38CC   INPUT :
39CC   -----
40CC      argument
41CC              ktask           : task identificator
42CC              kt              : time step
43CC      COMMON
44CC            /comcoo/          : orthogonal curvilinear coordinates
45CC                                and scale factors
46CC            /cottrp/          : passive tracer fields
47CC            /comtsk/          : multitasking
48CC
49CC   OUTPUT :
50CC   ------
51CC      COMMON
52CC            /cottrp/tra       : general tracer trend increased by the
53CC            now vertical tracer advection trend
54CC            /cottbd/ trbio    : now vertical passive tracer advection
55CC                                trend
56CC                                (IF 'key_trc_diabio' key is activated)
57CC
58CC   WORKSPACE :
59CC   ---------
60CC local
61CC    ze1e2w, ze3tr, ztra
62CC      COMMON
63CC
64CC   EXTERNAL :                   no
65CC   --------
66CC
67CC   REFERENCES :                 no
68CC   ----------
69CC
70CC   MODIFICATIONS:
71CC   --------------
72CC       original : 95-06 (M. Levy)
73CC       additions: 00-12 (E. Kestenare): clean up 
74CC----------------------------------------------------------------------
75CDIR$ NOLIST
76      USE oce_trc
77      USE trp_trc
78      USE sms
79      USE lbclnk
80      IMPLICIT NONE
81CDIR$ LIST
82CC----------------------------------------------------------------------
83CC local declarations
84CC ==================
85      INTEGER kt
86
87#if defined key_passivetrc 
88
89#   if defined key_trc_npzd || defined key_trc_lobster1
90
91      INTEGER ji,jj,jk
92      REAL ze3tr,ztra
93      REAL zwork(jpi,jpk),ze3t(jpk)
94CC----------------------------------------------------------------------
95CC statement functions
96CC ===================
97CDIR$ NOLIST
98#include "domzgr_substitute.h90"
99CDIR$ LIST
100CCC---------------------------------------------------------------------
101CCC  OPA8, LODYC (15/11/96)
102CCC---------------------------------------------------------------------
103C
104#     if defined key_trc_diaadd
105      DO jk=1,jpkbm1
106        ze3t(jk)=e3t(jk)*86400.
107      END DO
108      DO jk=jpkb,jpk
109        ze3t(jk)=0.
110      END DO 
111#     endif
112C
113C vertical slab
114C =============
115C
116      DO 1000 jj = 1,jpj
117
118C
119C
120C 1. sedimentation of detritus  : upstream scheme
121C -----------------------------------------------
122C
123C
124C for detritus sedimentation only - jpdet
125C
126C 1.1 initialisation needed for bottom and surface value
127C
128              DO jk=1,jpk
129                DO  ji = 1,jpi
130                  zwork(ji,jk) = 0.
131                END DO
132              END DO
133C
134C 1.2 tracer flux at w-point: we use -vsed (downward flux)
135C with simplification : no e1*e2
136C
137              DO  jk = 2,jpkm1
138                DO  ji = 1,jpi
139                  zwork(ji,jk) = -vsed * trn(ji,jj,jk - 1,jpdet)
140                END DO
141              END DO
142C
143C 1.3 tracer flux divergence at t-point added to the general trend
144C
145              DO  jk = 1,jpkm1
146                DO  ji = 1,jpi
147                  ze3tr = 1./fse3t(ji,jj,jk)
148                  ztra = -ze3tr * (zwork(ji,jk) - zwork(ji,jk + 1))
149                  tra(ji,jj,jk,jpdet) = tra(ji,jj,jk,jpdet) + ztra
150#            if defined key_trc_diabio
151                  trbio(ji,jj,jk,8) = ztra
152#            endif
153#if defined key_trc_diaadd
154            trc2d(ji,jj,8)=trc2d(ji,jj,8)+ztra*ze3t(jk)
155#endif
156                END DO
157              END DO
158C
159C END of slab
160C ===========
161
162 1000 CONTINUE
163C
164#if defined key_trc_diabio
165C Lateral boundary conditions on trcbio
166      CALL lbc_lnk (trbio(:,:,1,8), 'T', 1. )
167#endif
168#if defined key_trc_diaadd
169C Lateral boundary conditions on trc2d
170      CALL lbc_lnk (trc2d(:,:,8), 'T', 1. )
171#endif
172C
173# else
174C
175C       no Sedimentation
176C
177# endif
178#else
179C
180C     no passive tracer
181C
182#endif
183C
184      RETURN
185      END
Note: See TracBrowser for help on using the repository browser.