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

Diff of /MITgcm/model/src/packages_init_variables.F

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

revision 1.13 by jmc, Wed Oct 9 00:57:57 2002 UTC revision 1.40 by edhill, Wed Oct 20 14:16:23 2004 UTC
# Line 1  Line 1 
1    C $Header$
2    C $Name$
3    
4    #include "PACKAGES_CONFIG.h"
5    #include "AD_CONFIG.h"
6  #include "CPP_OPTIONS.h"  #include "CPP_OPTIONS.h"
7    
8  CBOP  CBOP
# Line 16  C     \ev Line 20  C     \ev
20  C     !CALLING SEQUENCE:  C     !CALLING SEQUENCE:
21  C     PACKAGES_INIT_VARIABLES  C     PACKAGES_INIT_VARIABLES
22  C       |  C       |
23    C       |-- CD_CODE_INI_VARS
24    C       |
25  C       |-- GMREDI_INIT  C       |-- GMREDI_INIT
26  C       |  C       |
27  C       |-- KPP_INIT  C       |-- KPP_INIT
28  C       |-- KPP_OPEN_DIAGS  C       |-- KPP_OPEN_DIAGS
29  C       |  C       |
30    C       |-- PP81_INIT
31    C       |
32    C       |-- MY82_INIT
33    C       |
34    C       |-- GGL90_INIT
35    C       |
36    C       |-- SEAICE_INIT
37    C       |
38  C       |-- OBCS_INIT_VARIABLES  C       |-- OBCS_INIT_VARIABLES
39  C       |  C       |
40    C       |-- PTRACERS_INIT
41    C       |
42    C       |-- LAND_INI_VARS
43    C       |
44  C       |-- CTRL_MAP_INI  C       |-- CTRL_MAP_INI
45  C       |  C       |
46  C       |-- COST_INIT  C       |-- EXF_INIT
47    C       |
48    C       |-- INI_FORCING
49  C       |  C       |
50  C       |-- ECCO_INIT  C       |-- ECCO_INIT
51  C       |  C       |
52  C       |-- INI_FORCING  C       |-- COST_INIT
53    C       |
54    C       |-- BULKF_INIT
55    C       |
56    C       |-- THSICE_INI_VARS
57    C       |
58    C       |-- CPL_INI_VARS
59    
60  C     !USES:  C     !USES:
61        IMPLICIT NONE        IMPLICIT NONE
# Line 37  C     === Global variables === Line 63  C     === Global variables ===
63  #include "SIZE.h"  #include "SIZE.h"
64  #include "EEPARAMS.h"  #include "EEPARAMS.h"
65  #include "PARAMS.h"  #include "PARAMS.h"
66    #ifdef ALLOW_AUTODIFF_TAMC
67    # include "DYNVARS.h"
68    # include "tamc.h"
69    # include "tamc_keys.h"
70    #endif
71    
72  C     !INPUT/OUTPUT PARAMETERS:  C     !INPUT/OUTPUT PARAMETERS:
73  C     === Routine arguments ===  C     === Routine arguments ===
# Line 44  C     myThid -  Number of this instances Line 75  C     myThid -  Number of this instances
75        INTEGER myThid        INTEGER myThid
76  CEOP  CEOP
77    
78    #ifdef ALLOW_DEBUG
79          IF (debugMode)
80         &     CALL DEBUG_ENTER('PACKAGES_INIT_VARIABLES',myThid)
81    #endif
82    
83    #ifdef ALLOW_CD_CODE
84    C--   Initialize CD_CODE variables:
85    C- note(jmc): before packaging CD_CODE, was done within ini_fields (=called before),
86    C             therefore call CD-ini-vars before others pkg.
87    #ifdef ALLOW_DEBUG
88          IF (debugMode) CALL DEBUG_CALL('CD_CODE_INI',myThid)
89    #endif
90          IF (useCDscheme) CALL CD_CODE_INI_VARS( myThid )
91    #endif
92    
93  #ifdef ALLOW_GMREDI  #ifdef ALLOW_GMREDI
94  C--   Initialize GM/Redi parameterization  C--   Initialize GM/Redi parameterization
95    #ifdef ALLOW_DEBUG
96          IF (debugMode) CALL DEBUG_CALL('CD_CODE_INI',myThid)
97    #endif
98        IF (useGMRedi) CALL GMREDI_INIT( myThid )        IF (useGMRedi) CALL GMREDI_INIT( myThid )
99  #endif  #endif
100    
101  #ifdef ALLOW_KPP  #ifdef ALLOW_KPP
102  C--   Initialize KPP vertical mixing scheme.  C--   Initialize KPP vertical mixing scheme.
103        IF (useKPP) THEN        IF (useKPP) THEN
104    #ifdef ALLOW_DEBUG
105           IF (debugMode)
106         &       CALL DEBUG_CALL('KPP_INIT + KPP_OPEN_DIAGS',myThid)
107    #endif
108         CALL KPP_INIT( myThid )         CALL KPP_INIT( myThid )
109         CALL KPP_OPEN_DIAGS( myThid )         CALL KPP_OPEN_DIAGS( myThid )
110        ENDIF        ENDIF
111  #endif  #endif
112    
113  #ifdef ALLOW_OBCS  #ifdef ALLOW_PP81
114  C--   Open boundaries data  C--   Initialize PP81 vertical mixing scheme.
115        IF (useOBCS) THEN        IF (usePP81) THEN
116          CALL OBCS_INIT_VARIABLES( myThid )  #ifdef ALLOW_DEBUG
117          IF (debugMode) CALL DEBUG_CALL('PP81_INIT',myThid)
118    #endif
119           CALL PP81_INIT( myThid )
120          ENDIF
121    #endif
122    
123    #ifdef ALLOW_MY82
124    C--   Initialize MY82 vertical mixing scheme.
125          IF (useMY82) THEN
126           CALL MY82_INIT( myThid )
127          ENDIF
128    #endif
129    
130    #ifdef ALLOW_GGL90
131    C--   Initialize GGL90 vertical mixing scheme.
132          IF (useGGL90) THEN
133    #ifdef ALLOW_DEBUG
134          IF (debugMode) CALL DEBUG_CALL('GGL90_INIT',myThid)
135    #endif
136           CALL GGL90_INIT( myThid )
137        ENDIF        ENDIF
138  #endif  #endif
139    
140    #ifdef ALLOW_SEAICE
141    C--   Initialize SEAICE model.
142    #ifdef ALLOW_DEBUG
143          IF (debugMode) CALL DEBUG_CALL('SEAICE_INIT',myThid)
144    #endif
145          IF (useSEAICE) CALL SEAICE_INIT( myThid )
146    #endif
147    
148    cph-- moved further down
149    cph#ifdef ALLOW_OBCS
150    cphC--   Open boundaries data
151    cph      IF (useOBCS) THEN
152    cph        CALL OBCS_INIT_VARIABLES( myThid )
153    cph      ENDIF
154    cph#endif
155    
156  #ifdef ALLOW_PTRACERS  #ifdef ALLOW_PTRACERS
157        IF ( usePTRACERS ) CALL PTRACERS_INIT( mythid )  # ifndef ALLOW_AUTODIFF_TAMC
158          IF ( usePTRACERS ) THEN
159    # endif
160    #ifdef ALLOW_DEBUG
161          IF (debugMode) CALL DEBUG_CALL('PTRACERS_INIT',myThid)
162    #endif
163             CALL PTRACERS_INIT( mythid )
164    #ifdef ALLOW_GCHEM
165             CALL GCHEM_INIT_VARI( mythid )
166    #endif
167    # ifndef ALLOW_AUTODIFF_TAMC
168          ENDIF
169    # endif
170  #endif  #endif
171    
172  #if (defined (ALLOW_ADJOINT_RUN) || defined (ALLOW_TANGENTLINEAR_RUN))  #ifdef ALLOW_LAND
173  c--   Map the control variables onto the model state.  #ifdef ALLOW_DEBUG
174        call ctrl_map_ini( mythid )        IF (debugMode) CALL DEBUG_CALL('LAND_INI_VARS',myThid)
175    #endif
176          IF ( useLAND ) CALL LAND_INI_VARS( mythid )
177    #endif
178    
179    #ifdef ALLOW_AUTODIFF
180    CADJ STORE theta = tapelev_init, key = 1
181    c--   Initialise auxiliary xx_ fields
182          CALL CTRL_INIT_VARIABLES ( mythid )
183    c--   Map the control variables onto the model state.
184    #ifdef ALLOW_ECCO
185          CALL CTRL_MAP_INI_ECCO( mythid )
186    #else
187          CALL CTRL_MAP_INI( mythid )
188    #endif
189        _BARRIER        _BARRIER
190  #endif  #endif
191    
192  #ifdef INCLUDE_EXTERNAL_FORCING_PACKAGE  #ifdef ALLOW_EXF
193    #ifdef ALLOW_DEBUG
194          IF (debugMode) CALL DEBUG_CALL('EXF_INIT',myThid)
195    #endif
196        CALL EXF_INIT( mythid )        CALL EXF_INIT( mythid )
197  #else  cph#else
198    #endif
199    #ifdef ALLOW_DEBUG
200          IF (debugMode) CALL DEBUG_CALL('INI_FORCING',myThid)
201    #endif
202        CALL INI_FORCING( mythid )        CALL INI_FORCING( mythid )
203    cph#endif
204    
205    #ifdef ALLOW_EBM
206    # ifdef ALLOW_AUTODIFF
207    CADJ STORE theta = tapelev_init, key = 1
208    # endif
209          IF (useEBM) CALL EBM_INI_VARS( mythid )
210  #endif  #endif
211    
212  #ifdef INCLUDE_ECCO_PACKAGE  #ifdef ALLOW_COST
       IF (useECCO) THEN  
        CALL ECCO_INIT( myThid )  
       ENDIF  
 #else  
 # ifdef ALLOW_COST  
