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