/[MITgcm]/MITgcm_contrib/dcarroll/highres_darwin/code/ptracers_apply_forcing.F
ViewVC logotype

Contents of /MITgcm_contrib/dcarroll/highres_darwin/code/ptracers_apply_forcing.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Sun Sep 22 21:23:47 2019 UTC (5 years, 10 months ago) by dcarroll
Branch: MAIN
CVS Tags: HEAD
Initial check in of high resolution Darwin simulation code

1 C $Header: /u/gcmpack/MITgcm/pkg/ptracers/ptracers_apply_forcing.F,v 1.4 2017/08/12 23:49:10 jmc Exp $
2 C $Name: $
3
4 #include "PTRACERS_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: PTRACERS_APPLY_FORCING
8
9 C !INTERFACE: ==========================================================
10 SUBROUTINE PTRACERS_APPLY_FORCING(
11 U gPtracer,
12 I surfForcPtr,
13 I iMin,iMax,jMin,jMax, k, bi, bj,
14 I iTracer, myTime, myIter, myThid )
15
16 C !DESCRIPTION:
17 C Apply passive tracer forcing, i.e., sources and sinks of tracer,
18 C by adding forcing terms to the tendency array
19
20 C !USES: ===============================================================
21 IMPLICIT NONE
22 #include "SIZE.h"
23 #include "EEPARAMS.h"
24 #include "PARAMS.h"
25 #include "GRID.h"
26 #include "PTRACERS_SIZE.h"
27 #include "PTRACERS_PARAMS.h"
28 #include "PTRACERS_FIELDS.h"
29
30 C !INPUT PARAMETERS: ===================================================
31 C gPtracer :: the tendency array
32 C surfForcPtr :: surface forcing term
33 C iMin iMax jMin jMax :: working range of tile for applying forcing
34 C k :: vertical level number
35 C bi,bj :: tile indices
36 C iTracer :: tracer number
37 C myIter :: time-step number
38 C myTime :: model time
39 C myThid :: thread number
40 _RL gPtracer (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
41 _RL surfForcPtr(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
42 _RL gTR_arr (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
43 INTEGER iMin,iMax,jMin,jMax
44 INTEGER k, bi,bj, iTracer
45 _RL myTime
46 INTEGER myIter
47 INTEGER myThid
48
49 C !OUTPUT PARAMETERS: ==================================================
50 C gPtracer :: updates tendency array
51
52 #ifdef ALLOW_PTRACERS
53
54 C !LOCAL VARIABLES: ====================================================
55 C i,j :: loop indices
56 INTEGER i,j
57 INTEGER ptracerFlag
58 CEOP
59
60 if (iTracer.EQ.1) then
61
62 ptracerFlag = 1. _d 0
63
64 CALL SHELFICE_FORCING_TR(
65 O gTR_arr,
66 I ptracerFlag,iMin,iMax,jMin,jMax,k,bi,bj,
67 I myTime,0,myThid)
68
69 DO j=jMin,jMax
70 DO i=iMin,iMax
71
72 gPtracer(i,j) = gPtracer(i,j) +
73 & gTR_arr(i,j)
74
75 ENDDO
76 ENDDO
77
78 endif /* iTracer.EQ.1 */
79
80 if (iTracer.EQ.2) then
81
82 ptracerFlag = 2. _d 0
83
84 CALL SHELFICE_FORCING_TR(
85 O gTR_arr,
86 I ptracerFlag,iMin,iMax,jMin,jMax,k,bi,bj,
87 I myTime,0,myThid)
88
89 DO j=jMin,jMax
90 DO i=iMin,iMax
91
92 gPtracer(i,j) = gPtracer(i,j) +
93 & gTR_arr(i,j)
94
95 ENDDO
96 ENDDO
97
98 endif /* iTracer.EQ.2 */
99
100 if (iTracer.EQ.3) then
101
102 ptracerFlag = 3. _d 0
103
104 CALL SHELFICE_FORCING_TR(
105 O gTR_arr,
106 I ptracerFlag,iMin,iMax,jMin,jMax,k,bi,bj,
107 I myTime,0,myThid)
108
109 DO j=jMin,jMax
110 DO i=iMin,iMax
111
112 gPtracer(i,j) = gPtracer(i,j) +
113 & gTR_arr(i,j)
114
115 ENDDO
116 ENDDO
117
118 endif /* iTracer.EQ.3 */
119
120 #endif /* ALLOW_PTRACERS */
121
122 RETURN
123 END

  ViewVC Help
Powered by ViewVC 1.1.22