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

Last change on this file since 899 was 729, checked in by cetlod, 17 years ago

correction of prepocessing syntax, see ticket:18

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.7 KB
Line 
1CC $Header: /home/opalod/NEMOCVSROOT/NEMO/TOP_SRC/SMS/trcsed.F,v 1.7 2007/10/12 09:36:28 opalod Exp $
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 && defined key_trc_lobster1
85
86      INTEGER ji,jj,jk
87      REAL ze3tr,ztra
88      REAL zwork(jpi,jpk)
89#if defined key_trc_diaadd
90      REAL ze3t(jpi,jpj,jpk)
91#endif
92CC----------------------------------------------------------------------
93CC statement functions
94CC ===================
95CDIR$ NOLIST
96#include "domzgr_substitute.h90"
97CDIR$ LIST
98CCC---------------------------------------------------------------------
99CCC  OPA8, LODYC (15/11/96)
100CCC---------------------------------------------------------------------
101C
102#if defined key_trc_diaadd
103C convert fluxes in per day
104      ze3t(:,:,:) = 0.
105      DO jk=1,jpkbm1
106        DO jj = 2, jpjm1
107          DO ji = 2, jpim1
108            ze3t(ji,jj,jk)=fse3t(ji,jj,jk)*86400.
109          END DO
110        END DO
111      END DO 
112#endif
113
114C
115C vertical slab
116C =============
117C
118      DO 1000 jj = 1,jpj
119
120C
121C
122C 1. sedimentation of detritus  : upstream scheme
123C -----------------------------------------------
124C
125C
126C for detritus sedimentation only - jpdet
127C
128C 1.1 initialisation needed for bottom and surface value
129C
130              DO jk=1,jpk
131                DO  ji = 1,jpi
132                  zwork(ji,jk) = 0.
133                END DO
134              END DO
135C
136C 1.2 tracer flux at w-point: we use -vsed (downward flux)
137C with simplification : no e1*e2
138C
139              DO  jk = 2,jpk
140                DO  ji = 1,jpi
141                  zwork(ji,jk) = -vsed * trn(ji,jj,jk - 1,jpdet)
142                END DO
143              END DO
144C
145C 1.3 tracer flux divergence at t-point added to the general trend
146C
147              DO  jk = 1,jpkm1
148                DO  ji = 1,jpi
149                  ze3tr = 1./fse3t(ji,jj,jk)
150                  ztra = -ze3tr * (zwork(ji,jk) - zwork(ji,jk + 1))
151                  tra(ji,jj,jk,jpdet) = tra(ji,jj,jk,jpdet) + ztra
152#            if defined key_trc_diabio
153                  trbio(ji,jj,jk,8) = ztra
154#            endif
155#if defined key_trc_diaadd
156            trc2d(ji,jj,8)=trc2d(ji,jj,8)+ztra*ze3t(ji,jj,jk)
157#endif
158                END DO
159              END DO
160C
161C END of slab
162C ===========
163
164 1000 CONTINUE
165C
166#if defined key_trc_diabio
167C Lateral boundary conditions on trcbio
168      CALL lbc_lnk (trbio(:,:,1,8), 'T', 1. )
169#endif
170#if defined key_trc_diaadd
171C Lateral boundary conditions on trc2d
172      CALL lbc_lnk (trc2d(:,:,8), 'T', 1. )
173#endif
174C
175
176#else
177C
178C     no passive tracer
179C
180#endif
181C
182      RETURN
183      END
Note: See TracBrowser for help on using the repository browser.