/[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.2 - (show annotations) (download)
Fri Jun 27 01:56:17 2003 UTC (20 years, 10 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint51k_post, checkpoint51l_post, checkpoint51j_post, checkpoint51n_pre, branchpoint-genmake2, checkpoint51r_post, checkpoint51o_pre, checkpoint51i_post, checkpoint51e_post, checkpoint51b_post, checkpoint51l_pre, checkpoint51c_post, checkpoint51o_post, checkpoint51f_pre, checkpoint51q_post, checkpoint52, checkpoint52a_post, checkpoint51h_pre, checkpoint51g_post, ecco_c52_e35, checkpoint51f_post, checkpoint52a_pre, checkpoint51d_post, checkpoint51m_post, checkpoint51t_post, checkpoint51p_post, checkpoint51n_post, checkpoint51i_pre, checkpoint51u_post, checkpoint51s_post
Branch point for: branch-genmake2, branch-nonh, tg2-branch, checkpoint51n_branch
Changes since 1.1: +28 -2 lines
o disentangled ALLOW_PTRACERS using new ALLOW_GCHEM
o made ptracers_forcing same as external_forcing_s

1 C $Header: /u/gcmpack/MITgcm/pkg/ptracers/ptracers_impldiff.F,v 1.1 2002/03/04 19:01:29 adcroft 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.h"
21 #include "PARAMS.h"
22 #include "GRID.h"
23 #ifdef ALLOW_AUTODIFF_TAMC
24 # include "tamc.h"
25 # include "tamc_keys.h"
26 #endif
27
28 C !INPUT PARAMETERS: ===================================================
29 C bi,bj :: tile indices
30 C KappaR :: vertical diffusion coefficient
31 C myThid :: thread number
32 INTEGER bi,bj
33 _RL KappaR(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
34 INTEGER myThid
35
36 C !OUTPUT PARAMETERS: ==================================================
37 C none
38
39 #ifdef ALLOW_PTRACERS
40
41 C !LOCAL VARIABLES: ====================================================
42 C iTracer :: tracer index
43 INTEGER iTracer
44 INTEGER iMin,iMax,jMin,jMax
45 CEOP
46
47 iMin=0
48 iMax=sNx+1
49 jMin=0
50 jMax=sNy+1
51
52 C Loop over tracers
53 DO iTracer=1,PTRACERS_numInUse
54
55 #ifdef ALLOW_AUTODIFF_TAMC
56 act0 = iTracer - 1
57 max0 = NUMBER_OF_PTRACERS
58 act1 = bi - myBxLo(myThid)
59 max1 = myBxHi(myThid) - myBxLo(myThid) + 1
60 act2 = bj - myByLo(myThid)
61 max2 = myByHi(myThid) - myByLo(myThid) + 1
62 act3 = myThid - 1
63 max3 = nTx*nTy
64 act4 = ikey_dynamics - 1
65 iptrkey = (act0 + 1)
66 & + act1*max0
67 & + act2*max0*max1
68 & + act3*max0*max1*max2
69 & + act4*max0*max1*max2*max3
70 #endif /* ALLOW_AUTODIFF_TAMC */
71
72 #ifdef ALLOW_AUTODIFF_TAMC
73 CADJ STORE gPtr(:,:,:,bi,bj,iTracer) = comlev1_bibj_ptracers,
74 CADJ & key=iptrkey, byte=isbyte
75 #endif /* ALLOW_AUTODIFF_TAMC */
76
77 CALL IMPLDIFF(
78 I bi, bj, iMin, iMax, jMin, jMax,
79 I deltaTtracer, KappaR, recip_HFacC,
80 U gPtr(1-Olx,1-Oly,1,bi,bj,iTracer),
81 I myThid )
82
83 C End of tracer loop
84 ENDDO
85
86 #endif /* ALLOW_PTRACERS */
87
88 RETURN
89 END

  ViewVC Help
Powered by ViewVC 1.1.22