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

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

nemo_v1_update_027 : CE + RB + CT : update of SMS routines

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