/[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.3 - (show annotations) (download)
Thu Nov 20 02:26:18 2003 UTC (20 years, 6 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint53f_post, checkpoint54a_pre, checkpoint53b_pre, checkpoint52l_pre, checkpoint52e_pre, hrcube4, hrcube5, checkpoint52j_post, checkpoint54b_post, checkpoint52e_post, checkpoint52d_pre, checkpoint53c_post, checkpoint53d_post, checkpoint52j_pre, checkpoint54a_post, branch-netcdf, checkpoint52b_pre, checkpoint52n_post, checkpoint52m_post, checkpoint53a_post, checkpoint53b_post, checkpoint52l_post, checkpoint52k_post, checkpoint54, checkpoint53, checkpoint52d_post, checkpoint52b_post, checkpoint53g_post, checkpoint52f_post, checkpoint52c_post, checkpoint53d_pre, checkpoint52i_post, checkpoint52i_pre, checkpoint52h_pre, checkpoint52f_pre, hrcube_1, hrcube_2, hrcube_3
Branch point for: netcdf-sm0
Changes since 1.2: +5 -1 lines
o sort out interplay between tamc.h and PTRACERS_OPTIONS.h
  (need info on NUMBER_OF_PTRACERS)
o missing PTRACERS headers in some routines
o default tamc.h in pkg/autodiff supposed to crash
  to ensure proper customization

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

  ViewVC Help
Powered by ViewVC 1.1.22