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

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

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


Revision 1.20 - (show annotations) (download)
Tue Jun 7 20:06:32 2011 UTC (12 years, 10 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint63, checkpoint62z
Changes since 1.19: +3 -5 lines
test debugMode (instead of debugLevel) to print DEBUG_CALL messages

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

  ViewVC Help
Powered by ViewVC 1.1.22