/[MITgcm]/MITgcm/pkg/ptracers/ptracers_forcing.F
ViewVC logotype

Contents of /MITgcm/pkg/ptracers/ptracers_forcing.F

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


Revision 1.16 - (show annotations) (download)
Tue Apr 6 20:27:45 2010 UTC (14 years ago) by jmc
Branch: MAIN
CVS Tags: checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62w, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint63i, checkpoint64, checkpoint63, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint64y, checkpoint64x, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f
Changes since 1.15: +2 -6 lines
cleanup RBCS calls

1 C $Header: /u/gcmpack/MITgcm/pkg/ptracers/ptracers_forcing.F,v 1.15 2007/12/17 21:20:38 jmc Exp $
2 C $Name: $
3
4 #include "PTRACERS_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: PTRACERS_FORCING
8
9 C !INTERFACE: ==========================================================
10 SUBROUTINE PTRACERS_FORCING(
11 I bi,bj,iMin,iMax,jMin,jMax,k,iTracer,
12 U gPtracer,surfPtracer,
13 I myIter,myTime,myThid )
14
15 C !DESCRIPTION:
16 C Adds sources and sinks of passive tracers to the tendency arrays
17
18 C !USES: ===============================================================
19 IMPLICIT NONE
20 #include "SIZE.h"
21 #include "EEPARAMS.h"
22 #include "PARAMS.h"
23 #include "GRID.h"
24
25 C !INPUT PARAMETERS: ===================================================
26 C bi,bj :: tile indices
27 C iMin iMax jMin jMax :: working range of tile for applying forcing
28 C k :: vertical level number
29 C iTracer :: tracer number
30 C gPtracer :: the tendency array
31 C surfPtracer :: surface forcing term
32 C myIter :: time-step number
33 C myTime :: model time
34 C myThid :: thread number
35 INTEGER bi,bj,iMin,iMax,jMin,jMax,k,iTracer
36 _RL gPtracer(1-Olx:sNx+Olx,1-Oly:sNy+Oly,Nr,nSx,nSy)
37 _RL surfPtracer(1-Olx:sNx+Olx,1-Oly:sNy+Oly,nSx,nSy)
38 INTEGER myIter
39 _RL myTime
40 INTEGER myThid
41
42 C !OUTPUT PARAMETERS: ==================================================
43 C gPtracer :: updates tendency array
44
45 #ifdef ALLOW_PTRACERS
46
47 C !LOCAL VARIABLES: ====================================================
48 C i,j :: loop indices
49 INTEGER i,j
50 C number of surface interface layer
51 INTEGER kSurface
52 CEOP
53
54 IF ( usingPCoords ) THEN
55 kSurface = Nr
56 ELSE
57 kSurface = 1
58 ENDIF
59
60 C-- Surface forcing term surfPtracer is previously computed by
61 C PTRACERS_FORCING_SURF (and stored as surfaceForcingPTr)
62 C because it is needed by KPP_TRANSPORT_PTR.
63
64 #ifdef ALLOW_GCHEM
65 IF ( useGCHEM )
66 & CALL GCHEM_ADD_TENDENCY(
67 I bi,bj,iMin,iMax,jMin,jMax,k,
68 I iTracer,
69 I myTime,myIter, myThid)
70 #endif /* ALLOW_GCHEM */
71
72 IF ( k .EQ. kSurface ) THEN
73 DO j=jMin,jMax
74 DO i=iMin,iMax
75 gPtracer(i,j,k,bi,bj) = gPtracer(i,j,k,bi,bj)
76 & + surfPtracer(i,j,bi,bj)
77 & *recip_drF(k)*recip_hFacC(i,j,k,bi,bj)
78 ENDDO
79 ENDDO
80 ENDIF
81
82 #ifdef ALLOW_RBCS
83 IF ( useRBCS ) THEN
84 CALL RBCS_ADD_TENDENCY(
85 I bi,bj,k,iTracer+2,
86 I myTime, myThid )
87 ENDIF
88 #endif /* ALLOW_RBCS */
89
90 #endif /* ALLOW_PTRACERS */
91
92 RETURN
93 END

  ViewVC Help
Powered by ViewVC 1.1.22