1 |
|
2 |
#include "CPP_OPTIONS.h" |
3 |
#include "PACKAGES_CONFIG.h" |
4 |
|
5 |
CBOP |
6 |
C !ROUTINE: RBCS_ADD_PTENDENCY |
7 |
|
8 |
C !INTERFACE: ========================================================== |
9 |
SUBROUTINE RBCS_ADD_PTENDENCY(bi,bj,iMin,iMax,jMin,jMax,k, |
10 |
& iTracer, myTime,myIter, myThid ) |
11 |
|
12 |
C !DESCRIPTION: |
13 |
C Will update tracer tendencies gPtr with terms to relax |
14 |
C at boundaries |
15 |
|
16 |
C !USES: =============================================================== |
17 |
IMPLICIT NONE |
18 |
#include "SIZE.h" |
19 |
#include "GRID.h" |
20 |
#include "DYNVARS.h" |
21 |
#include "EEPARAMS.h" |
22 |
#include "PARAMS.h" |
23 |
#include "PTRACERS_SIZE.h" |
24 |
#include "PTRACERS.h" |
25 |
#include "RBCS.h" |
26 |
|
27 |
C !INPUT PARAMETERS: =================================================== |
28 |
C myThid :: thread number |
29 |
C myIter :: current timestep |
30 |
C myTime :: current time |
31 |
C iTracer :: ptracer number |
32 |
C bi,bj :: tile indices |
33 |
C k :: vertical level |
34 |
INTEGER myThid, myIter |
35 |
_RL myTime |
36 |
INTEGER iTracer |
37 |
INTEGER bi,bj,imin,imax,jmin,jmax,k |
38 |
|
39 |
C !LOCAL VARIABLES: ==================================================== |
40 |
C i,j :: loop indices |
41 |
INTEGER i,j |
42 |
INTEGER niter |
43 |
CEOP |
44 |
|
45 |
#ifdef ALLOW_RBCS |
46 |
if (useRBCptracers) then |
47 |
if (useRBCptrnum(iTracer)) then |
48 |
DO j=jMin,jMax |
49 |
DO i=iMin,iMax |
50 |
gPtr(I,J,K,bi,bj,iTracer) = gPtr(I,J,K,bi,bj,iTracer) |
51 |
& - maskC(I,J,K,bi,bj)* |
52 |
& RBC_mask(I,J,K,bi,bj)/tauRelax* |
53 |
& (pTracer(I,J,K,bi,bj,iTracer)- |
54 |
& RBC_ptracers(I,J,K,bi,bj,iTracer)) |
55 |
ENDDO |
56 |
ENDDO |
57 |
endif |
58 |
endif |
59 |
#endif /* ALLOW_RBCS */ |
60 |
|
61 |
RETURN |
62 |
END |