/[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.11 by adcroft, Mon Mar 4 17:26:41 2002 UTC revision 1.54 by jmc, Tue Aug 15 14:58:32 2006 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 10  C     !INTERFACE: Line 12  C     !INTERFACE:
12    
13  C     !DESCRIPTION: \bv  C     !DESCRIPTION: \bv
14  C     *==========================================================*  C     *==========================================================*
15  C     | SUBROUTINE PACKAGES_INIT_VARIABLES                          C     | SUBROUTINE PACKAGES_INIT_VARIABLES
16  C     | o Does initialisation of package-related variable data      C     | o Does initialisation of package-related variable data
17  C     *==========================================================*  C     *==========================================================*
18  C     \ev  C     \ev
19    
20  C     !CALLING SEQUENCE:  C     !CALLING SEQUENCE:
21  C     PACKAGES_INIT_VARIABLES  C     PACKAGES_INIT_VARIABLES
22  C       |  C       |
23    C       |-- DIAGNOSTICS_INIT_VARIA
24    C       |
25    C       |-- CD_CODE_INI_VARS
26    C       |
27  C       |-- GMREDI_INIT  C       |-- GMREDI_INIT
28  C       |  C       |
29  C       |-- KPP_INIT  C       |-- KPP_INIT
30  C       |-- KPP_OPEN_DIAGS  C       |-- KPP_OPEN_DIAGS
31  C       |  C       |
32  C       |-- OBCS_INIT_VARIABLES  C       |-- PP81_INIT
33  C       |  C       |
34  C       |-- AIM_INIT  C       |-- MY82_INIT
35  C       |  C       |
36  C       |-- CTRL_MAP_INI  C       |-- GGL90_INIT
37    C       |
38    C       |-- SEAICE_INIT
39    C       |
40    C       |-- PTRACERS_INIT_VARIA
41  C       |  C       |
42  C       |-- COST_INIT  C       |-- GCHEM_INIT_VARI
43  C       |  C       |
44  C       |-- ECCO_INIT  C       |-- LAND_INI_VARS
45    C       |
46    C       |-- CTRL_INIT_VARIABLES
47    C       |-- CTRL_MAP_INI_ECCO
48    C       |-- CTRL_MAP_INI
49    C       |
50    C       |-- EXF_INIT
51  C       |  C       |
52  C       |-- INI_FORCING  C       |-- INI_FORCING
53    C       |
54    C       |-- EBM_INI_VARS
55    C       |
56    C       |-- COST_INIT_VARIA
57    C       |
58    C       |-- PROFILES_INIT_VARIA
59    C       |
60    C       |-- OBCS_INIT_VARIABLES
61    C       |
62    C       |-- BULKF_INIT_VARIA
63    C       |
64    C       |-- THSICE_INI_VARS
65    C       |
66    C       |-- CPL_INI_VARS
67    C       |
68    C       |-- FIZHI_INI_VARS
69    C       |
70    C       |-- MATRIX_INIT
71    C       |
72    C       |-- RBCS_INIT_VARIA
73    C       |
74    C       |-- REGRID_INIT_VARIA
75    C       |
76    C       |-- MYPACKAGE_INIT_VARIA
77    
78  C     !USES:  C     !USES:
79        IMPLICIT NONE        IMPLICIT NONE
# Line 41  C     === Global variables === Line 81  C     === Global variables ===
81  #include "SIZE.h"  #include "SIZE.h"
82  #include "EEPARAMS.h"  #include "EEPARAMS.h"
83  #include "PARAMS.h"  #include "PARAMS.h"
84    #ifdef ALLOW_AUTODIFF_TAMC
85    # include "DYNVARS.h"
86    # include "tamc.h"
87    # include "tamc_keys.h"
88    #endif
89    
90  C     !INPUT/OUTPUT PARAMETERS:  C     !INPUT/OUTPUT PARAMETERS:
91  C     === Routine arguments ===  C     === Routine arguments ===
# Line 48  C     myThid -  Number of this instances Line 93  C     myThid -  Number of this instances
93        INTEGER myThid        INTEGER myThid
94  CEOP  CEOP
95    
96    #ifdef ALLOW_DEBUG
97          IF (debugMode)
98         &     CALL DEBUG_ENTER('PACKAGES_INIT_VARIABLES',myThid)
99    #endif
100    
101    #ifdef ALLOW_DIAGNOSTICS
102          IF ( useDiagnostics ) THEN
103            CALL DIAGNOSTICS_INIT_VARIA( myThid )
104          ENDIF
105    #endif
106    
107    #ifdef ALLOW_CD_CODE
108    C--   Initialize CD_CODE variables:
109    C- note(jmc): before packaging CD_CODE, was done within ini_fields (=called before),
110    C             therefore call CD-ini-vars before others pkg.
111    #ifdef ALLOW_DEBUG
112          IF (debugMode) CALL DEBUG_CALL('CD_CODE_INI',myThid)
113    #endif
114          IF (useCDscheme) CALL CD_CODE_INI_VARS( myThid )
115    #endif
116    
117  #ifdef ALLOW_GMREDI  #ifdef ALLOW_GMREDI
118  C--   Initialize GM/Redi parameterization  C--   Initialize GM/Redi parameterization
119    #ifdef ALLOW_DEBUG
120          IF (debugMode) CALL DEBUG_CALL('CD_CODE_INI',myThid)
121    #endif
122        IF (useGMRedi) CALL GMREDI_INIT( myThid )        IF (useGMRedi) CALL GMREDI_INIT( myThid )
123  #endif  #endif
124    
125  #ifdef ALLOW_KPP  #ifdef ALLOW_KPP
126  C--   Initialize KPP vertical mixing scheme.  C--   Initialize KPP vertical mixing scheme.
127        IF (useKPP) THEN        IF (useKPP) THEN
128    #ifdef ALLOW_DEBUG
129           IF (debugMode)
130         &       CALL DEBUG_CALL('KPP_INIT + KPP_OPEN_DIAGS',myThid)
131    #endif
132         CALL KPP_INIT( myThid )         CALL KPP_INIT( myThid )
133         CALL KPP_OPEN_DIAGS( myThid )         CALL KPP_OPEN_DIAGS( myThid )
134        ENDIF        ENDIF
135  #endif  #endif
136    
137  #ifdef ALLOW_OBCS  #ifdef ALLOW_PP81
138  C--   Open boundaries data  C--   Initialize PP81 vertical mixing scheme.
139        IF (useOBCS) THEN        IF (usePP81) THEN
140          CALL OBCS_INIT_VARIABLES( myThid )  #ifdef ALLOW_DEBUG
141          IF (debugMode) CALL DEBUG_CALL('PP81_INIT',myThid)
142    #endif
143           CALL PP81_INIT( myThid )
144          ENDIF
145    #endif
146    
147    #ifdef ALLOW_MY82
148    C--   Initialize MY82 vertical mixing scheme.
149          IF (useMY82) THEN
150           CALL MY82_INIT( myThid )
151        ENDIF        ENDIF
152  #endif  #endif
153    
154  #ifdef ALLOW_AIM  #ifdef ALLOW_GGL90
155        IF ( useAIM ) CALL AIM_INIT( mythid )  C--   Initialize GGL90 vertical mixing scheme.
156          IF (useGGL90) THEN
157    #ifdef ALLOW_DEBUG
158          IF (debugMode) CALL DEBUG_CALL('GGL90_INIT',myThid)
159    #endif
160           CALL GGL90_INIT( myThid )
161          ENDIF
162  #endif  #endif
163    
164    #ifdef ALLOW_SEAICE
165    C--   Initialize SEAICE model.
166    #ifdef ALLOW_DEBUG
167          IF (debugMode) CALL DEBUG_CALL('SEAICE_INIT',myThid)
168    #endif
169          IF (useSEAICE) CALL SEAICE_INIT( myThid )
170    #endif
171    
172    cph-- moved further down
173    cph#ifdef ALLOW_OBCS
174    cphC--   Open boundaries data
175    cph      IF (useOBCS) THEN
176    cph        CALL OBCS_INIT_VARIABLES( myThid )
177    cph      ENDIF
178    cph#endif
179    
180  #ifdef ALLOW_PTRACERS  #ifdef ALLOW_PTRACERS
181        IF ( usePTRACERS ) CALL PTRACERS_INIT( mythid )  # ifndef ALLOW_AUTODIFF_TAMC
182          IF ( usePTRACERS ) THEN
183    # endif
184    #ifdef ALLOW_DEBUG
185          IF (debugMode) CALL DEBUG_CALL('PTRACERS_INIT_VARIA',myThid)
186    #endif
187             CALL PTRACERS_INIT_VARIA( myThid )
188    #ifdef ALLOW_GCHEM
189    # ifndef ALLOW_AUTODIFF_TAMC
190             IF (useGCHEM) THEN
191    # endif
192              CALL GCHEM_INIT_VARI( mythid )
193    # ifndef ALLOW_AUTODIFF_TAMC
194             ENDIF
195    # endif
196    #endif
197    # ifndef ALLOW_AUTODIFF_TAMC
198          ENDIF
199    # endif
200  #endif  #endif
201    
202  #if (defined (ALLOW_ADJOINT_RUN) || defined (ALLOW_TANGENTLINEAR_RUN))  #ifdef ALLOW_LAND
203  c--   Map the control variables onto the model state.  #ifdef ALLOW_DEBUG
204        call ctrl_map_ini( mythid )        IF (debugMode) CALL DEBUG_CALL('LAND_INI_VARS',myThid)
205        _BARRIER  #endif
206  c--   Initialise the cost function.        IF ( useLAND ) CALL LAND_INI_VARS( mythid )
207        call cost_init( mythid )  #endif
208    
209    #ifdef ALLOW_AUTODIFF
210    CADJ STORE theta = tapelev_init, key = 1
211    c--   Initialise auxiliary xx_ fields
212          CALL CTRL_INIT_VARIABLES ( mythid )
213    c--   Map the control variables onto the model state.
214    # ifdef ALLOW_ECCO
215          CALL CTRL_MAP_INI_ECCO( mythid )
216    # else
217          CALL CTRL_MAP_INI( mythid )
218    # endif
219        _BARRIER        _BARRIER
220  #endif  #endif
221    
222  #ifdef INCLUDE_EXTERNAL_FORCING_PACKAGE  #ifdef ALLOW_EXF
223    #ifdef ALLOW_DEBUG
224          IF (debugMode) CALL DEBUG_CALL('EXF_INIT',myThid)
225    #endif
226        CALL EXF_INIT( mythid )        CALL EXF_INIT( mythid )
227  #else  #endif
228    
229    #ifdef ALLOW_DEBUG
230          IF (debugMode) CALL DEBUG_CALL('INI_FORCING',myThid)
231    #endif
232        CALL INI_FORCING( mythid )        CALL INI_FORCING( mythid )
233    
234    #ifdef ALLOW_EBM
235    # ifdef ALLOW_AUTODIFF
236    CADJ STORE theta = tapelev_init, key = 1
237    # endif
238          IF (useEBM) CALL EBM_INI_VARS( mythid )
239  #endif  #endif
240    
241  #ifdef INCLUDE_ECCO_PACKAGE  #ifdef ALLOW_COST
242        IF (useECCO) THEN  c--   Initialise the cost function.
243         CALL ECCO_INIT( myThid )  ceh3 needs an IF ( useCOST ) THEN
244        ENDIF        CALL COST_INIT_VARIA( mythid )
245          _BARRIER
246    #endif
247    
248    #ifdef ALLOW_PROFILES
249    c--   Initialise the cost function.
250          CALL PROFILES_INIT_VARIA( mythid )
251          _BARRIER
252    #endif
253    
254    #ifdef ALLOW_OBCS
255    C--   Open boundaries data
256    #ifdef ALLOW_DEBUG
257          IF (debugMode) CALL DEBUG_CALL('OBCS_INIT_VARIABLES',myThid)
258    #endif
259          IF (useOBCS) CALL OBCS_INIT_VARIABLES( myThid )
260    #endif
261    
262    #ifdef ALLOW_BULK_FORCE
263          IF (useBulkForce) CALL BULKF_INIT_VARIA( mythid)
264    #endif
265    
266    #ifdef ALLOW_THSICE
267    #ifdef ALLOW_DEBUG
268          IF (debugMode) CALL DEBUG_CALL('THSICE_INI_VARS',myThid)
269    #endif
270          IF (useThSIce) CALL THSICE_INI_VARS( mythid)
271    #endif
272    
273    #ifdef COMPONENT_MODULE
274    #ifdef ALLOW_DEBUG
275          IF (debugMode) CALL DEBUG_CALL('CPL_INI_VARS',myThid)
276    #endif
277          IF (useCoupler) CALL CPL_INI_VARS( mythid )
278    #endif
279    
280    #ifdef ALLOW_FIZHI
281    C Initialize FIZHI state variables
282    #ifdef ALLOW_DEBUG
283          IF (debugMode) CALL DEBUG_CALL('FIZHI_INIT_VARS',myThid)
284    #endif
285          IF (useFIZHI) CALL FIZHI_INIT_VARS( mythid )
286    #endif
287    
288    #ifdef ALLOW_MATRIX
289    #ifdef ALLOW_DEBUG
290          IF (debugMode) CALL DEBUG_CALL('MATRIX_INIT',myThid)
291    #endif
292          IF ( useMATRIX ) CALL MATRIX_INIT( myThid )
293    #endif
294    
295    #ifdef ALLOW_RBCS
296          IF ( useRBCS ) CALL RBCS_INIT_VARIA( myThid )
297    #endif
298    
299    #ifdef ALLOW_REGRID
300          IF ( useREGRID ) CALL REGRID_INIT_VARIA( myThid )
301    #endif
302    
303    #ifdef ALLOW_MYPACKAGE
304          IF ( useMYPACKAGE ) CALL MYPACKAGE_INIT_VARIA( myThid )
305    #endif
306    
307    #ifdef ALLOW_DEBUG
308          IF (debugMode)
309         &     CALL DEBUG_LEAVE('PACKAGES_INIT_VARIABLES',myThid)
310  #endif  #endif
311    
312        RETURN        RETURN

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.54

  ViewVC Help
Powered by ViewVC 1.1.22