213  c--   Initialise the cost function.  c--   Initialise the cost function.
214        call cost_init( mythid )  ceh3 needs an IF ( useCOST ) THEN
215          CALL COST_INITVARIA( mythid )
216        _BARRIER        _BARRIER
 # endif  
217  #endif  #endif
218    
219    #ifdef ALLOW_OBCS
220    C--   Open boundaries data
221    #ifdef ALLOW_DEBUG
222          IF (debugMode) CALL DEBUG_CALL('OBCS_INIT_VARIABLES',myThid)
223    #endif
224          IF (useOBCS) CALL OBCS_INIT_VARIABLES( myThid )
225    #endif
226    
227    #ifdef ALLOW_BULK_FORCE
228          IF (useBulkForce) CALL BULKF_INIT( mythid)
229    #endif
230    
231    #ifdef ALLOW_THSICE
232    #ifdef ALLOW_DEBUG
233          IF (debugMode) CALL DEBUG_CALL('THSICE_INI_VARS',myThid)
234    #endif
235          IF (useThSIce) CALL THSICE_INI_VARS( mythid)
236    #endif
237    
238    #ifdef COMPONENT_MODULE
239    #ifdef ALLOW_DEBUG
240          IF (debugMode) CALL DEBUG_CALL('CPL_INI_VARS',myThid)
241    #endif
242          IF (useCoupler) CALL CPL_INI_VARS( mythid )
243    #endif
244    
245    C AMM
246    #ifdef ALLOW_FIZHI
247    C Initialize FIZHI state variables
248    #ifdef ALLOW_DEBUG
249          IF (debugMode) CALL DEBUG_CALL('FIZHI_INIT_VARS',myThid)
250    #endif
251          IF (useFIZHI) CALL FIZHI_INIT_VARS( mythid)
252    #endif
253    C AMM
254    
255    #ifdef ALLOW_DEBUG
256          IF (debugMode)
257         &     CALL DEBUG_LEAVE('PACKAGES_INIT_VARIABLES',myThid)
258    #endif
259        RETURN        RETURN
260        END        END

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.40

  ViewVC Help
Powered by ViewVC 1.1.22