/[MITgcm]/MITgcm/pkg/autodiff/autodiff_store.F
ViewVC logotype

Contents of /MITgcm/pkg/autodiff/autodiff_store.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.8 - (show annotations) (download)
Tue Jun 2 16:10:31 2009 UTC (15 years, 1 month ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint61p, checkpoint61q
Changes since 1.7: +15 -9 lines
Add stressDivergenceX/Y to store.

1 C $Header: /u/gcmpack/MITgcm/pkg/autodiff/autodiff_store.F,v 1.7 2009/02/12 23:28:20 heimbach Exp $
2 C $Name: $
3
4 #include "PACKAGES_CONFIG.h"
5 #include "CPP_OPTIONS.h"
6 #ifdef ALLOW_OBCS
7 # include "OBCS_OPTIONS.h"
8 #endif
9 #ifdef ALLOW_SEAICE
10 # include "SEAICE_OPTIONS.h"
11 #endif
12
13 subroutine autodiff_store( mythid )
14
15 c ==================================================================
16 c SUBROUTINE autodiff_store
17 c ==================================================================
18 c
19 c packing for checkpoint storage
20 c
21 c started: Matt Mazloff mmazloff@mit.edu 03-May-2007
22 c
23 c ==================================================================
24 c SUBROUTINE autodiff_store
25 c ==================================================================
26
27 implicit none
28
29 c == global variables ==
30
31 #include "SIZE.h"
32 #include "EEPARAMS.h"
33 #include "PARAMS.h"
34 c**************************************
35 #ifdef ALLOW_AUTODIFF_TAMC
36
37 c These includes are needed for
38 c AD-checkpointing.
39 c They provide the fields to be stored.
40
41 # include "GRID.h"
42 # include "DYNVARS.h"
43 # include "FFIELDS.h"
44 # include "SURFACE.h"
45 # include "AUTODIFF.h"
46
47 # ifdef ALLOW_OBCS
48 # include "OBCS.h"
49 # endif
50 # ifdef ALLOW_EXF
51 # include "EXF_FIELDS.h"
52 # ifdef ALLOW_BULKFORMULAE
53 # include "EXF_CONSTANTS.h"
54 # endif
55 # endif /* ALLOW_EXF */
56 # ifdef ALLOW_SEAICE
57 # include "SEAICE.h"
58 # endif
59
60 # include "ctrl.h"
61
62 c == routine arguments ==
63 c note: under the multi-threaded model myiter and
64 c mytime are local variables passed around as routine
65 c arguments. Although this is fiddly it saves the need to
66 c impose additional synchronisation points when they are
67 c updated.
68 c mythid - thread number for this instance of the routine.
69 integer mythid
70
71 c == local variables ==
72
73 integer bi,bj
74 integer I,J,K
75
76 c-- == end of interface ==
77
78 #ifdef ALLOW_DEBUG
79 IF ( debugLevel .GE. debLevB )
80 & CALL DEBUG_ENTER('AUTODIFF_STORE',myThid)
81 #endif
82
83 C-- Over all tiles
84 DO bj = myByLo(myThid), myByHi(myThid)
85 DO bi = myBxLo(myThid), myBxHi(myThid)
86
87 #ifndef AUTODIFF_USE_OLDSTORE_2D
88 C- 2D arrays
89 DO J=1-Oly,sNy+Oly
90 DO I=1-Olx,sNx+Olx
91 StoreDynVars2D(I,J,bi,bj,1) = etan(I,J,bi,bj)
92 StoreDynVars2D(I,J,bi,bj,2) = surfaceforcingTice(I,J,bi,bj)
93 StoreDynVars2D(I,J,bi,bj,3) = taux0(I,J,bi,bj)
94 StoreDynVars2D(I,J,bi,bj,4) = taux1(I,J,bi,bj)
95 StoreDynVars2D(I,J,bi,bj,5) = tauy0(I,J,bi,bj)
96 StoreDynVars2D(I,J,bi,bj,6) = tauy1(I,J,bi,bj)
97 StoreDynVars2D(I,J,bi,bj,7) = qnet0(I,J,bi,bj)
98 StoreDynVars2D(I,J,bi,bj,8) = qnet1(I,J,bi,bj)
99 StoreDynVars2D(I,J,bi,bj,9) = empmr0(I,J,bi,bj)
100 StoreDynVars2D(I,J,bi,bj,10) = empmr1(I,J,bi,bj)
101 StoreDynVars2D(I,J,bi,bj,11) = sst0(I,J,bi,bj)
102 StoreDynVars2D(I,J,bi,bj,12) = sst1(I,J,bi,bj)
103 StoreDynVars2D(I,J,bi,bj,13) = sss0(I,J,bi,bj)
104 StoreDynVars2D(I,J,bi,bj,14) = sss1(I,J,bi,bj)
105 StoreDynVars2D(I,J,bi,bj,15) = saltflux0(I,J,bi,bj)
106 StoreDynVars2D(I,J,bi,bj,16) = saltflux1(I,J,bi,bj)
107 #ifdef SHORTWAVE_HEATING
108 StoreDynVars2D(I,J,bi,bj,17) = qsw0(I,J,bi,bj)
109 StoreDynVars2D(I,J,bi,bj,18) = qsw1(I,J,bi,bj)
110 #else
111 StoreDynVars2D(I,J,bi,bj,17) = 0.
112 StoreDynVars2D(I,J,bi,bj,18) = 0.
113 #endif
114 #ifdef ATMOSPHERIC_LOADING
115 StoreDynVars2D(I,J,bi,bj,19) = pload0(I,J,bi,bj)
116 StoreDynVars2D(I,J,bi,bj,20) = pload1(I,J,bi,bj)
117 #else
118 StoreDynVars2D(I,J,bi,bj,19) = 0.
119 StoreDynVars2D(I,J,bi,bj,20) = 0.
120 #endif
121 #ifdef EXACT_CONSERV
122 StoreDynVars2D(I,J,bi,bj,21) = etaH(I,J,bi,bj)
123 StoreDynVars2D(I,J,bi,bj,22) = dEtaHdt(I,J,bi,bj)
124 StoreDynVars2D(I,J,bi,bj,23) = PmEpR(I,J,bi,bj)
125 #else
126 StoreDynVars2D(I,J,bi,bj,21) = 0.
127 StoreDynVars2D(I,J,bi,bj,22) = 0.
128 StoreDynVars2D(I,J,bi,bj,23) = 0.
129 #endif
130 ENDDO
131 ENDDO
132 #endif /* AUTODIFF_USE_OLDSTORE_2D */
133
134 #ifndef AUTODIFF_USE_OLDSTORE_3D
135 C- 3D arrays
136 DO K=1,Nr
137 DO J=1-Oly,sNy+Oly
138 DO I=1-Olx,sNx+Olx
139 StoreDynVars3D(I,J,K,bi,bj,1) = gs(I,J,K,bi,bj)
140 StoreDynVars3D(I,J,K,bi,bj,2) = gt(I,J,K,bi,bj)
141 StoreDynVars3D(I,J,K,bi,bj,3) = gtnm1(I,J,K,bi,bj)
142 StoreDynVars3D(I,J,K,bi,bj,4) = gsnm1(I,J,K,bi,bj)
143 StoreDynVars3D(I,J,K,bi,bj,5) = gunm1(I,J,K,bi,bj)
144 StoreDynVars3D(I,J,K,bi,bj,6) = gvnm1(I,J,K,bi,bj)
145 StoreDynVars3D(I,J,K,bi,bj,7) = theta(I,J,K,bi,bj)
146 StoreDynVars3D(I,J,K,bi,bj,8) = salt(I,J,K,bi,bj)
147 StoreDynVars3D(I,J,K,bi,bj,9) = uvel(I,J,K,bi,bj)
148 StoreDynVars3D(I,J,K,bi,bj,10) = vvel(I,J,K,bi,bj)
149 StoreDynVars3D(I,J,K,bi,bj,11) = wvel(I,J,K,bi,bj)
150 StoreDynVars3D(I,J,K,bi,bj,12) = totphihyd(I,J,K,bi,bj)
151 ENDDO
152 ENDDO
153 ENDDO
154 #endif /* AUTODIFF_USE_OLDSTORE_3D */
155
156 ENDDO
157 ENDDO
158
159 #ifdef ALLOW_EXF
160
161 C-- Over all tiles
162 DO bj = myByLo(myThid), myByHi(myThid)
163 DO bi = myBxLo(myThid), myBxHi(myThid)
164 C- 2D arrays
165 DO J=1-Oly,sNy+Oly
166 DO I=1-Olx,sNx+Olx
167 StoreEXF1(I,J,bi,bj,1) = hflux0(I,J,bi,bj)
168 StoreEXF1(I,J,bi,bj,2) = hflux1(I,J,bi,bj)
169 StoreEXF1(I,J,bi,bj,3) = sflux0(I,J,bi,bj)
170 StoreEXF1(I,J,bi,bj,4) = sflux1(I,J,bi,bj)
171 StoreEXF1(I,J,bi,bj,5) = ustress0(I,J,bi,bj)
172 StoreEXF1(I,J,bi,bj,6) = ustress1(I,J,bi,bj)
173 StoreEXF1(I,J,bi,bj,7) = vstress0(I,J,bi,bj)
174 StoreEXF1(I,J,bi,bj,8) = vstress1(I,J,bi,bj)
175 StoreEXF1(I,J,bi,bj,9) = wspeed0(I,J,bi,bj)
176 StoreEXF1(I,J,bi,bj,10) = wspeed1(I,J,bi,bj)
177 # ifdef SHORTWAVE_HEATING
178 StoreEXF1(I,J,bi,bj,11) = swflux0(I,J,bi,bj)
179 StoreEXF1(I,J,bi,bj,12) = swflux1(I,J,bi,bj)
180 # else
181 StoreEXF1(I,J,bi,bj,11) = 0.0
182 StoreEXF1(I,J,bi,bj,12) = 0.0
183 # endif
184 # ifdef ALLOW_RUNOFF
185 StoreEXF1(I,J,bi,bj,13) = runoff0(I,J,bi,bj)
186 StoreEXF1(I,J,bi,bj,14) = runoff1(I,J,bi,bj)
187 # else
188 StoreEXF1(I,J,bi,bj,13) = 0.0
189 StoreEXF1(I,J,bi,bj,14) = 0.0
190 # endif
191 # ifdef ATMOSPHERIC_LOADING
192 StoreEXF1(I,J,bi,bj,15) = apressure0(I,J,bi,bj)
193 StoreEXF1(I,J,bi,bj,16) = apressure1(I,J,bi,bj)
194 StoreEXF1(I,J,bi,bj,17) = siceload(I,J,bi,bj)
195 # else
196 StoreEXF1(I,J,bi,bj,15) = 0.0
197 StoreEXF1(I,J,bi,bj,16) = 0.0
198 StoreEXF1(I,J,bi,bj,17) = 0.0
199 # endif
200 # ifdef ALLOW_CLIMSSS_RELAXATION
201 StoreEXF1(I,J,bi,bj,18) = climsss0(I,J,bi,bj)
202 StoreEXF1(I,J,bi,bj,19) = climsss1(I,J,bi,bj)
203 # else
204 StoreEXF1(I,J,bi,bj,18) = 0.0
205 StoreEXF1(I,J,bi,bj,19) = 0.0
206 # endif
207 # ifdef ALLOW_CLIMSST_RELAXATION
208 StoreEXF1(I,J,bi,bj,20) = climsst0(I,J,bi,bj)
209 StoreEXF1(I,J,bi,bj,21) = climsst1(I,J,bi,bj)
210 # else
211 StoreEXF1(I,J,bi,bj,20) = 0.0
212 StoreEXF1(I,J,bi,bj,21) = 0.0
213 # endif
214 enddo
215 enddo
216 enddo
217 enddo
218
219 # if (defined (ALLOW_ATM_TEMP) || defined (ALLOW_ATM_WIND))
220 C-- Over all tiles
221 DO bj = myByLo(myThid), myByHi(myThid)
222 DO bi = myBxLo(myThid), myBxHi(myThid)
223 C- 2D arrays
224 DO J=1-Oly,sNy+Oly
225 DO I=1-Olx,sNx+Olx
226 # ifdef ALLOW_ATM_TEMP
227 StoreEXF2(I,J,bi,bj,1) = aqh0(I,J,bi,bj)
228 StoreEXF2(I,J,bi,bj,2) = aqh1(I,J,bi,bj)
229 StoreEXF2(I,J,bi,bj,3) = atemp0(I,J,bi,bj)
230 StoreEXF2(I,J,bi,bj,4) = atemp1(I,J,bi,bj)
231 StoreEXF2(I,J,bi,bj,5) = precip0(I,J,bi,bj)
232 StoreEXF2(I,J,bi,bj,6) = precip1(I,J,bi,bj)
233 StoreEXF2(I,J,bi,bj,7) = lwflux0(I,J,bi,bj)
234 StoreEXF2(I,J,bi,bj,8) = lwflux1(I,J,bi,bj)
235 # ifdef EXF_READ_EVAP
236 StoreEXF2(I,J,bi,bj,9) = evap0(I,J,bi,bj)
237 StoreEXF2(I,J,bi,bj,10) = evap1(I,J,bi,bj)
238 # else
239 StoreEXF2(I,J,bi,bj,9) = evap(I,J,bi,bj)
240 StoreEXF2(I,J,bi,bj,10) = 0.0
241 # endif /* EXF_READ_EVAP */
242 # ifdef ALLOW_DOWNWARD_RADIATION
243 StoreEXF2(I,J,bi,bj,11) = swdown0(I,J,bi,bj)
244 StoreEXF2(I,J,bi,bj,12) = swdown1(I,J,bi,bj)
245 StoreEXF2(I,J,bi,bj,13) = lwdown0(I,J,bi,bj)
246 StoreEXF2(I,J,bi,bj,14) = lwdown1(I,J,bi,bj)
247 # else
248 StoreEXF2(I,J,bi,bj,11) = 0.0
249 StoreEXF2(I,J,bi,bj,12) = 0.0
250 StoreEXF2(I,J,bi,bj,13) = 0.0
251 StoreEXF2(I,J,bi,bj,14) = 0.0
252 # endif
253 # endif /* ALLOW_ATM_TEMP */
254 # ifdef ALLOW_ATM_WIND
255 StoreEXF2(I,J,bi,bj,15) = uwind0(I,J,bi,bj)
256 StoreEXF2(I,J,bi,bj,16) = uwind1(I,J,bi,bj)
257 StoreEXF2(I,J,bi,bj,17) = vwind0(I,J,bi,bj)
258 StoreEXF2(I,J,bi,bj,18) = vwind1(I,J,bi,bj)
259 # else /* ALLOW_ATM_WIND undef */
260 StoreEXF2(I,J,bi,bj,15) = 0.0
261 StoreEXF2(I,J,bi,bj,16) = 0.0
262 StoreEXF2(I,J,bi,bj,17) = 0.0
263 StoreEXF2(I,J,bi,bj,18) = 0.0
264 # endif /* ALLOW_ATM_WIND */
265 enddo
266 enddo
267 enddo
268 enddo
269 # endif /* ALLOW_ATM_TEMP */
270
271 C-- Over all tiles
272 DO bj = myByLo(myThid), myByHi(myThid)
273 DO bi = myBxLo(myThid), myBxHi(myThid)
274 C- 2D arrays
275 DO J=1-Oly,sNy+Oly
276 DO I=1-Olx,sNx+Olx
277 # ifdef ALLOW_UWIND_CONTROL
278 StoreCTRLS1(I,J,bi,bj,1) = xx_uwind0(I,J,bi,bj)
279 StoreCTRLS1(I,J,bi,bj,2) = xx_uwind1(I,J,bi,bj)
280 # else
281 StoreCTRLS1(I,J,bi,bj,1) = 0.0
282 StoreCTRLS1(I,J,bi,bj,2) = 0.0
283 # endif
284 # ifdef ALLOW_VWIND_CONTROL
285 StoreCTRLS1(I,J,bi,bj,3) = xx_vwind0(I,J,bi,bj)
286 StoreCTRLS1(I,J,bi,bj,4) = xx_vwind1(I,J,bi,bj)
287 # else
288 StoreCTRLS1(I,J,bi,bj,3) = 0.0
289 StoreCTRLS1(I,J,bi,bj,4) = 0.0
290 # endif
291 # ifdef ALLOW_ATEMP_CONTROL
292 StoreCTRLS1(I,J,bi,bj,5) = xx_atemp0(I,J,bi,bj)
293 StoreCTRLS1(I,J,bi,bj,6) = xx_atemp1(I,J,bi,bj)
294 # else
295 StoreCTRLS1(I,J,bi,bj,5) = 0.0
296 StoreCTRLS1(I,J,bi,bj,6) = 0.0
297 # endif
298 # ifdef ALLOW_AQH_CONTROL
299 StoreCTRLS1(I,J,bi,bj,7) = xx_aqh0(I,J,bi,bj)
300 StoreCTRLS1(I,J,bi,bj,8) = xx_aqh1(I,J,bi,bj)
301 # else
302 StoreCTRLS1(I,J,bi,bj,7) = 0.0
303 StoreCTRLS1(I,J,bi,bj,8) = 0.0
304 # endif
305 # ifdef ALLOW_PRECIP_CONTROL
306 StoreCTRLS1(I,J,bi,bj,9) = xx_precip0(I,J,bi,bj)
307 StoreCTRLS1(I,J,bi,bj,10) = xx_precip1(I,J,bi,bj)
308 # else
309 StoreCTRLS1(I,J,bi,bj,9) = 0.0
310 StoreCTRLS1(I,J,bi,bj,10) = 0.0
311 # endif
312 # ifdef ALLOW_SWFLUX_CONTROL
313 StoreCTRLS1(I,J,bi,bj,11) = xx_swflux0(I,J,bi,bj)
314 StoreCTRLS1(I,J,bi,bj,12) = xx_swflux1(I,J,bi,bj)
315 # else
316 StoreCTRLS1(I,J,bi,bj,11) = 0.0
317 StoreCTRLS1(I,J,bi,bj,12) = 0.0
318 # endif
319 # ifdef ALLOW_SWDOWN_CONTROL
320 StoreCTRLS1(I,J,bi,bj,13) = xx_swdown0(I,J,bi,bj)
321 StoreCTRLS1(I,J,bi,bj,14) = xx_swdown1(I,J,bi,bj)
322 # else
323 StoreCTRLS1(I,J,bi,bj,13) = 0.0
324 StoreCTRLS1(I,J,bi,bj,14) = 0.0
325 # endif
326 # ifdef ALLOW_LWDOWN_CONTROL
327 StoreCTRLS1(I,J,bi,bj,15) = xx_lwdown0(I,J,bi,bj)
328 StoreCTRLS1(I,J,bi,bj,16) = xx_lwdown1(I,J,bi,bj)
329 # else
330 StoreCTRLS1(I,J,bi,bj,15) = 0.0
331 StoreCTRLS1(I,J,bi,bj,16) = 0.0
332 # endif
333 # ifdef ALLOW_APRESSURE_CONTROL
334 StoreCTRLS1(I,J,bi,bj,17) = xx_apressure0(I,J,bi,bj)
335 StoreCTRLS1(I,J,bi,bj,18) = xx_apressure1(I,J,bi,bj)
336 # else
337 StoreCTRLS1(I,J,bi,bj,17) = 0.0
338 StoreCTRLS1(I,J,bi,bj,18) = 0.0
339 # endif
340 enddo
341 enddo
342 enddo
343 enddo
344 #endif /* ALLOW_EXF */
345
346 #ifdef ALLOW_OBCS
347 # ifdef ALLOW_OBCS_NORTH
348 C-- Over all tiles
349 DO bj = myByLo(myThid), myByHi(myThid)
350 DO bi = myBxLo(myThid), myBxHi(myThid)
351 C- 2D arrays
352 DO K=1,Nr
353 DO I=1-Olx,sNx+Olx
354 StoreOBCSN(I,K,bi,bj,1) = OBNt(I,K,bi,bj)
355 StoreOBCSN(I,K,bi,bj,2) = OBNs(I,K,bi,bj)
356 StoreOBCSN(I,K,bi,bj,3) = OBNu0(I,K,bi,bj)
357 StoreOBCSN(I,K,bi,bj,4) = OBNv0(I,K,bi,bj)
358 StoreOBCSN(I,K,bi,bj,5) = OBNt0(I,K,bi,bj)
359 StoreOBCSN(I,K,bi,bj,6) = OBNs0(I,K,bi,bj)
360 StoreOBCSN(I,K,bi,bj,7) = OBNu1(I,K,bi,bj)
361 StoreOBCSN(I,K,bi,bj,8) = OBNv1(I,K,bi,bj)
362 StoreOBCSN(I,K,bi,bj,9) = OBNt1(I,K,bi,bj)
363 StoreOBCSN(I,K,bi,bj,10) = OBNs1(I,K,bi,bj)
364 # ifdef ALLOW_OBCSN_CONTROL
365 StoreOBCSN(I,K,bi,bj,11) = xx_obcsn0(I,K,bi,bj,1)
366 StoreOBCSN(I,K,bi,bj,12) = xx_obcsn0(I,K,bi,bj,2)
367 StoreOBCSN(I,K,bi,bj,13) = xx_obcsn0(I,K,bi,bj,3)
368 StoreOBCSN(I,K,bi,bj,14) = xx_obcsn0(I,K,bi,bj,4)
369 StoreOBCSN(I,K,bi,bj,15) = xx_obcsn1(I,K,bi,bj,1)
370 StoreOBCSN(I,K,bi,bj,16) = xx_obcsn1(I,K,bi,bj,2)
371 StoreOBCSN(I,K,bi,bj,17) = xx_obcsn1(I,K,bi,bj,3)
372 StoreOBCSN(I,K,bi,bj,18) = xx_obcsn1(I,K,bi,bj,4)
373 # else
374 StoreOBCSN(I,K,bi,bj,11) = 0.0
375 StoreOBCSN(I,K,bi,bj,12) = 0.0
376 StoreOBCSN(I,K,bi,bj,13) = 0.0
377 StoreOBCSN(I,K,bi,bj,14) = 0.0
378 StoreOBCSN(I,K,bi,bj,15) = 0.0
379 StoreOBCSN(I,K,bi,bj,16) = 0.0
380 StoreOBCSN(I,K,bi,bj,17) = 0.0
381 StoreOBCSN(I,K,bi,bj,18) = 0.0
382 # endif
383 enddo
384 enddo
385 enddo
386 enddo
387 # endif /* ALLOW_OBCS_NORTH */
388
389 # ifdef ALLOW_OBCS_SOUTH
390 C-- Over all tiles
391 DO bj = myByLo(myThid), myByHi(myThid)
392 DO bi = myBxLo(myThid), myBxHi(myThid)
393 C- 2D arrays
394 DO K=1,Nr
395 DO I=1-Olx,sNx+Olx
396 StoreOBCSS(I,K,bi,bj,1) = OBSt(I,K,bi,bj)
397 StoreOBCSS(I,K,bi,bj,2) = OBSs(I,K,bi,bj)
398 StoreOBCSS(I,K,bi,bj,3) = OBSu0(I,K,bi,bj)
399 StoreOBCSS(I,K,bi,bj,4) = OBSv0(I,K,bi,bj)
400 StoreOBCSS(I,K,bi,bj,5) = OBSt0(I,K,bi,bj)
401 StoreOBCSS(I,K,bi,bj,6) = OBSs0(I,K,bi,bj)
402 StoreOBCSS(I,K,bi,bj,7) = OBSu1(I,K,bi,bj)
403 StoreOBCSS(I,K,bi,bj,8) = OBSv1(I,K,bi,bj)
404 StoreOBCSS(I,K,bi,bj,9) = OBSt1(I,K,bi,bj)
405 StoreOBCSS(I,K,bi,bj,10)= OBSs1(I,K,bi,bj)
406 # ifdef ALLOW_OBCSS_CONTROL
407 StoreOBCSS(I,K,bi,bj,11) = xx_obcss0(I,K,bi,bj,1)
408 StoreOBCSS(I,K,bi,bj,12) = xx_obcss0(I,K,bi,bj,2)
409 StoreOBCSS(I,K,bi,bj,13) = xx_obcss0(I,K,bi,bj,3)
410 StoreOBCSS(I,K,bi,bj,14) = xx_obcss0(I,K,bi,bj,4)
411 StoreOBCSS(I,K,bi,bj,15) = xx_obcss1(I,K,bi,bj,1)
412 StoreOBCSS(I,K,bi,bj,16) = xx_obcss1(I,K,bi,bj,2)
413 StoreOBCSS(I,K,bi,bj,17) = xx_obcss1(I,K,bi,bj,3)
414 StoreOBCSS(I,K,bi,bj,18) = xx_obcss1(I,K,bi,bj,4)
415 # else
416 StoreOBCSS(I,K,bi,bj,11) = 0.0
417 StoreOBCSS(I,K,bi,bj,12) = 0.0
418 StoreOBCSS(I,K,bi,bj,13) = 0.0
419 StoreOBCSS(I,K,bi,bj,14) = 0.0
420 StoreOBCSS(I,K,bi,bj,15) = 0.0
421 StoreOBCSS(I,K,bi,bj,16) = 0.0
422 StoreOBCSS(I,K,bi,bj,17) = 0.0
423 StoreOBCSS(I,K,bi,bj,18) = 0.0
424 # endif
425 enddo
426 enddo
427 enddo
428 enddo
429 # endif /* ALLOW_OBCS_SOUTH */
430
431 # ifdef ALLOW_OBCS_EAST
432 C-- Over all tiles
433 DO bj = myByLo(myThid), myByHi(myThid)
434 DO bi = myBxLo(myThid), myBxHi(myThid)
435 C- 2D arrays
436 DO K=1,Nr
437 DO J=1-Oly,sNy+Oly
438 StoreOBCSE(J,K,bi,bj,1) = OBEt(J,K,bi,bj)
439 StoreOBCSE(J,K,bi,bj,2) = OBEs(J,K,bi,bj)
440 StoreOBCSE(J,K,bi,bj,3) = OBEu0(J,K,bi,bj)
441 StoreOBCSE(J,K,bi,bj,4) = OBEv0(J,K,bi,bj)
442 StoreOBCSE(J,K,bi,bj,5) = OBEt0(J,K,bi,bj)
443 StoreOBCSE(J,K,bi,bj,6) = OBEs0(J,K,bi,bj)
444 StoreOBCSE(J,K,bi,bj,7) = OBEu1(J,K,bi,bj)
445 StoreOBCSE(J,K,bi,bj,8) = OBEv1(J,K,bi,bj)
446 StoreOBCSE(J,K,bi,bj,9) = OBEt1(J,K,bi,bj)
447 StoreOBCSE(J,K,bi,bj,10)= OBEs1(J,K,bi,bj)
448 # ifdef ALLOW_OBCSE_CONTROL
449 StoreOBCSE(J,K,bi,bj,11) = xx_obcse0(J,K,bi,bj,1)
450 StoreOBCSE(J,K,bi,bj,12) = xx_obcse0(J,K,bi,bj,2)
451 StoreOBCSE(J,K,bi,bj,13) = xx_obcse0(J,K,bi,bj,3)
452 StoreOBCSE(J,K,bi,bj,14) = xx_obcse0(J,K,bi,bj,4)
453 StoreOBCSE(J,K,bi,bj,15) = xx_obcse1(J,K,bi,bj,1)
454 StoreOBCSE(J,K,bi,bj,16) = xx_obcse1(J,K,bi,bj,2)
455 StoreOBCSE(J,K,bi,bj,17) = xx_obcse1(J,K,bi,bj,3)
456 StoreOBCSE(J,K,bi,bj,18) = xx_obcse1(J,K,bi,bj,4)
457 # else
458 StoreOBCSE(J,K,bi,bj,11) = 0.0
459 StoreOBCSE(J,K,bi,bj,12) = 0.0
460 StoreOBCSE(J,K,bi,bj,13) = 0.0
461 StoreOBCSE(J,K,bi,bj,14) = 0.0
462 StoreOBCSE(J,K,bi,bj,15) = 0.0
463 StoreOBCSE(J,K,bi,bj,16) = 0.0
464 StoreOBCSE(J,K,bi,bj,17) = 0.0
465 StoreOBCSE(J,K,bi,bj,18) = 0.0
466 # endif
467 enddo
468 enddo
469 enddo
470 enddo
471 # endif /* ALLOW_OBCS_EAST */
472
473 # ifdef ALLOW_OBCS_WEST
474 C-- Over all tiles
475 DO bj = myByLo(myThid), myByHi(myThid)
476 DO bi = myBxLo(myThid), myBxHi(myThid)
477 C- 2D arrays
478 DO K=1,Nr
479 DO J=1-Oly,sNy+Oly
480 StoreOBCSW(J,K,bi,bj,1) = OBWt(J,K,bi,bj)
481 StoreOBCSW(J,K,bi,bj,2) = OBWs(J,K,bi,bj)
482 StoreOBCSW(J,K,bi,bj,3) = OBWu0(J,K,bi,bj)
483 StoreOBCSW(J,K,bi,bj,4) = OBWv0(J,K,bi,bj)
484 StoreOBCSW(J,K,bi,bj,5) = OBWt0(J,K,bi,bj)
485 StoreOBCSW(J,K,bi,bj,6) = OBWs0(J,K,bi,bj)
486 StoreOBCSW(J,K,bi,bj,7) = OBWu1(J,K,bi,bj)
487 StoreOBCSW(J,K,bi,bj,8) = OBWv1(J,K,bi,bj)
488 StoreOBCSW(J,K,bi,bj,9) = OBWt1(J,K,bi,bj)
489 StoreOBCSW(J,K,bi,bj,10)= OBWs1(J,K,bi,bj)
490 # ifdef ALLOW_OBCSW_CONTROL
491 StoreOBCSW(J,K,bi,bj,11) = xx_obcsw0(J,K,bi,bj,1)
492 StoreOBCSW(J,K,bi,bj,12) = xx_obcsw0(J,K,bi,bj,2)
493 StoreOBCSW(J,K,bi,bj,13) = xx_obcsw0(J,K,bi,bj,3)
494 StoreOBCSW(J,K,bi,bj,14) = xx_obcsw0(J,K,bi,bj,4)
495 StoreOBCSW(J,K,bi,bj,15) = xx_obcsw1(J,K,bi,bj,1)
496 StoreOBCSW(J,K,bi,bj,16) = xx_obcsw1(J,K,bi,bj,2)
497 StoreOBCSW(J,K,bi,bj,17) = xx_obcsw1(J,K,bi,bj,3)
498 StoreOBCSW(J,K,bi,bj,18) = xx_obcsw1(J,K,bi,bj,4)
499 # else
500 StoreOBCSW(J,K,bi,bj,11) = 0.0
501 StoreOBCSW(J,K,bi,bj,12) = 0.0
502 StoreOBCSW(J,K,bi,bj,13) = 0.0
503 StoreOBCSW(J,K,bi,bj,14) = 0.0
504 StoreOBCSW(J,K,bi,bj,15) = 0.0
505 StoreOBCSW(J,K,bi,bj,16) = 0.0
506 StoreOBCSW(J,K,bi,bj,17) = 0.0
507 StoreOBCSW(J,K,bi,bj,18) = 0.0
508 # endif
509 enddo
510 enddo
511 enddo
512 enddo
513 # endif /* ALLOW_OBCS_WEST */
514 #endif /* ALLOW_OBCS */
515
516 #ifdef ALLOW_SEAICE
517 C-- Over all tiles
518 DO bj = myByLo(myThid), myByHi(myThid)
519 DO bi = myBxLo(myThid), myBxHi(myThid)
520 C- 2D arrays
521 DO J=1-Oly,sNy+Oly
522 DO I=1-Olx,sNx+Olx
523 StoreSEAICE(I,J,bi,bj,1) = AREA(I,J,1,bi,bj)
524 StoreSEAICE(I,J,bi,bj,2) = AREA(I,J,2,bi,bj)
525 StoreSEAICE(I,J,bi,bj,3) = AREA(I,J,3,bi,bj)
526 StoreSEAICE(I,J,bi,bj,4) = HEFF(I,J,1,bi,bj)
527 StoreSEAICE(I,J,bi,bj,5) = HEFF(I,J,2,bi,bj)
528 StoreSEAICE(I,J,bi,bj,6) = HEFF(I,J,3,bi,bj)
529 StoreSEAICE(I,J,bi,bj,7) = HSNOW(I,J,bi,bj)
530 StoreSEAICE(I,J,bi,bj,8) = TICE(I,J,bi,bj)
531 StoreSEAICE(I,J,bi,bj,9) = RUNOFF(I,J,bi,bj)
532 # ifdef SEAICE_MULTICATEGORY
533 StoreSEAICE(I,J,bi,bj,10) = TICES(I,J,bi,bj)
534 # else
535 StoreSEAICE(I,J,bi,bj,10) = 0.0
536 # endif
537 # ifdef SEAICE_ALLOW_DYNAMICS
538 StoreSEAICE(I,J,bi,bj,11) = UICE(I,J,1,bi,bj)
539 StoreSEAICE(I,J,bi,bj,12) = UICE(I,J,2,bi,bj)
540 StoreSEAICE(I,J,bi,bj,13) = UICE(I,J,3,bi,bj)
541 StoreSEAICE(I,J,bi,bj,14) = VICE(I,J,1,bi,bj)
542 StoreSEAICE(I,J,bi,bj,15) = VICE(I,J,2,bi,bj)
543 StoreSEAICE(I,J,bi,bj,16) = VICE(I,J,3,bi,bj)
544 StoreSEAICE(I,J,bi,bj,17) = ZETA(I,J,bi,bj)
545 StoreSEAICE(I,J,bi,bj,18) = ETA(I,J,bi,bj)
546 # ifdef SEAICE_CGRID
547 StoreSEAICE(I,J,bi,bj,19) = dwatn(I,J,bi,bj)
548 StoreSEAICE(I,J,bi,bj,20) = seaicemasku(I,J,bi,bj)
549 StoreSEAICE(I,J,bi,bj,21) = seaicemaskv(I,J,bi,bj)
550 StoreSEAICE(I,J,bi,bj,22) = stressDivergenceX(I,J,bi,bj)
551 StoreSEAICE(I,J,bi,bj,23) = stressDivergenceY(I,J,bi,bj)
552 # else
553 StoreSEAICE(I,J,bi,bj,19) = 0.0
554 StoreSEAICE(I,J,bi,bj,20) = 0.0
555 StoreSEAICE(I,J,bi,bj,21) = 0.0
556 StoreSEAICE(I,J,bi,bj,22) = 0.0
557 StoreSEAICE(I,J,bi,bj,23) = 0.0
558 # endif /* SEAICE_CGRID */
559 # ifdef SEAICE_ALLOW_EVP
560 StoreSEAICE(I,J,bi,bj,24) = seaice_sigma1(I,J,bi,bj)
561 StoreSEAICE(I,J,bi,bj,25) = seaice_sigma2(I,J,bi,bj)
562 StoreSEAICE(I,J,bi,bj,26) = seaice_sigma12(I,J,bi,bj)
563 # else
564 StoreSEAICE(I,J,bi,bj,24) = 0.0
565 StoreSEAICE(I,J,bi,bj,25) = 0.0
566 StoreSEAICE(I,J,bi,bj,26) = 0.0
567 # endif /* SEAICE_ALLOW_EVP */
568 # else
569 StoreSEAICE(I,J,bi,bj,11) = 0.0
570 StoreSEAICE(I,J,bi,bj,12) = 0.0
571 StoreSEAICE(I,J,bi,bj,13) = 0.0
572 StoreSEAICE(I,J,bi,bj,14) = 0.0
573 StoreSEAICE(I,J,bi,bj,15) = 0.0
574 StoreSEAICE(I,J,bi,bj,16) = 0.0
575 StoreSEAICE(I,J,bi,bj,17) = 0.0
576 StoreSEAICE(I,J,bi,bj,18) = 0.0
577 StoreSEAICE(I,J,bi,bj,19) = 0.0
578 StoreSEAICE(I,J,bi,bj,20) = 0.0
579 StoreSEAICE(I,J,bi,bj,21) = 0.0
580 StoreSEAICE(I,J,bi,bj,22) = 0.0
581 StoreSEAICE(I,J,bi,bj,23) = 0.0
582 StoreSEAICE(I,J,bi,bj,24) = 0.0
583 StoreSEAICE(I,J,bi,bj,25) = 0.0
584 StoreSEAICE(I,J,bi,bj,26) = 0.0
585 # endif /* SEAICE_ALLOW_DYNAMICS */
586 # ifdef SEAICE_SALINITY
587 StoreSEAICE(I,J,bi,bj,27) = HSALT(I,J,bi,bj)
588 # else
589 StoreSEAICE(I,J,bi,bj,27) = 0.0
590 # endif
591 enddo
592 enddo
593 enddo
594 enddo
595 #endif /* ALLOW_SEAICE */
596
597 #ifdef ALLOW_DEBUG
598 IF ( debugLevel .GE. debLevB )
599 & CALL DEBUG_LEAVE('AUTODIFF_STORE',myThid)
600 #endif
601
602 #endif /* ALLOW_AUTODIFF_TAMC */
603 c**************************************
604
605 return
606 end
607

  ViewVC Help
Powered by ViewVC 1.1.22