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

Annotation of /MITgcm/pkg/ptracers/ptracers_convect.F

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


Revision 1.7 - (hide annotations) (download)
Thu Mar 8 17:13:31 2012 UTC (12 years, 3 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint65b, checkpoint65c, checkpoint65a, checkpoint64, checkpoint65, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63k, checkpoint64y, checkpoint64x, checkpoint64z, 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.6: +8 -5 lines
-only step forward tracer if PTRACERS_StepFwd(iTr)=T

1 jmc 1.7 C $Header: /u/gcmpack/MITgcm/pkg/ptracers/ptracers_convect.F,v 1.6 2011/01/18 19:37:41 heimbach Exp $
2 jmc 1.2 C $Name: $
3 adcroft 1.1
4     #include "PTRACERS_OPTIONS.h"
5    
6     CBOP
7     C !ROUTINE: PTRACERS_CONVECT
8    
9     C !INTERFACE: ==========================================================
10     SUBROUTINE PTRACERS_CONVECT( bi,bj,k,weightA,weightB,myThid )
11    
12     C !DESCRIPTION:
13 jmc 1.4 C do passive tracers convection
14 adcroft 1.1
15     C !USES: ===============================================================
16     IMPLICIT NONE
17     #include "SIZE.h"
18     #include "EEPARAMS.h"
19 jmc 1.3 #include "PTRACERS_SIZE.h"
20 jmc 1.5 #include "PTRACERS_PARAMS.h"
21 jmc 1.7 #include "PTRACERS_START.h"
22 jmc 1.5 #include "PTRACERS_FIELDS.h"
23 heimbach 1.6 #ifdef ALLOW_AUTODIFF_TAMC
24     # include "tamc.h"
25     # include "tamc_keys.h"
26     #endif
27 adcroft 1.1
28     C !INPUT PARAMETERS: ===================================================
29     C bi,bj,k :: tile indices
30     C weightA :: weight for level K-1
31     C weightB :: weight for level K
32     C myThid :: thread number
33     INTEGER bi,bj,k
34     _RL weightA(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
35     _RL weightB(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
36     INTEGER myThid
37    
38     C !OUTPUT PARAMETERS: ==================================================
39     C none
40    
41     #ifdef ALLOW_PTRACERS
42    
43     C !LOCAL VARIABLES: ====================================================
44     C iTracer :: tracer index
45     INTEGER iTracer
46     CEOP
47    
48     C Loop over tracers
49     DO iTracer=1,PTRACERS_numInUse
50 jmc 1.7 IF ( PTRACERS_StepFwd(iTracer) ) THEN
51 adcroft 1.1
52 heimbach 1.6 #ifdef ALLOW_AUTODIFF_TAMC
53     act0 = iTracer - 1
54     max0 = PTRACERS_num
55     act1 = bi - myBxLo(myThid)
56     max1 = myBxHi(myThid) - myBxLo(myThid) + 1
57     act2 = bj - myByLo(myThid)
58     max2 = myByHi(myThid) - myByLo(myThid) + 1
59     act3 = myThid - 1
60     max3 = nTx*nTy
61     act4 = ikey_dynamics - 1
62     iptrkey = (act0 + 1)
63     & + act1*max0
64     & + act2*max0*max1
65     & + act3*max0*max1*max2
66     & + act4*max0*max1*max2*max3
67     kkey = (iptrkey-1)*Nr + k
68     CADJ STORE pTracer(:,:,k,bi,bj,iTracer)
69     CADJ & = comlev1_bibj_k_ptracers, key=kkey, byte=isbyte
70     #endif /* ALLOW_AUTODIFF_TAMC */
71    
72 jmc 1.7 CALL CONVECTIVELY_MIXTRACER(
73     I bi,bj,k,weightA,weightB,
74     U pTracer(1-OLx,1-OLy,1,1,1,iTracer),
75     I myThid )
76 adcroft 1.1
77     C End of tracer loop
78 jmc 1.7 ENDIF
79 adcroft 1.1 ENDDO
80    
81     #endif /* ALLOW_PTRACERS */
82    
83     RETURN
84     END

  ViewVC Help
Powered by ViewVC 1.1.22