/[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.23 by stephd, Mon Oct 6 20:37:30 2003 UTC revision 1.41 by mlosch, Fri Nov 19 01:33:32 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  C       |-- SEAICE_INIT
37  C       |  C       |
38  C       |-- OBCS_INIT_VARIABLES  C       |-- OBCS_INIT_VARIABLES
# Line 41  C       |-- COST_INIT Line 53  C       |-- COST_INIT
53  C       |  C       |
54  C       |-- BULKF_INIT  C       |-- BULKF_INIT
55  C       |  C       |
56  C       |-- ICE_INIT  C       |-- THSICE_INI_VARS
57    C       |
58    C       |-- CPL_INI_VARS
59    
60  C     !USES:  C     !USES:
61        IMPLICIT NONE        IMPLICIT NONE
# Line 49  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 56  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_PP81
114    C--   Initialize PP81 vertical mixing scheme.
115          IF (usePP81) THEN
116    #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
138    #endif
139    
140  #ifdef ALLOW_SEAICE  #ifdef ALLOW_SEAICE
141  C--   Initialize SEAICE model.  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 )        IF (useSEAICE) CALL SEAICE_INIT( myThid )
146  #endif  #endif
147    
# Line 86  cph#endif Line 157  cph#endif
157  # ifndef ALLOW_AUTODIFF_TAMC  # ifndef ALLOW_AUTODIFF_TAMC
158        IF ( usePTRACERS ) THEN        IF ( usePTRACERS ) THEN
159  # endif  # endif
160    #ifdef ALLOW_DEBUG
161          IF (debugMode) CALL DEBUG_CALL('PTRACERS_INIT',myThid)
162    #endif
163           CALL PTRACERS_INIT( mythid )           CALL PTRACERS_INIT( mythid )
164  #ifdef ALLOW_GCHEM  #ifdef ALLOW_GCHEM
165           CALL GCHEM_INIT_VARI( mythid )  # ifndef ALLOW_AUTODIFF_TAMC
166             IF (useGCHEM) THEN
167    # endif
168              CALL GCHEM_INIT_VARI( mythid )
169    # ifndef ALLOW_AUTODIFF_TAMC
170             ENDIF
171    # endif
172  #endif  #endif
173  # ifndef ALLOW_AUTODIFF_TAMC  # ifndef ALLOW_AUTODIFF_TAMC
174        ENDIF        ENDIF
# Line 96  cph#endif Line 176  cph#endif
176  #endif  #endif
177    
178  #ifdef ALLOW_LAND  #ifdef ALLOW_LAND
179    #ifdef ALLOW_DEBUG
180          IF (debugMode) CALL DEBUG_CALL('LAND_INI_VARS',myThid)
181    #endif
182        IF ( useLAND ) CALL LAND_INI_VARS( mythid )        IF ( useLAND ) CALL LAND_INI_VARS( mythid )
183  #endif  #endif
184    
185  #if (defined (ALLOW_ADJOINT_RUN) || \  #ifdef ALLOW_AUTODIFF
186       defined (ALLOW_TANGENTLINEAR_RUN) || \  CADJ STORE theta = tapelev_init, key = 1
      defined (ALLOW_ECCO_OPTIMIZATION))  
187  c--   Initialise auxiliary xx_ fields  c--   Initialise auxiliary xx_ fields
188        CALL CTRL_INIT_VARIABLES ( mythid )        CALL CTRL_INIT_VARIABLES ( mythid )
189  c--   Map the control variables onto the model state.  c--   Map the control variables onto the model state.
190    #ifdef ALLOW_ECCO
191          CALL CTRL_MAP_INI_ECCO( mythid )
192    #else
193        CALL CTRL_MAP_INI( mythid )        CALL CTRL_MAP_INI( mythid )
194    #endif
195        _BARRIER        _BARRIER
196  #endif  #endif
197    
198  #ifdef INCLUDE_EXTERNAL_FORCING_PACKAGE  #ifdef ALLOW_EXF
199    #ifdef ALLOW_DEBUG
200          IF (debugMode) CALL DEBUG_CALL('EXF_INIT',myThid)
201    #endif
202        CALL EXF_INIT( mythid )        CALL EXF_INIT( mythid )
203  #else  cph#else
204    #endif
205    #ifdef ALLOW_DEBUG
206          IF (debugMode) CALL DEBUG_CALL('INI_FORCING',myThid)
207    #endif
208        CALL INI_FORCING( mythid )        CALL INI_FORCING( mythid )
209    cph#endif
210    
211    #ifdef ALLOW_EBM
212    # ifdef ALLOW_AUTODIFF
213    CADJ STORE theta = tapelev_init, key = 1
214    # endif
215          IF (useEBM) CALL EBM_INI_VARS( mythid )
216  #endif  #endif
217    
218  #ifdef ALLOW_COST  #ifdef ALLOW_COST
219  c--   Initialise the cost function.  c--   Initialise the cost function.
220    ceh3 needs an IF ( useCOST ) THEN
221        CALL COST_INITVARIA( mythid )        CALL COST_INITVARIA( mythid )
222        _BARRIER        _BARRIER
223  #endif  #endif
224    
225  #ifdef ALLOW_OBCS  #ifdef ALLOW_OBCS
226  C--   Open boundaries data  C--   Open boundaries data
227    #ifdef ALLOW_DEBUG
228          IF (debugMode) CALL DEBUG_CALL('OBCS_INIT_VARIABLES',myThid)
229    #endif
230        IF (useOBCS) CALL OBCS_INIT_VARIABLES( myThid )        IF (useOBCS) CALL OBCS_INIT_VARIABLES( myThid )
231  #endif  #endif
232    
 cswdblk -- begin add ---  
233  #ifdef ALLOW_BULK_FORCE  #ifdef ALLOW_BULK_FORCE
234        IF (useBulkForce) call BULKF_INIT( mythid)        IF (useBulkForce) CALL BULKF_INIT( mythid)
235    #endif
236    
237    #ifdef ALLOW_THSICE
238    #ifdef ALLOW_DEBUG
239          IF (debugMode) CALL DEBUG_CALL('THSICE_INI_VARS',myThid)
240    #endif
241          IF (useThSIce) CALL THSICE_INI_VARS( mythid)
242  #endif  #endif
 cswdblk ---end add ---  
243    
244  cswdice ---begin add ---  #ifdef COMPONENT_MODULE
245  #ifdef ALLOW_THERM_SEAICE  #ifdef ALLOW_DEBUG
246        IF (useThermSeaIce) call ICE_INIT( mythid)        IF (debugMode) CALL DEBUG_CALL('CPL_INI_VARS',myThid)
247    #endif
248          IF (useCoupler) CALL CPL_INI_VARS( mythid )
249  #endif  #endif
 cswdice ---end add ---  
250    
251    C AMM
252    #ifdef ALLOW_FIZHI
253    C Initialize FIZHI state variables
254    #ifdef ALLOW_DEBUG
255          IF (debugMode) CALL DEBUG_CALL('FIZHI_INIT_VARS',myThid)
256    #endif
257          IF (useFIZHI) CALL FIZHI_INIT_VARS( mythid)
258    #endif
259    C AMM
260    
261    #ifdef ALLOW_DEBUG
262          IF (debugMode)
263         &     CALL DEBUG_LEAVE('PACKAGES_INIT_VARIABLES',myThid)
264    #endif
265        RETURN        RETURN
266        END        END

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.41

  ViewVC Help
Powered by ViewVC 1.1.22