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

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

CL : Add CVS Header and CeCILL licence information

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.8 KB
Line 
1
2CCC $Header$ 
3CCC  TOP 1.0 , LOCEAN-IPSL (2005) 
4C This software is governed by CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
5C ---------------------------------------------------------------------------
6CC $Header$
7CDIR$ LIST
8      SUBROUTINE trcsed(kt)
9CCC---------------------------------------------------------------------
10CCC
11CCC                       ROUTINE trcsed
12CCC                     *******************
13CCC
14CCC  PURPOSE :
15CCC  ---------
16CCC     compute the now trend due to the vertical sedimentation of
17CCC     detritus and add it to the general trend of detritus equations.
18CCC
19CCC
20CC   METHOD :
21CC   -------
22CC      this ROUTINE compute not exactly the advection but the
23CC      transport term, i.e.  dz(wt) and dz(ws)., dz(wtr)
24CC      using an upstream scheme
25CC
26CC the now vertical advection of tracers is given by:
27CC
28CC       dz(trn wn) = 1/bt dk+1( e1t e2t vsed (trn) )
29CC
30CC add this trend now to the general trend of tracer (ta,sa,tra):
31CC
32CC                     tra = tra + dz(trn wn)
33CC
34CC      IF 'key_trc_diabio' key is activated, the now vertical advection
35CC      trend of passive tracers is saved for futher diagnostics.
36CC
37CC multitasked on vertical slab (jj-loop)
38CC
39CC
40CC   INPUT :
41CC   -----
42CC      argument
43CC              ktask           : task identificator
44CC              kt              : time step
45CC      COMMON
46CC            /comcoo/          : orthogonal curvilinear coordinates
47CC                                and scale factors
48CC            /cottrp/          : passive tracer fields
49CC            /comtsk/          : multitasking
50CC
51CC   OUTPUT :
52CC   ------
53CC      COMMON
54CC            /cottrp/tra       : general tracer trend increased by the
55CC            now vertical tracer advection trend
56CC            /cottbd/ trbio    : now vertical passive tracer advection
57CC                                trend
58CC                                (IF 'key_trc_diabio' key is activated)
59CC
60CC   WORKSPACE :
61CC   ---------
62CC local
63CC    ze1e2w, ze3tr, ztra
64CC      COMMON
65CC
66CC   EXTERNAL :                   no
67CC   --------
68CC
69CC   REFERENCES :                 no
70CC   ----------
71CC
72CC   MODIFICATIONS:
73CC   --------------
74CC       original : 95-06 (M. Levy)
75CC       additions: 00-12 (E. Kestenare): clean up 
76CC----------------------------------------------------------------------
77CDIR$ NOLIST
78      USE oce_trc
79      USE trp_trc
80      USE sms
81      USE lbclnk
82      IMPLICIT NONE
83CDIR$ LIST
84CC----------------------------------------------------------------------
85CC local declarations
86CC ==================
87      INTEGER kt
88
89#if defined key_passivetrc 
90
91#   if defined key_trc_npzd || defined key_trc_lobster1
92
93      INTEGER ji,jj,jk
94      REAL ze3tr,ztra
95      REAL zwork(jpi,jpk),ze3t(jpk)
96CC----------------------------------------------------------------------
97CC statement functions
98CC ===================
99CDIR$ NOLIST
100#include "domzgr_substitute.h90"
101CDIR$ LIST
102CCC---------------------------------------------------------------------
103CCC  OPA8, LODYC (15/11/96)
104CCC---------------------------------------------------------------------
105C
106#     if defined key_trc_diaadd
107      DO jk=1,jpkbm1
108        ze3t(jk)=e3t(jk)*86400.
109      END DO
110      DO jk=jpkb,jpk
111        ze3t(jk)=0.
112      END DO 
113#     endif
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,jpkm1
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(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# else
176C
177C       no Sedimentation
178C
179# endif
180#else
181C
182C     no passive tracer
183C
184#endif
185C
186      RETURN
187      END
Note: See TracBrowser for help on using the repository browser.