1 |
jmc |
1.7 |
C $Header: /u/gcmpack/MITgcm/model/src/load_fields_driver.F,v 1.6 2007/11/05 18:52:21 jmc Exp $ |
2 |
jmc |
1.1 |
C $Name: $ |
3 |
|
|
|
4 |
jmc |
1.7 |
|
5 |
jmc |
1.1 |
#include "PACKAGES_CONFIG.h" |
6 |
|
|
#include "CPP_OPTIONS.h" |
7 |
|
|
|
8 |
|
|
c#ifdef ALLOW_GMREDI |
9 |
|
|
c# include "GMREDI_OPTIONS.h" |
10 |
|
|
c#endif |
11 |
|
|
c#ifdef ALLOW_OBCS |
12 |
|
|
c# include "OBCS_OPTIONS.h" |
13 |
|
|
c#endif |
14 |
|
|
|
15 |
|
|
CBOP |
16 |
|
|
C !ROUTINE: LOAD_FIELDS_DRIVER |
17 |
|
|
C !INTERFACE: |
18 |
|
|
SUBROUTINE LOAD_FIELDS_DRIVER( myTime, myIter, myThid ) |
19 |
|
|
|
20 |
|
|
C !DESCRIPTION: \bv |
21 |
|
|
C *================================================================== |
22 |
|
|
C | SUBROUTINE LOAD_FIELDS_DRIVER |
23 |
|
|
C | o Load external forcing fields from file |
24 |
|
|
C *================================================================== |
25 |
|
|
C *================================================================== |
26 |
|
|
C \ev |
27 |
|
|
|
28 |
|
|
C !CALLING SEQUENCE: |
29 |
|
|
C LOAD_FIELDS_DRIVER |
30 |
|
|
C | |
31 |
|
|
C |-- BULKF_FIELDS_LOAD |
32 |
|
|
C | |
33 |
|
|
C |-- EXF_GETFORCING |
34 |
|
|
C | |
35 |
|
|
C |-- EXTERNAL_FIELDS_LOAD |
36 |
|
|
C | |
37 |
|
|
C |-- OFFLINE_FIELDS_LOAD |
38 |
|
|
C | |
39 |
|
|
C |-- GCHEM_FIELDS_LOAD |
40 |
|
|
C | |
41 |
|
|
C |-- RBCS_FIELDS_LOAD |
42 |
|
|
C | |
43 |
|
|
C |-- AIM_FIELDS_LOAD |
44 |
jmc |
1.7 |
C | |
45 |
|
|
C |-- CHEAPAML_FIELDS_LOAD |
46 |
jmc |
1.1 |
|
47 |
|
|
|
48 |
|
|
C !USES: |
49 |
|
|
IMPLICIT NONE |
50 |
|
|
C == Global variables == |
51 |
|
|
#include "SIZE.h" |
52 |
|
|
#include "EEPARAMS.h" |
53 |
|
|
#include "PARAMS.h" |
54 |
|
|
c#include "DYNVARS.h" |
55 |
|
|
|
56 |
|
|
c#ifdef ALLOW_SHAP_FILT |
57 |
|
|
c# include "SHAP_FILT.h" |
58 |
|
|
c#endif |
59 |
|
|
c#ifdef ALLOW_ZONAL_FILT |
60 |
|
|
c# include "ZONAL_FILT.h" |
61 |
|
|
c#endif |
62 |
|
|
c#ifdef COMPONENT_MODULE |
63 |
|
|
c# include "CPL_PARAMS.h" |
64 |
|
|
c#endif |
65 |
|
|
|
66 |
|
|
#ifdef ALLOW_AUTODIFF_TAMC |
67 |
|
|
|
68 |
|
|
# include "tamc.h" |
69 |
|
|
# include "ctrl.h" |
70 |
|
|
# include "ctrl_dummy.h" |
71 |
|
|
# include "cost.h" |
72 |
|
|
# include "FFIELDS.h" |
73 |
|
|
# include "EOS.h" |
74 |
|
|
c# if (defined NONLIN_FRSURF) || (defined ALLOW_DEPTH_CONTROL) |
75 |
|
|
c# include "GRID.h" |
76 |
|
|
c# endif |
77 |
|
|
# ifdef ALLOW_EXF |
78 |
jmc |
1.2 |
# include "EXF_FIELDS.h" |
79 |
jmc |
1.1 |
# ifdef ALLOW_BULKFORMULAE |
80 |
jmc |
1.2 |
# include "EXF_CONSTANTS.h" |
81 |
jmc |
1.1 |
# endif |
82 |
|
|
# endif |
83 |
|
|
c# ifdef ALLOW_OBCS |
84 |
|
|
c# include "OBCS.h" |
85 |
|
|
c# ifdef ALLOW_PTRACERS |
86 |
jmc |
1.6 |
c# include "PTRACERS_SIZE.h" |
87 |
jmc |
1.1 |
c# include "OBCS_PTRACERS.h" |
88 |
|
|
c# endif |
89 |
|
|
c# endif |
90 |
|
|
c# ifdef ALLOW_CD_CODE |
91 |
|
|
c# include "CD_CODE_VARS.h" |
92 |
|
|
c# endif |
93 |
|
|
c# ifdef ALLOW_THSICE |
94 |
|
|
c# include "THSICE_VARS.h" |
95 |
|
|
c# endif |
96 |
|
|
c# ifdef ALLOW_EBM |
97 |
|
|
c# include "EBM.h" |
98 |
|
|
c# endif |
99 |
|
|
c# ifdef EXACT_CONSERV |
100 |
|
|
c# include "SURFACE.h" |
101 |
|
|
c# endif |
102 |
|
|
c# ifdef ALLOW_KPP |
103 |
|
|
c# include "KPP.h" |
104 |
|
|
c# endif |
105 |
|
|
c# ifdef ALLOW_GMREDI |
106 |
|
|
c# include "GMREDI.h" |
107 |
|
|
c# endif |
108 |
|
|
#endif /* ALLOW_AUTODIFF_TAMC */ |
109 |
|
|
|
110 |
|
|
C !LOCAL VARIABLES: |
111 |
|
|
C == Routine arguments == |
112 |
|
|
C myTime :: time counter for this thread |
113 |
|
|
C myIter :: iteration counter for this thread |
114 |
|
|
C myThid :: thread number for this instance of the routine. |
115 |
|
|
_RL myTime |
116 |
|
|
INTEGER myIter |
117 |
|
|
INTEGER myThid |
118 |
|
|
|
119 |
|
|
C == Local variables == |
120 |
|
|
CEOP |
121 |
|
|
|
122 |
|
|
#ifdef ALLOW_DEBUG |
123 |
jmc |
1.5 |
IF ( debugLevel .GE. debLevB ) |
124 |
jmc |
1.1 |
& CALL DEBUG_ENTER( 'LOAD_FIELDS_DRIVER', myThid ) |
125 |
|
|
#endif |
126 |
|
|
|
127 |
|
|
#ifdef ALLOW_BULK_FORCE |
128 |
|
|
IF ( useBulkForce ) THEN |
129 |
|
|
C-- Bulk-Formulae pkg: load all forcing fields at current time |
130 |
|
|
#ifdef ALLOW_DEBUG |
131 |
jmc |
1.5 |
IF ( debugLevel .GE. debLevB ) |
132 |
jmc |
1.1 |
& CALL DEBUG_CALL('BULKF_FIELDS_LOAD',myThid) |
133 |
|
|
#endif |
134 |
|
|
CALL TIMER_START('BULKF_FIELDS_LOAD [LOAD_FLDS_DRIVER]',myThid) |
135 |
|
|
CALL BULKF_FIELDS_LOAD( myTime, myIter, myThid ) |
136 |
|
|
CALL TIMER_STOP ('BULKF_FIELDS_LOAD [LOAD_FLDS_DRIVER]',myThid) |
137 |
|
|
ENDIF |
138 |
|
|
#endif /* ALLOW_BULK_FORCE */ |
139 |
|
|
|
140 |
|
|
C-- Call external forcing package |
141 |
|
|
#ifdef ALLOW_EXF |
142 |
heimbach |
1.4 |
IF (useEXF) THEN |
143 |
jmc |
1.1 |
# ifdef ALLOW_DEBUG |
144 |
jmc |
1.5 |
IF ( debugLevel .GE. debLevB ) |
145 |
jmc |
1.1 |
& CALL DEBUG_CALL('EXF_GETFORCING',myThid) |
146 |
|
|
# endif |
147 |
|
|
CALL TIMER_START('EXF_GETFORCING [LOAD_FLDS_DRIVER]',myThid) |
148 |
|
|
CALL EXF_GETFORCING( myTime, myIter, myThid ) |
149 |
|
|
CALL TIMER_STOP ('EXF_GETFORCING [LOAD_FLDS_DRIVER]',myThid) |
150 |
heimbach |
1.4 |
ENDIF |
151 |
jmc |
1.5 |
#endif /* ALLOW_EXF */ |
152 |
|
|
|
153 |
jmc |
1.7 |
|
154 |
|
|
C-- Call external CheapAML forcing package |
155 |
|
|
#ifdef ALLOW_CHEAPAML |
156 |
|
|
IF ( useCheapAML ) THEN |
157 |
|
|
#ifdef ALLOW_DEBUG |
158 |
|
|
IF ( debugLevel .GE. debLevB ) |
159 |
|
|
& CALL DEBUG_CALL('CHEAPAML_FIELDS_LOAD',myThid) |
160 |
|
|
#endif |
161 |
|
|
CALL CHEAPAML_FIELDS_LOAD( myTime,myIter, myThid ) |
162 |
|
|
ENDIF |
163 |
|
|
#endif /*ALLOW_CHEAPAML */ |
164 |
|
|
|
165 |
|
|
|
166 |
|
|
|
167 |
jmc |
1.5 |
c IF ( .NOT.useEXF ) THEN |
168 |
|
|
C- note (useEBM): needs modifications to be compatible with this call |
169 |
|
|
IF ( .NOT.(useEXF.OR.useEBM) ) THEN |
170 |
|
|
#ifdef ALLOW_DEBUG |
171 |
|
|
IF ( debugLevel .GE. debLevB ) |
172 |
jmc |
1.1 |
& CALL DEBUG_CALL('EXTERNAL_FIELDS_LOAD',myThid) |
173 |
jmc |
1.5 |
#endif |
174 |
jmc |
1.1 |
CALL TIMER_START('EXTERNAL_FLDS_LOAD [LOAD_FLDS_DRIVER]',myThid) |
175 |
|
|
CALL EXTERNAL_FIELDS_LOAD( myTime, myIter, myThid ) |
176 |
|
|
CALL TIMER_STOP ('EXTERNAL_FLDS_LOAD [LOAD_FLDS_DRIVER]',myThid) |
177 |
jmc |
1.5 |
#ifdef NONLIN_FRSURF |
178 |
jmc |
1.1 |
CADJ STORE SST = comlev1, key = ikey_dynamics |
179 |
|
|
CADJ STORE SSS = comlev1, key = ikey_dynamics |
180 |
jmc |
1.5 |
# ifdef SHORTWAVE_HEATING |
181 |
jmc |
1.1 |
CADJ STORE Qsw = comlev1, key = ikey_dynamics |
182 |
|
|
# endif |
183 |
jmc |
1.5 |
#endif |
184 |
jmc |
1.1 |
ENDIF |
185 |
|
|
|
186 |
|
|
#ifdef ALLOW_OFFLINE |
187 |
|
|
IF ( useOffLine ) THEN |
188 |
|
|
#ifdef ALLOW_DEBUG |
189 |
|
|
IF ( debugLevel .GE. debLevB ) |
190 |
|
|
& CALL DEBUG_CALL('OFFLINE_FIELDS_LOAD',myThid) |
191 |
|
|
#endif /* ALLOW_DEBUG */ |
192 |
|
|
CALL TIMER_START('OFFLINE_FLDS_LOAD [LOAD_FLDS_DRIVER]',myThid) |
193 |
|
|
CALL OFFLINE_FIELDS_LOAD( myTime, myIter, myThid ) |
194 |
|
|
CALL TIMER_STOP ('OFFLINE_FLDS_LOAD [LOAD_FLDS_DRIVER]',myThid) |
195 |
|
|
ENDIF |
196 |
|
|
#endif /* ALLOW_OFFLINE */ |
197 |
|
|
|
198 |
|
|
#ifdef ALLOW_GCHEM |
199 |
|
|
IF ( useGCHEM ) THEN |
200 |
|
|
#ifdef ALLOW_DEBUG |
201 |
jmc |
1.5 |
IF ( debugLevel .GE. debLevB ) |
202 |
jmc |
1.1 |
& CALL DEBUG_CALL('GCHEM_FIELDS_LOAD',myThid) |
203 |
|
|
#endif /* ALLOW_DEBUG */ |
204 |
|
|
CALL GCHEM_FIELDS_LOAD( myTime, myIter, myThid ) |
205 |
|
|
ENDIF |
206 |
|
|
#endif /* ALLOW_GCHEM */ |
207 |
|
|
|
208 |
|
|
#ifdef ALLOW_RBCS |
209 |
|
|
IF ( useRBCS ) THEN |
210 |
|
|
CALL RBCS_FIELDS_LOAD( myTime, myIter, myThid ) |
211 |
|
|
ENDIF |
212 |
|
|
#endif |
213 |
|
|
|
214 |
|
|
#ifdef ALLOW_AIM |
215 |
|
|
IF ( useAIM ) THEN |
216 |
|
|
C- Update AIM bottom boundary data |
217 |
|
|
CALL AIM_FIELDS_LOAD( myTime, myIter, myThid ) |
218 |
|
|
ENDIF |
219 |
|
|
#endif |
220 |
|
|
|
221 |
|
|
#ifdef ALLOW_DEBUG |
222 |
|
|
IF ( debugLevel .GE. debLevB ) |
223 |
|
|
& CALL DEBUG_LEAVE( 'LOAD_FIELDS_DRIVER', myThid ) |
224 |
|
|
#endif |
225 |
|
|
|
226 |
|
|
RETURN |
227 |
|
|
END |