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

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

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


Revision 1.7 - (show annotations) (download)
Wed Sep 24 06:50:26 2003 UTC (20 years, 7 months ago) by dimitri
Branch: MAIN
CVS Tags: checkpoint51k_post, checkpoint53f_post, checkpoint54a_pre, checkpoint53b_pre, checkpoint51l_post, checkpoint51j_post, checkpoint52l_pre, checkpoint52e_pre, hrcube4, checkpoint52j_post, checkpoint51o_pre, checkpoint52e_post, checkpoint51n_pre, checkpoint52d_pre, checkpoint53c_post, checkpoint53d_post, branchpoint-genmake2, checkpoint52j_pre, checkpoint54a_post, branch-netcdf, checkpoint51r_post, checkpoint52b_pre, checkpoint52n_post, checkpoint54b_post, checkpoint51i_post, checkpoint51l_pre, checkpoint52m_post, checkpoint53a_post, hrcube5, checkpoint53b_post, checkpoint51o_post, checkpoint51q_post, checkpoint52l_post, checkpoint52k_post, checkpoint54, checkpoint53, checkpoint52, checkpoint52d_post, checkpoint52a_post, checkpoint52b_post, checkpoint53g_post, checkpoint52f_post, checkpoint52c_post, checkpoint51h_pre, checkpoint51g_post, ecco_c52_e35, checkpoint51f_post, checkpoint52a_pre, checkpoint51m_post, checkpoint51t_post, checkpoint53d_pre, checkpoint52i_post, checkpoint51p_post, checkpoint51n_post, checkpoint51i_pre, checkpoint52i_pre, checkpoint51u_post, checkpoint52h_pre, checkpoint52f_pre, hrcube_1, hrcube_2, hrcube_3, checkpoint51s_post
Branch point for: netcdf-sm0, branch-genmake2, branch-nonh, tg2-branch, checkpoint51n_branch
Changes since 1.6: +6 -1 lines
o Mods and bug fixes to pkg/cal, pkg/exf, etc., needed for computation
  of tracer Green's fucntions for ocean inversion project.

1 C $Header: /usr/local/gcmpack/MITgcm/pkg/ptracers/ptracers_init.F,v 1.6 2003/09/23 04:34:25 dimitri Exp $
2 C $Name: $
3
4 #include "PTRACERS_OPTIONS.h"
5 #ifdef ALLOW_GCHEM
6 # include "GCHEM_OPTIONS.h"
7 #endif
8
9 CBOP
10 C !ROUTINE: PTRACERS_INIT
11
12 C !INTERFACE: ==========================================================
13 SUBROUTINE PTRACERS_INIT( myThid )
14
15 C !DESCRIPTION:
16 C Initialize PTRACERS data structures
17
18 C !USES: ===============================================================
19 IMPLICIT NONE
20 #include "SIZE.h"
21 #include "EEPARAMS.h"
22 #include "PARAMS.h"
23 #include "GRID.h"
24 #include "PTRACERS.h"
25 cswdptr -- add ---
26 #ifdef ALLOW_GCHEM
27 # include "GCHEM.h"
28 #endif
29 cswdptr --- end add --
30
31
32 C !INPUT PARAMETERS: ===================================================
33 C myThid :: thread number
34 INTEGER myThid
35
36 C !OUTPUT PARAMETERS: ==================================================
37 C none
38
39 #ifdef ALLOW_PTRACERS
40
41 C !LOCAL VARIABLES: ====================================================
42 C i,j,k,bi,bj,iTracer :: loop indices
43 INTEGER i,j,k,bi,bj,iTracer
44 CHARACTER*(10) suff
45 #ifndef ALLOW_GCHEM
46 INTEGER tIter0
47 PARAMETER ( tIter0 = 0 )
48 #endif
49 CEOP
50
51 C Loop over tracers
52 DO iTracer = 1, PTRACERS_num
53
54 C Loop over tiles
55 DO bj = myByLo(myThid), myByHi(myThid)
56 DO bi = myBxLo(myThid), myBxHi(myThid)
57
58 C Initialize arrays in common blocks :
59 DO k=1,Nr
60 DO j=1-Oly,sNy+OLy
61 DO i=1-Olx,sNx+Olx
62 pTracer(i,j,k,bi,bj,iTracer) = 0. _d 0
63 gPtr(i,j,k,bi,bj,iTracer) = 0. _d 0
64 gPtrNM1(i,j,k,bi,bj,iTracer) = 0. _d 0
65 ENDDO
66 ENDDO
67 ENDDO
68 DO j=1-Oly,sNy+OLy
69 DO i=1-Olx,sNx+Olx
70 surfaceTendencyPtr(i,j,bi,bj,iTracer) = 0. _d 0
71 ENDDO
72 ENDDO
73
74 C end bi,bj loops
75 ENDDO
76 ENDDO
77
78 C end of Tracer loop
79 ENDDO
80
81 C Now read initial conditions and always exchange
82 cswdptr IF (nIter0.EQ.0) THEN
83 cswdptr -- change ---
84 IF (nIter0.EQ.tIter0) THEN
85 cswdptr -- end change ---
86 DO iTracer = 1, PTRACERS_numInUse
87 IF ( PTRACERS_initialFile(iTracer) .NE. ' ' ) THEN
88 _BEGIN_MASTER( myThid )
89 CALL READ_FLD_XYZ_RL(PTRACERS_initialFile(iTracer),' ',
90 & pTracer(1-Olx,1-Oly,1,1,1,iTracer) ,0,myThid)
91 _END_MASTER(myThid)
92
93 C Apply mask
94 DO bj = myByLo(myThid), myByHi(myThid)
95 DO bi = myBxLo(myThid), myBxHi(myThid)
96 DO K=1,Nr
97 DO J=1,sNy
98 DO I=1,sNx
99 IF(hFacC(I,J,K,bi,bj).EQ.0)
100 & pTracer(i,j,k,bi,bj,iTracer)=0.
101 ENDDO
102 ENDDO
103 ENDDO
104 ENDDO
105 ENDDO
106
107 ELSE
108 cswdptr -- add ---
109 cswdptr -- end add ---
110 ENDIF
111 _EXCH_XYZ_R8(pTracer(1-Olx,1-Oly,1,1,1,iTracer),myThid)
112 ENDDO
113 ENDIF
114
115 C Read from a pickup file if needed
116 cswdptr IF (nIter0.NE.0) THEN
117 cswdptr -- change --
118 IF (nIter0.GT.tIter0) THEN
119 C-- Suffix for pickup files
120 IF (pickupSuff.EQ.' ') THEN
121 WRITE(suff,'(I10.10)') nIter0
122 ELSE
123 WRITE(suff,'(A10)') pickupSuff
124 ENDIF
125 CALL PTRACERS_READ_CHECKPOINT( nIter0,myThid )
126 ENDIF
127
128 #endif /* ALLOW_PTRACERS */
129
130 RETURN
131 END

  ViewVC Help
Powered by ViewVC 1.1.22