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

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

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


Revision 1.2.6.1 - (show annotations) (download)
Fri Mar 7 23:10:21 2003 UTC (21 years, 3 months ago) by heimbach
Branch: ecco-branch
CVS Tags: ecco_c50_e33a, ecco_c50_e28, ecco_c50_e32, ecco_c50_e33, ecco_c50_e31, ecco_c50_e29, ecco_c50_e30
Changes since 1.2: +7 -1 lines
merging c49 and e27

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

  ViewVC Help
Powered by ViewVC 1.1.22