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

source: trunk/NEMO/TOP_SRC/SMS/p4zsink2.F @ 336

Last change on this file since 336 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: 3.7 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 ---------------------------------------------------------------------------
5      SUBROUTINE p4zsink2(wstmp,sinktemp,jn)
6CDIR$ LIST
7#if defined key_passivetrc && defined key_trc_pisces
8!!!
9!!!       p4zsink2 : PISCES model
10!!!       ***********************
11!!!
12!!
13!!  PURPOSE :
14!!  ---------
15!!     Compute the sedimentation terms for the various sinking
16!!     particles. The scheme used to compute the trends is based
17!!     on MUSCL.
18!!
19!!   METHOD :
20!!   -------
21!!      this ROUTINE compute not exactly the advection but the
22!!      transport term, i.e.  div(u*tra).
23!!
24!!
25!!   REFERENCES :               
26!!   ----------                 
27!!
28!!   References :
29!!      Estubier, A., and M. Levy, Notes Techn. Pole de Modelisation
30!!      IPSL, Sept. 2000 (http://www.lodyc.jussieu.fr/opa)
31!!
32!!
33!!   MODIFICATIONS:
34!!   --------------
35!!       original :  06-00 (A.Estublier)
36!!       modifications : 2004 (O. Aumont)
37!!       
38!!----------------------------------------------------------------------
39CC ----------------------------------------------------------------
40CC parameters and commons
41CC ======================
42CDIR$ NOLIST
43      USE oce_trc
44      USE trp_trc
45      USE sms
46      IMPLICIT NONE
47CDIR$ LIST
48CC-----------------------------------------------------------------
49CC local declarations
50CC ==================
51C
52      INTEGER ji,jj,jk,jn
53      REAL ztraz(jpi,jpj,jpk),zakz(jpi,jpj,jpk)
54      REAL zkz(jpi,jpj,jpk)
55      REAL zigma,zew,zstep,zign
56      REAL wstmp(jpi,jpj,jpk),sinktemp(jpi,jpj,jpk)
57      REAL wstmp2(jpi,jpj,jpk)
58
59!!----------------------------------------------------------------------
60!! statement functions
61!! ===================
62!DIR$ NOLIST
63#include "domzgr_substitute.h90"
64!DIR$ LIST
65!!!---------------------------------------------------------------------
66!!!  OPA8, LODYC (01/00)
67!!!---------------------------------------------------------------------
68! 1. Initialization
69! --------------
70
71        zstep  = rdt*ndttrc
72
73        ztraz  = 0
74        zkz    = 0
75        zakz   = 0.
76
77        do jk=1,jpk-1
78         wstmp2(:,:,jk+1)=-wstmp(:,:,jk)/rjjss*tmask(:,:,jk+1)
79#    if defined key_off_degrad
80     &      *facvol(:,:,jk)
81#    endif
82        end do
83 
84        wstmp2(:,:,1)=0.
85!
86! 3. Vertical advective flux
87!-------------------------------
88! ... first guess of the slopes
89!   ... interior values
90!
91        DO jk=2,jpkm1
92              ztraz(:,:,jk) = (trn(:,:,jk-1,jn) - trn(:,:,jk,jn))
93     $                          *tmask(:,:,jk)
94        ENDDO
95!
96! slopes
97!
98        DO jk=2,jpkm1
99          DO jj = 1,jpj
100            DO ji = 1, jpi
101            zign = 0.5*(sign(1.,ztraz(ji,jj,jk)*ztraz(ji,jj,jk+1))+1)
102            zakz(ji,jj,jk) = 0.5*(ztraz(ji,jj,jk)
103     $                          +ztraz(ji,jj,jk+1))*zign
104            ENDDO
105          ENDDO
106        ENDDO       
107!
108! Slopes limitation
109!
110        DO jk=2,jpkm1
111          DO jj = 1,jpj
112            DO ji = 1,jpi
113              zakz(ji,jj,jk) = sign(1.,zakz(ji,jj,jk)) * 
114     $                        min(abs(zakz(ji,jj,jk)),
115     $                        2.*abs(ztraz(ji,jj,jk+1)),
116     $                        2.*abs(ztraz(ji,jj,jk)))
117            ENDDO
118          ENDDO
119        ENDDO       
120
121! vertical advective flux
122        DO jk=1,jpkm1
123          DO jj = 1,jpj     
124            DO ji = 1, jpi   
125              zigma = wstmp2(ji,jj,jk+1)*zstep/fse3w(ji,jj,jk+1)
126              zew   = wstmp2(ji,jj,jk+1)
127              sinktemp(ji,jj,jk+1) = -zew*(trn(ji,jj,jk,jn)
128     $           -0.5*(1+zigma)*zakz(ji,jj,jk))*rfact2
129            ENDDO
130          ENDDO
131        ENDDO 
132!
133! Boundary conditions
134!
135         sinktemp(:,:,1)=0.
136         sinktemp(:,:,jpk)=0.
137!
138#endif
139C
140      RETURN
141      END
Note: See TracBrowser for help on using the repository browser.