/[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.10 by heimbach, Thu Jan 17 16:55:25 2002 UTC revision 1.39 by adcroft, Tue Oct 19 17:42:27 2004 UTC
# Line 1  Line 1 
1  C $Header$  C $Header$
2  C $Name$  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 18  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       |-- AIM_INIT  C       |-- PTRACERS_INIT
41    C       |
42    C       |-- LAND_INI_VARS
43  C       |  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 41  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 48  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) CALL DEBUG_ENTER('PACKAGES_INIT_VARIABLES',myThid)
80    #endif
81    
82    #ifdef ALLOW_CD_CODE
83    C--   Initialize CD_CODE variables:
84    C- note(jmc): before packaging CD_CODE, was done within ini_fields (=called before),
85    C             therefore call CD-ini-vars before others pkg.
86    #ifdef ALLOW_DEBUG
87          IF (debugMode) CALL DEBUG_CALL('CD_CODE_INI',myThid)
88    #endif
89          IF (useCDscheme) CALL CD_CODE_INI_VARS( myThid )
90    #endif
91    
92  #ifdef ALLOW_GMREDI  #ifdef ALLOW_GMREDI
93  C--   Initialize GM/Redi parameterization  C--   Initialize GM/Redi parameterization
94    #ifdef ALLOW_DEBUG
95          IF (debugMode) CALL DEBUG_CALL('CD_CODE_INI',myThid)
96    #endif
97        IF (useGMRedi) CALL GMREDI_INIT( myThid )        IF (useGMRedi) CALL GMREDI_INIT( myThid )
98  #endif  #endif
99    
100  #ifdef ALLOW_KPP  #ifdef ALLOW_KPP
101  C--   Initialize KPP vertical mixing scheme.  C--   Initialize KPP vertical mixing scheme.
102        IF (useKPP) THEN        IF (useKPP) THEN
103    #ifdef ALLOW_DEBUG
104           IF (debugMode) CALL DEBUG_CALL('KPP_INIT + KPP_OPEN_DIAGS',myThid)
105    #endif
106         CALL KPP_INIT( myThid )         CALL KPP_INIT( myThid )
107         CALL KPP_OPEN_DIAGS( myThid )         CALL KPP_OPEN_DIAGS( myThid )
108        ENDIF        ENDIF
109  #endif  #endif
110    
111  #ifdef ALLOW_OBCS  #ifdef ALLOW_PP81
112  C--   Open boundaries data  C--   Initialize PP81 vertical mixing scheme.
113        IF (useOBCS) THEN        IF (usePP81) THEN
114          CALL OBCS_INIT_VARIABLES( myThid )  #ifdef ALLOW_DEBUG
115          IF (debugMode) CALL DEBUG_CALL('PP81_INIT',myThid)
116    #endif
117           CALL PP81_INIT( myThid )
118        ENDIF        ENDIF
119  #endif  #endif
120    
121  #ifdef ALLOW_AIM  #ifdef ALLOW_MY82
122        IF ( useAIM ) CALL AIM_INIT( mythid )  C--   Initialize MY82 vertical mixing scheme.
123          IF (useMY82) THEN
124           CALL MY82_INIT( myThid )
125          ENDIF
126  #endif  #endif
127    
128  #if (defined (ALLOW_ADJOINT_RUN) || defined (ALLOW_TANGENTLINEAR_RUN))  #ifdef ALLOW_GGL90
129  c--   Map the control variables onto the model state.  C--   Initialize GGL90 vertical mixing scheme.
130        call ctrl_map_ini( mythid )        IF (useGGL90) THEN
131        _BARRIER  #ifdef ALLOW_DEBUG
132  c--   Initialise the cost function.        IF (debugMode) CALL DEBUG_CALL('GGL90_INIT',myThid)
133        call cost_init( mythid )  #endif
134           CALL GGL90_INIT( myThid )
135          ENDIF
136    #endif
137    
138    #ifdef ALLOW_SEAICE
139    C--   Initialize SEAICE model.
140    #ifdef ALLOW_DEBUG
141          IF (debugMode) CALL DEBUG_CALL('SEAICE_INIT',myThid)
142    #endif
143          IF (useSEAICE) CALL SEAICE_INIT( myThid )
144    #endif
145    
146    cph-- moved further down
147    cph#ifdef ALLOW_OBCS
148    cphC--   Open boundaries data
149    cph      IF (useOBCS) THEN
150    cph        CALL OBCS_INIT_VARIABLES( myThid )
151    cph      ENDIF
152    cph#endif
153    
154    #ifdef ALLOW_PTRACERS
155    # ifndef ALLOW_AUTODIFF_TAMC
156          IF ( usePTRACERS ) THEN
157    # endif
158    #ifdef ALLOW_DEBUG
159          IF (debugMode) CALL DEBUG_CALL('PTRACERS_INIT',myThid)
160    #endif
161             CALL PTRACERS_INIT( mythid )
162    #ifdef ALLOW_GCHEM
163             CALL GCHEM_INIT_VARI( mythid )
164    #endif
165    # ifndef ALLOW_AUTODIFF_TAMC
166          ENDIF
167    # endif
168    #endif
169    
170    #ifdef ALLOW_LAND
171    #ifdef ALLOW_DEBUG
172          IF (debugMode) CALL DEBUG_CALL('LAND_INI_VARS',myThid)
173    #endif
174          IF ( useLAND ) CALL LAND_INI_VARS( mythid )
175    #endif
176    
177    #ifdef ALLOW_AUTODIFF
178    CADJ STORE theta = tapelev_init, key = 1
179    c--   Initialise auxiliary xx_ fields
180          CALL CTRL_INIT_VARIABLES ( mythid )
181    c--   Map the control variables onto the model state.
182    #ifdef ALLOW_ECCO
183          CALL CTRL_MAP_INI_ECCO( mythid )
184    #else
185          CALL CTRL_MAP_INI( mythid )
186    #endif
187        _BARRIER        _BARRIER
188  #endif  #endif
189    
190  #ifdef INCLUDE_EXTERNAL_FORCING_PACKAGE  #ifdef ALLOW_EXF
191    #ifdef ALLOW_DEBUG
192          IF (debugMode) CALL DEBUG_CALL('EXF_INIT',myThid)
193    #endif
194        CALL EXF_INIT( mythid )        CALL EXF_INIT( mythid )
195  #else  cph#else
196    #endif
197    #ifdef ALLOW_DEBUG
198          IF (debugMode) CALL DEBUG_CALL('INI_FORCING',myThid)
199    #endif
200        CALL INI_FORCING( mythid )        CALL INI_FORCING( mythid )
201    cph#endif
202    
203    #ifdef ALLOW_EBM
204    # ifdef ALLOW_AUTODIFF
205    CADJ STORE theta = tapelev_init, key = 1
206    # endif
207          IF (useEBM) CALL EBM_INI_VARS( mythid )
208  #endif  #endif
209    
210  #ifdef INCLUDE_ECCO_PACKAGE  #ifdef ALLOW_COST
211        IF (useECCO) THEN  c--   Initialise the cost function.
212         CALL ECCO_INIT( myThid )  ceh3 needs an IF ( useCOST ) THEN
213        ENDIF        CALL COST_INITVARIA( mythid )
214          _BARRIER
215  #endif  #endif
216    
217    #ifdef ALLOW_OBCS
218    C--   Open boundaries data
219    #ifdef ALLOW_DEBUG
220          IF (debugMode) CALL DEBUG_CALL('OBCS_INIT_VARIABLES',myThid)
221    #endif
222          IF (useOBCS) CALL OBCS_INIT_VARIABLES( myThid )
223    #endif
224    
225    #ifdef ALLOW_BULK_FORCE
226          IF (useBulkForce) CALL BULKF_INIT( mythid)
227    #endif
228    
229    #ifdef ALLOW_THSICE
230    #ifdef ALLOW_DEBUG
231          IF (debugMode) CALL DEBUG_CALL('THSICE_INI_VARS',myThid)
232    #endif
233          IF (useThSIce) CALL THSICE_INI_VARS( mythid)
234    #endif
235    
236    #ifdef COMPONENT_MODULE
237    #ifdef ALLOW_DEBUG
238          IF (debugMode) CALL DEBUG_CALL('CPL_INI_VARS',myThid)
239    #endif
240          IF (useCoupler) CALL CPL_INI_VARS( mythid )
241    #endif
242    
243    C AMM
244    #ifdef ALLOW_FIZHI
245    C Initialize FIZHI state variables
246    #ifdef ALLOW_DEBUG
247          IF (debugMode) CALL DEBUG_CALL('FIZHI_INIT_VARS',myThid)
248    #endif
249          IF (useFIZHI) CALL FIZHI_INIT_VARS( mythid)
250    #endif
251    C AMM
252    
253    #ifdef ALLOW_DEBUG
254          IF (debugMode) CALL DEBUG_LEAVE('PACKAGES_INIT_VARIABLES',myThid)
255    #endif
256        RETURN        RETURN
257        END        END

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.39

  ViewVC Help
Powered by ViewVC 1.1.22