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 @ 186

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

CL + CE : NEMO TRC_SRC start

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