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