/[MITgcm]/MITgcm/model/src/ini_tr1.F
ViewVC logotype

Annotation of /MITgcm/model/src/ini_tr1.F

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


Revision 1.5 - (hide annotations) (download)
Fri Sep 17 22:57:11 2004 UTC (19 years, 8 months ago) by heimbach
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +1 -1 lines
FILE REMOVED
o remove all tr1-related code (ALLOW_PASSIVE_TRACER)
  (adjoint stuff still has some tr1 names, but all use ptracer arrays)

1 heimbach 1.5 C $Header: /u/gcmpack/MITgcm/model/src/ini_tr1.F,v 1.4 2003/10/09 04:19:18 edhill Exp $
2 cnh 1.2 C $Name: $
3 heimbach 1.1
4 edhill 1.4 #include "PACKAGES_CONFIG.h"
5 heimbach 1.1 #include "CPP_OPTIONS.h"
6    
7 cnh 1.2 CBOP
8     C !ROUTINE: INI_TR1
9     C !INTERFACE:
10 heimbach 1.1 SUBROUTINE INI_TR1( myThid )
11 cnh 1.2 C !DESCRIPTION: \bv
12     C *==========================================================*
13     C | SUBROUTINE INI_TR1
14     C | o Set initial tracer 1 distribution.
15     C *==========================================================*
16     C | Passive tracers 1-N can be initialised so as to
17     C | dye fluid.
18     C *==========================================================*
19     C \ev
20    
21     C !USES:
22 heimbach 1.1 IMPLICIT NONE
23     C === Global variables ===
24     #include "SIZE.h"
25     #include "EEPARAMS.h"
26     #include "PARAMS.h"
27     #include "GRID.h"
28     #include "DYNVARS.h"
29 jmc 1.3 #ifdef ALLOW_PASSIVE_TRACER
30 heimbach 1.1 #include "TR1.h"
31 jmc 1.3 #endif
32 heimbach 1.1
33 cnh 1.2 C !INPUT/OUTPUT PARAMETERS:
34 heimbach 1.1 C == Routine arguments ==
35     C myThid - Number of this instance of INI_TR1
36     INTEGER myThid
37    
38 jmc 1.3 #ifdef ALLOW_PASSIVE_TRACER
39    
40 cnh 1.2 C !LOCAL VARIABLES:
41 heimbach 1.1 C == Local variables ==
42     C iC, jC - Center of domain
43     C iD, jD - Disitance from domain center.
44     C rad - Radius of initial patch
45     C rD - Radial displacement of point I,J
46     C iG, jG - Global coordinate index
47     C bi,bj - Loop counters
48     C I,J,K
49     INTEGER iC, jC, iD, jD
50     INTEGER iG, jG
51     INTEGER bi, bj
52     INTEGER I, J, K, localWarnings
53     _RL rad, rD
54     CHARACTER*(MAX_LEN_MBUF) msgBuf
55 cnh 1.2 CEOP
56 heimbach 1.1
57     _BARRIER
58 edhill 1.4
59     ceh3 this perhaps needs an IF ( usePASSIVE_TRACER ) THEN
60 heimbach 1.1
61     C-- Initialise tracer to inline.
62     DO bj = myByLo(myThid), myByHi(myThid)
63     DO bi = myBxLo(myThid), myBxHi(myThid)
64     DO K=1,Nr
65     DO J=1,sNy
66     DO I=1,sNx
67     IF ( K .EQ. 1 .AND. hFacC(I,J,K,bi,bj) .NE. 0 ) THEN
68     tr1(I,J,K,bi,bj) = 1. _d 0
69     ELSE
70     tr1(I,J,K,bi,bj) = 0. _d 0
71     ENDIF
72     ENDDO
73     ENDDO
74     ENDDO
75     ENDDO
76     ENDDO
77     C Set initial tendency terms
78     localWarnings=0
79     DO bj = myByLo(myThid), myByHi(myThid)
80     DO bi = myBxLo(myThid), myBxHi(myThid)
81     DO K=1,Nr
82     DO J=1,sNy
83     DO I=1,sNx
84     gtr1 (I,J,K,bi,bj) = 0. _d 0
85     gtr1NM1(I,J,K,bi,bj) = 0. _d 0
86     ENDDO
87     ENDDO
88     ENDDO
89     ENDDO
90     ENDDO
91     C
92     _EXCH_XYZ_R8(tr1 , myThid )
93     _EXCH_XYZ_R8(gtr1 , myThid )
94     _EXCH_XYZ_R8(gtr1NM1 , myThid )
95    
96     CALL PLOT_FIELD_XYZRL( tr1, 'Initial TR1' ,
97     & Nr, 1, myThid )
98 jmc 1.3
99     #endif /* ALLOW_PASSIVE_TRACER */
100 heimbach 1.1
101     RETURN
102     END

  ViewVC Help
Powered by ViewVC 1.1.22