/[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.10 - (show annotations) (download)
Mon Dec 19 19:11:28 2005 UTC (18 years, 5 months ago) by stephd
Branch: MAIN
CVS Tags: checkpoint58b_post, checkpoint58, checkpoint58f_post, checkpoint58d_post, checkpoint58a_post, checkpoint57z_post, checkpoint58t_post, checkpoint58m_post, checkpoint58o_post, checkpoint58p_post, checkpoint58q_post, checkpoint58e_post, checkpoint58r_post, checkpoint58n_post, checkpoint58k_post, checkpoint58l_post, checkpoint58g_post, checkpoint58h_post, checkpoint58j_post, checkpoint58i_post, checkpoint58c_post, checkpoint58s_post
Changes since 1.9: +3 -5 lines
o update RBCS call, to call new rbcs_add_tendency with switch
  for each ptracer

1 C $Header: /u/gcmpack/MITgcm/pkg/ptracers/ptracers_forcing.F,v 1.9 2005/12/08 00:14:26 stephd 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 tendancy arrays
17
18 C !USES: ===============================================================
19 IMPLICIT NONE
20 #include "SIZE.h"
21 #include "EEPARAMS.h"
22 #include "PARAMS.h"
23 c #include "FFIELDS.h"
24 c #include "DYNVARS.h"
25 #include "GRID.h"
26 #ifdef ALLOW_RBCS
27 #include "PTRACERS_SIZE.h"
28 #include "RBCS.h"
29 #endif
30
31 C !INPUT PARAMETERS: ===================================================
32 C bi,bj :: tile indices
33 C iMin iMax jMin jMax :: working range of tile for applying forcing
34 C k :: vertical level number
35 C iTracer :: tracer number
36 C gPtracer :: the tendancy array
37 C myIter :: time-step number
38 C myTime :: model time
39 C myThid :: thread number
40 INTEGER bi,bj,iMin,iMax,jMin,jMax,k,iTracer
41 _RL gPtracer(1-Olx:sNx+Olx,1-Oly:sNy+Oly,Nr,nSx,nSy)
42 _RL surfPtracer(1-Olx:sNx+Olx,1-Oly:sNy+Oly,nSx,nSy)
43 INTEGER myIter
44 _RL myTime
45 INTEGER myThid
46
47 C !OUTPUT PARAMETERS: ==================================================
48 C gPtracer :: updates tendancy array
49
50 #ifdef ALLOW_PTRACERS
51
52 C !LOCAL VARIABLES: ====================================================
53 C i,j :: loop indices
54 INTEGER i,j
55 C number of surface interface layer
56 INTEGER kSurface
57 CEOP
58
59 if ( buoyancyRelation .eq. 'OCEANICP' ) then
60 kSurface = Nr
61 else
62 kSurface = 1
63 endif
64
65 C-- Surface forcing term is surfaceForcingPtr, previously computed
66 C by PTRACERS_FORCING because it is needed by KPP_TRANSPORT_PTR.
67
68 #ifdef ALLOW_GCHEM
69 IF ( useGCHEM )
70 & CALL GCHEM_ADD_TENDENCY(
71 I bi,bj,iMin,iMax,jMin,jMax,k,
72 I iTracer,
73 I myTime,myIter, myThid)
74 #else /* ALLOW_GCHEM */
75 IF ( .NOT. useGCHEM .AND. k .EQ. kSurface ) THEN
76 DO j=jMin,jMax
77 DO i=iMin,iMax
78 gPtracer(i,j,k,bi,bj) = gPtracer(i,j,k,bi,bj)
79 & + surfPtracer(i,j,bi,bj)
80 & *recip_drF(k)*recip_hFacC(i,j,k,bi,bj)
81 ENDDO
82 ENDDO
83 ENDIF
84 #endif /* ALLOW_GCHEM */
85
86 #ifdef ALLOW_RBCS
87 if (useRBCptracers) then
88 CALL RBCS_ADD_TENDENCY(bi,bj,k,iTracer+2,
89 I myTime, myThid)
90 endif
91 #endif
92
93
94 #endif /* ALLOW_PTRACERS */
95
96 RETURN
97 END

  ViewVC Help
Powered by ViewVC 1.1.22