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

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

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


Revision 1.6 - (show annotations) (download)
Tue Jan 18 19:37:41 2011 UTC (13 years, 3 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62s, checkpoint62r, checkpoint62w, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint63, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint63a, checkpoint63b, checkpoint63c
Changes since 1.5: +25 -1 lines
using ptracers with NLFS adjoint.

1 C $Header: /u/gcmpack/MITgcm/pkg/ptracers/ptracers_convect.F,v 1.5 2007/11/05 18:48:04 jmc Exp $
2 C $Name: $
3
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 C do passive tracers convection
14
15 C !USES: ===============================================================
16 IMPLICIT NONE
17 #include "SIZE.h"
18 #include "EEPARAMS.h"
19 #include "PTRACERS_SIZE.h"
20 #include "PTRACERS_PARAMS.h"
21 #include "PTRACERS_FIELDS.h"
22 #ifdef ALLOW_AUTODIFF_TAMC
23 # include "tamc.h"
24 # include "tamc_keys.h"
25 #endif
26
27 C !INPUT PARAMETERS: ===================================================
28 C bi,bj,k :: tile indices
29 C weightA :: weight for level K-1
30 C weightB :: weight for level K
31 C myThid :: thread number
32 INTEGER bi,bj,k
33 _RL weightA(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
34 _RL weightB(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
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 CEOP
46
47 C Loop over tracers
48 DO iTracer=1,PTRACERS_numInUse
49
50 #ifdef ALLOW_AUTODIFF_TAMC
51 act0 = iTracer - 1
52 max0 = PTRACERS_num
53 act1 = bi - myBxLo(myThid)
54 max1 = myBxHi(myThid) - myBxLo(myThid) + 1
55 act2 = bj - myByLo(myThid)
56 max2 = myByHi(myThid) - myByLo(myThid) + 1
57 act3 = myThid - 1
58 max3 = nTx*nTy
59 act4 = ikey_dynamics - 1
60 iptrkey = (act0 + 1)
61 & + act1*max0
62 & + act2*max0*max1
63 & + act3*max0*max1*max2
64 & + act4*max0*max1*max2*max3
65 kkey = (iptrkey-1)*Nr + k
66 CADJ STORE pTracer(:,:,k,bi,bj,iTracer)
67 CADJ & = comlev1_bibj_k_ptracers, key=kkey, byte=isbyte
68 #endif /* ALLOW_AUTODIFF_TAMC */
69
70 CALL CONVECTIVELY_MIXTRACER(
71 I bi,bj,k,weightA,weightB,
72 U pTracer(1-Olx,1-Oly,1,1,1,iTracer),
73 I myThid)
74
75 C End of tracer loop
76 ENDDO
77
78 #endif /* ALLOW_PTRACERS */
79
80 RETURN
81 END

  ViewVC Help
Powered by ViewVC 1.1.22