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

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

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


Revision 1.4 - (show annotations) (download)
Tue Jul 13 16:47:49 2004 UTC (19 years, 11 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint55c_post, checkpoint55d_pre, checkpoint55h_post, checkpoint54d_post, checkpoint54e_post, checkpoint55b_post, checkpoint55a_post, checkpoint55g_post, checkpoint55f_post, checkpoint55, checkpoint54f_post, checkpoint55e_post, checkpoint54c_post, checkpoint55d_post
Changes since 1.3: +3 -6 lines
max number of passive tracers is now defined in PTRACERS_SIZE.h

1 C $Header: /u/gcmpack/MITgcm/pkg/ptracers/ptracers_impldiff.F,v 1.3 2003/11/20 02:26:18 heimbach Exp $
2 C $Name: $
3
4 #include "PTRACERS_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: PTRACERS_IMPLDIFF
8
9 C !INTERFACE: ==========================================================
10 SUBROUTINE PTRACERS_IMPLDIFF( bi,bj,KappaR,myThid )
11
12 C !DESCRIPTION:
13 C Calls the implicit vertical diffusion routine for each passive
14 C tracer.
15
16 C !USES: ===============================================================
17 IMPLICIT NONE
18 #include "SIZE.h"
19 #include "EEPARAMS.h"
20 #include "PTRACERS_SIZE.h"
21 #include "PTRACERS.h"
22 #include "PARAMS.h"
23 #include "GRID.h"
24 #ifdef ALLOW_AUTODIFF_TAMC
25 # include "tamc.h"
26 # include "tamc_keys.h"
27 #endif
28
29 C !INPUT PARAMETERS: ===================================================
30 C bi,bj :: tile indices
31 C KappaR :: vertical diffusion coefficient
32 C myThid :: thread number
33 INTEGER bi,bj
34 _RL KappaR(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
35 INTEGER myThid
36
37 C !OUTPUT PARAMETERS: ==================================================
38 C none
39
40 #ifdef ALLOW_PTRACERS
41
42 C !LOCAL VARIABLES: ====================================================
43 C iTracer :: tracer index
44 INTEGER iTracer
45 INTEGER iMin,iMax,jMin,jMax
46 CEOP
47
48 iMin=0
49 iMax=sNx+1
50 jMin=0
51 jMax=sNy+1
52
53 C Loop over tracers
54 DO iTracer=1,PTRACERS_numInUse
55
56 #ifdef ALLOW_AUTODIFF_TAMC
57 act0 = iTracer - 1
58 max0 = PTRACERS_num
59 act1 = bi - myBxLo(myThid)
60 max1 = myBxHi(myThid) - myBxLo(myThid) + 1
61 act2 = bj - myByLo(myThid)
62 max2 = myByHi(myThid) - myByLo(myThid) + 1
63 act3 = myThid - 1
64 max3 = nTx*nTy
65 act4 = ikey_dynamics - 1
66 iptrkey = (act0 + 1)
67 & + act1*max0
68 & + act2*max0*max1
69 & + act3*max0*max1*max2
70 & + act4*max0*max1*max2*max3
71 #endif /* ALLOW_AUTODIFF_TAMC */
72
73 #ifdef ALLOW_AUTODIFF_TAMC
74 CADJ STORE gPtr(:,:,:,bi,bj,iTracer) = comlev1_bibj_ptracers,
75 CADJ & key=iptrkey, byte=isbyte
76 #endif /* ALLOW_AUTODIFF_TAMC */
77
78 CALL IMPLDIFF(
79 I bi, bj, iMin, iMax, jMin, jMax,
80 I deltaTtracer, KappaR, recip_HFacC,
81 U gPtr(1-Olx,1-Oly,1,bi,bj,iTracer),
82 I myThid )
83
84 C End of tracer loop
85 ENDDO
86
87 #endif /* ALLOW_PTRACERS */
88
89 RETURN
90 END

  ViewVC Help
Powered by ViewVC 1.1.22