8 |
|
|
9 |
C !INTERFACE: ========================================================== |
C !INTERFACE: ========================================================== |
10 |
SUBROUTINE PTRACERS_FORCING( |
SUBROUTINE PTRACERS_FORCING( |
11 |
I bi,bj,k,iTracer, |
I bi,bj,iMin,iMax,jMin,jMax,k,iTracer, |
12 |
U gPtracer, |
U gPtracer, |
13 |
I myIter,myTime,myThid ) |
I myIter,myTime,myThid ) |
14 |
|
|
27 |
|
|
28 |
C !INPUT PARAMETERS: =================================================== |
C !INPUT PARAMETERS: =================================================== |
29 |
C bi,bj :: tile indices |
C bi,bj :: tile indices |
30 |
|
C iMin iMax jMin jMax :: working range of tile for applying forcing |
31 |
C k :: vertical level number |
C k :: vertical level number |
32 |
C iTracer :: passive tracer index |
C iTracer :: passive tracer index |
33 |
C gPtracer :: the tendancy array |
C gPtracer :: the tendancy array |
34 |
C myIter :: time-step number |
C myIter :: time-step number |
35 |
C myTime :: model time |
C myTime :: model time |
36 |
C myThid :: thread number |
C myThid :: thread number |
37 |
INTEGER bi,bj,k,iTracer |
INTEGER bi,bj,iMin, iMax, jMin, jMax,k,iTracer |
38 |
_RL gPtracer(1-Olx:sNx+Olx,1-Oly:sNy+Oly,Nr,nSx,nSy) |
_RL gPtracer(1-Olx:sNx+Olx,1-Oly:sNy+Oly,Nr,nSx,nSy) |
39 |
INTEGER myIter |
INTEGER myIter |
40 |
_RL myTime |
_RL myTime |
48 |
C !LOCAL VARIABLES: ==================================================== |
C !LOCAL VARIABLES: ==================================================== |
49 |
C i,j :: loop indices |
C i,j :: loop indices |
50 |
INTEGER i,j |
INTEGER i,j |
51 |
|
C number of surface interface layer |
52 |
|
INTEGER kSurface |
53 |
CEOP |
CEOP |
54 |
|
|
55 |
C Example of how to add forcing at the surface |
if ( buoyancyRelation .eq. 'OCEANICP' ) then |
56 |
IF (k.EQ.1) THEN |
kSurface = Nr |
57 |
DO j=1-Oly,sNy+Oly |
else |
58 |
DO i=1-Olx,sNx+Olx |
kSurface = 1 |
59 |
|
endif |
60 |
C Here, we'll copy the exact forcing used for salinity to allow us |
|
61 |
C to test everything is working. |
C-- Surface forcing term is surfaceTendencyPtr, previously computed |
62 |
gPtracer(i,j,k,bi,bj)=gPtracer(i,j,k,bi,bj) |
C by PTRACERS_FORCING because it is needed by KPP_TRANSPORT_PTR. |
63 |
& +maskC(i,j,k,bi,bj)*surfaceTendencyS(i,j,bi,bj) |
|
64 |
|
IF ( k .EQ. kSurface ) THEN |
65 |
|
DO j=jMin,jMax |
66 |
|
DO i=iMin,iMax |
67 |
|
gPtracer(i,j,k,bi,bj) = gPtracer(i,j,k,bi,bj) + |
68 |
|
& maskC(i,j,k,bi,bj) * |
69 |
|
& surfaceTendencyPtr(i,j,bi,bj,iTracer) |
70 |
ENDDO |
ENDDO |
71 |
ENDDO |
ENDDO |
72 |
ENDIF |
ENDIF |