/[MITgcm]/MITgcm_contrib/ocean_inversion_project/code/ptracers_init.F
ViewVC logotype

Annotation of /MITgcm_contrib/ocean_inversion_project/code/ptracers_init.F

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


Revision 1.1 - (hide annotations) (download)
Thu Sep 18 02:33:38 2003 UTC (21 years, 10 months ago) by dimitri
Branch: MAIN
Modifications and input files needed to compute tracer
Green's functions for Gruber's ocean inversion project.

1 dimitri 1.1 C $Header: /u/gcmpack/MITgcm/pkg/ptracers/ptracers_init.F,v 1.4 2003/07/09 20:00:58 stephd 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     cdm This file is customized to compute CO2 perturbations from 30 ocean
18     cdm regions for Gruber's ocean inversion project.
19    
20     C !USES: ===============================================================
21     IMPLICIT NONE
22     #include "SIZE.h"
23     #include "EEPARAMS.h"
24     #include "PARAMS.h"
25     #include "GRID.h"
26     #include "PTRACERS.h"
27     cswdptr -- add ---
28     #ifdef ALLOW_GCHEM
29     # include "GCHEM.h"
30     #endif
31     cswdptr --- end add --
32    
33    
34     C !INPUT PARAMETERS: ===================================================
35     C myThid :: thread number
36     INTEGER myThid
37    
38     C !OUTPUT PARAMETERS: ==================================================
39     C none
40    
41     #ifdef ALLOW_PTRACERS
42    
43     C !LOCAL VARIABLES: ====================================================
44     C i,j,k,bi,bj,iTracer :: loop indices
45     INTEGER i,j,k,bi,bj,iTracer
46     CHARACTER*(10) suff
47     #ifndef ALLOW_GCHEM
48     INTEGER tIter0
49     PARAMETER ( tIter0 = 0 )
50     #endif
51     CEOP
52    
53     C Loop over tracers
54     DO iTracer = 1, PTRACERS_num
55    
56     C Loop over tiles
57     DO bj = myByLo(myThid), myByHi(myThid)
58     DO bi = myBxLo(myThid), myBxHi(myThid)
59    
60     C Initialize arrays in common blocks :
61     DO k=1,Nr
62     DO j=1-Oly,sNy+OLy
63     DO i=1-Olx,sNx+Olx
64     pTracer(i,j,k,bi,bj,iTracer) = 0. _d 0
65     gPtr(i,j,k,bi,bj,iTracer) = 0. _d 0
66     gPtrNM1(i,j,k,bi,bj,iTracer) = 0. _d 0
67     ENDDO
68     ENDDO
69     ENDDO
70    
71     C end bi,bj loops
72     ENDDO
73     ENDDO
74    
75     C end of Tracer loop
76     ENDDO
77    
78     C Read from a pickup file if nIter0
79     cswdptr IF (nIter0.NE.0) THEN
80     cswdptr -- change --
81     IF (nIter0.GT.tIter0) THEN
82     C-- Suffix for pickup files
83     IF (pickupSuff.EQ.' ') THEN
84     WRITE(suff,'(I10.10)') nIter0
85     ELSE
86     WRITE(suff,'(A10)') pickupSuff
87     ENDIF
88     CALL PTRACERS_READ_CHECKPOINT( nIter0,myThid )
89     ENDIF
90    
91     cdm Initialize pTracerMasks
92     CALL PTRACERS_READ_MASK ( mythid )
93    
94     #endif /* ALLOW_PTRACERS */
95    
96     RETURN
97     END

  ViewVC Help
Powered by ViewVC 1.1.22