/[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.7 - (show annotations) (download)
Thu Feb 12 23:28:20 2009 UTC (15 years, 3 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint61n, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61i
Changes since 1.6: +73 -73 lines
Fix index problems
* Nr <-> K
* 1,1,1,... <-> 1,2,3,...

1 C $Header: /u/gcmpack/MITgcm/pkg/autodiff/autodiff_restore.F,v 1.6 2008/09/23 06:13:59 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_restore( mythid )
14
15 c ==================================================================
16 c SUBROUTINE autodiff_restore
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_restore
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_RESTORE',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 etan(I,J,bi,bj) = StoreDynVars2D(I,J,bi,bj,1)
92 surfaceforcingTice(I,J,bi,bj) = StoreDynVars2D(I,J,bi,bj,2)
93 taux0(I,J,bi,bj) = StoreDynVars2D(I,J,bi,bj,3)
94 taux1(I,J,bi,bj) = StoreDynVars2D(I,J,bi,bj,4)
95 tauy0(I,J,bi,bj) = StoreDynVars2D(I,J,bi,bj,5)
96 tauy1(I,J,bi,bj) = StoreDynVars2D(I,J,bi,bj,6)
97 qnet0(I,J,bi,bj) = StoreDynVars2D(I,J,bi,bj,7)
98 qnet1(I,J,bi,bj) = StoreDynVars2D(I,J,bi,bj,8)
99 empmr0(I,J,bi,bj) = StoreDynVars2D(I,J,bi,bj,9)
100 empmr1(I,J,bi,bj) = StoreDynVars2D(I,J,bi,bj,10)
101 sst0(I,J,bi,bj) = StoreDynVars2D(I,J,bi,bj,11)
102 sst1(I,J,bi,bj) = StoreDynVars2D(I,J,bi,bj,12)
103 sss0(I,J,bi,bj) = StoreDynVars2D(I,J,bi,bj,13)
104 sss1(I,J,bi,bj) = StoreDynVars2D(I,J,bi,bj,14)
105 saltflux0(I,J,bi,bj) = StoreDynVars2D(I,J,bi,bj,15)
106 saltflux1(I,J,bi,bj) = StoreDynVars2D(I,J,bi,bj,16)
107 #ifdef SHORTWAVE_HEATING
108 qsw0(I,J,bi,bj) = StoreDynVars2D(I,J,bi,bj,17)
109 qsw1(I,J,bi,bj) = StoreDynVars2D(I,J,bi,bj,18)
110 #endif
111 #ifdef ATMOSPHERIC_LOADING
112 pload0(I,J,bi,bj) = StoreDynVars2D(I,J,bi,bj,19)
113 pload1(I,J,bi,bj) = StoreDynVars2D(I,J,bi,bj,20)
114 #endif
115 #ifdef EXACT_CONSERV
116 etaH(I,J,bi,bj) = StoreDynVars2D(I,J,bi,bj,21)
117 dEtaHdt(I,J,bi,bj) = StoreDynVars2D(I,J,bi,bj,22)
118 PmEpR(I,J,bi,bj) = StoreDynVars2D(I,J,bi,bj,23)
119 #endif
120 ENDDO
121 ENDDO
122 #endif /* AUTODIFF_USE_OLDSTORE_2D */
123
124 #ifndef AUTODIFF_USE_OLDSTORE_3D
125 C- 3D arrays
126 DO K=1,Nr
127 DO J=1-Oly,sNy+Oly
128 DO I=1-Olx,sNx+Olx
129 gs(I,J,K,bi,bj) = StoreDynVars3D(I,J,K,bi,bj,1)
130 gt(I,J,K,bi,bj) = StoreDynVars3D(I,J,K,bi,bj,2)
131 gtnm1(I,J,K,bi,bj) = StoreDynVars3D(I,J,K,bi,bj,3)
132 gsnm1(I,J,K,bi,bj) = StoreDynVars3D(I,J,K,bi,bj,4)
133 gunm1(I,J,K,bi,bj) = StoreDynVars3D(I,J,K,bi,bj,5)
134 gvnm1(I,J,K,bi,bj) = StoreDynVars3D(I,J,K,bi,bj,6)
135 theta(I,J,K,bi,bj) = StoreDynVars3D(I,J,K,bi,bj,7)
136 salt(I,J,K,bi,bj) = StoreDynVars3D(I,J,K,bi,bj,8)
137 uvel(I,J,K,bi,bj) = StoreDynVars3D(I,J,K,bi,bj,9)
138 vvel(I,J,K,bi,bj) = StoreDynVars3D(I,J,K,bi,bj,10)
139 wvel(I,J,K,bi,bj) = StoreDynVars3D(I,J,K,bi,bj,11)
140 totphihyd(I,J,K,bi,bj)= StoreDynVars3D(I,J,K,bi,bj,12)
141 ENDDO
142 ENDDO
143 ENDDO
144 #endif /* AUTODIFF_USE_OLDSTORE_3D */
145
146 ENDDO
147 ENDDO
148
149 #ifdef ALLOW_EXF
150
151 C-- Over all tiles
152 DO bj = myByLo(myThid), myByHi(myThid)
153 DO bi = myBxLo(myThid), myBxHi(myThid)
154 C- 2D arrays
155 DO J=1-Oly,sNy+Oly
156 DO I=1-Olx,sNx+Olx
157 hflux0(I,J,bi,bj) = StoreEXF1(I,J,bi,bj,1)
158 hflux1(I,J,bi,bj) = StoreEXF1(I,J,bi,bj,2)
159 sflux0(I,J,bi,bj) = StoreEXF1(I,J,bi,bj,3)
160 sflux1(I,J,bi,bj) = StoreEXF1(I,J,bi,bj,4)
161 ustress0(I,J,bi,bj) = StoreEXF1(I,J,bi,bj,5)
162 ustress1(I,J,bi,bj) = StoreEXF1(I,J,bi,bj,6)
163 vstress0(I,J,bi,bj) = StoreEXF1(I,J,bi,bj,7)
164 vstress1(I,J,bi,bj) = StoreEXF1(I,J,bi,bj,8)
165 wspeed0(I,J,bi,bj) = StoreEXF1(I,J,bi,bj,9)
166 wspeed1(I,J,bi,bj) = StoreEXF1(I,J,bi,bj,10)
167 # ifdef SHORTWAVE_HEATING
168 swflux0(I,J,bi,bj) = StoreEXF1(I,J,bi,bj,11)
169 swflux1(I,J,bi,bj) = StoreEXF1(I,J,bi,bj,12)
170 # endif
171 # ifdef ALLOW_RUNOFF
172 runoff0(I,J,bi,bj) = StoreEXF1(I,J,bi,bj,13)
173 runoff1(I,J,bi,bj) = StoreEXF1(I,J,bi,bj,14)
174 # endif
175 # ifdef ATMOSPHERIC_LOADING
176 apressure0(I,J,bi,bj) = StoreEXF1(I,J,bi,bj,15)
177 apressure1(I,J,bi,bj) = StoreEXF1(I,J,bi,bj,16)
178 siceload(I,J,bi,bj) = StoreEXF1(I,J,bi,bj,17)
179 # endif
180 # ifdef ALLOW_CLIMSSS_RELAXATION
181 climsss0(I,J,bi,bj) = StoreEXF1(I,J,bi,bj,18)
182 climsss1(I,J,bi,bj) = StoreEXF1(I,J,bi,bj,19)
183 # endif
184 # ifdef ALLOW_CLIMSST_RELAXATION
185 climsst0(I,J,bi,bj) = StoreEXF1(I,J,bi,bj,20)
186 climsst1(I,J,bi,bj) = StoreEXF1(I,J,bi,bj,21)
187 # endif
188 enddo
189 enddo
190 enddo
191 enddo
192
193 # if (defined (ALLOW_ATM_TEMP) || defined (ALLOW_ATM_WIND))
194 C-- Over all tiles
195 DO bj = myByLo(myThid), myByHi(myThid)
196 DO bi = myBxLo(myThid), myBxHi(myThid)
197 C- 2D arrays
198 DO J=1-Oly,sNy+Oly
199 DO I=1-Olx,sNx+Olx
200 # ifdef ALLOW_ATM_TEMP
201 aqh0(I,J,bi,bj) = StoreEXF2(I,J,bi,bj,1)
202 aqh1(I,J,bi,bj) = StoreEXF2(I,J,bi,bj,2)
203 atemp0(I,J,bi,bj) = StoreEXF2(I,J,bi,bj,3)
204 atemp1(I,J,bi,bj) = StoreEXF2(I,J,bi,bj,4)
205 precip0(I,J,bi,bj) = StoreEXF2(I,J,bi,bj,5)
206 precip1(I,J,bi,bj) = StoreEXF2(I,J,bi,bj,6)
207 lwflux0(I,J,bi,bj) = StoreEXF2(I,J,bi,bj,7)
208 lwflux1(I,J,bi,bj) = StoreEXF2(I,J,bi,bj,8)
209 # ifdef EXF_READ_EVAP
210 evap0(I,J,bi,bj) = StoreEXF2(I,J,bi,bj,9)
211 evap1(I,J,bi,bj) = StoreEXF2(I,J,bi,bj,10)
212 # else
213 evap(I,J,bi,bj) = StoreEXF2(I,J,bi,bj,9)
214 # endif /* EXF_READ_EVAP */
215 # ifdef ALLOW_DOWNWARD_RADIATION
216 swdown0(I,J,bi,bj) = StoreEXF2(I,J,bi,bj,11)
217 swdown1(I,J,bi,bj) = StoreEXF2(I,J,bi,bj,12)
218 lwdown0(I,J,bi,bj) = StoreEXF2(I,J,bi,bj,13)
219 lwdown1(I,J,bi,bj) = StoreEXF2(I,J,bi,bj,14)
220 # endif
221 # endif /* ALLOW_ATM_TEMP */
222 # ifdef ALLOW_ATM_WIND
223 uwind0(I,J,bi,bj) = StoreEXF2(I,J,bi,bj,15)
224 uwind1(I,J,bi,bj) = StoreEXF2(I,J,bi,bj,16)
225 vwind0(I,J,bi,bj) = StoreEXF2(I,J,bi,bj,17)
226 vwind1(I,J,bi,bj) = StoreEXF2(I,J,bi,bj,18)
227 # endif /* ALLOW_ATM_WIND */
228 enddo
229 enddo
230 enddo
231 enddo
232 # endif /* ALLOW_ATM_TEMP */
233
234 C-- Over all tiles
235 DO bj = myByLo(myThid), myByHi(myThid)
236 DO bi = myBxLo(myThid), myBxHi(myThid)
237 C- 2D arrays
238 DO J=1-Oly,sNy+Oly
239 DO I=1-Olx,sNx+Olx
240 # ifdef ALLOW_UWIND_CONTROL
241 xx_uwind0(I,J,bi,bj) = StoreCTRLS1(I,J,bi,bj,1)
242 xx_uwind1(I,J,bi,bj) = StoreCTRLS1(I,J,bi,bj,2)
243 # endif
244 # ifdef ALLOW_VWIND_CONTROL
245 xx_vwind0(I,J,bi,bj) = StoreCTRLS1(I,J,bi,bj,3)
246 xx_vwind1(I,J,bi,bj) = StoreCTRLS1(I,J,bi,bj,4)
247 # endif
248 # ifdef ALLOW_ATEMP_CONTROL
249 xx_atemp0(I,J,bi,bj) = StoreCTRLS1(I,J,bi,bj,5)
250 xx_atemp1(I,J,bi,bj) = StoreCTRLS1(I,J,bi,bj,6)
251 # endif
252 # ifdef ALLOW_AQH_CONTROL
253 xx_aqh0(I,J,bi,bj) = StoreCTRLS1(I,J,bi,bj,7)
254 xx_aqh1(I,J,bi,bj) = StoreCTRLS1(I,J,bi,bj,8)
255 # endif
256 # ifdef ALLOW_PRECIP_CONTROL
257 xx_precip0(I,J,bi,bj) = StoreCTRLS1(I,J,bi,bj,9)
258 xx_precip1(I,J,bi,bj) = StoreCTRLS1(I,J,bi,bj,10)
259 # endif
260 # ifdef ALLOW_SWFLUX_CONTROL
261 xx_swflux0(I,J,bi,bj) = StoreCTRLS1(I,J,bi,bj,11)
262 xx_swflux1(I,J,bi,bj) = StoreCTRLS1(I,J,bi,bj,12)
263 # endif
264 # ifdef ALLOW_SWDOWN_CONTROL
265 xx_swdown0(I,J,bi,bj) = StoreCTRLS1(I,J,bi,bj,13)
266 xx_swdown1(I,J,bi,bj) = StoreCTRLS1(I,J,bi,bj,14)
267 # endif
268 # ifdef ALLOW_LWDOWN_CONTROL
269 xx_lwdown0(I,J,bi,bj) = StoreCTRLS1(I,J,bi,bj,15)
270 xx_lwdown1(I,J,bi,bj) = StoreCTRLS1(I,J,bi,bj,16)
271 # endif
272 # ifdef ALLOW_APRESSURE_CONTROL
273 xx_apressure0(I,J,bi,bj) = StoreCTRLS1(I,J,bi,bj,17)
274 xx_apressure1(I,J,bi,bj) = StoreCTRLS1(I,J,bi,bj,18)
275 # endif
276 enddo
277 enddo
278 enddo
279 enddo
280 #endif /* ALLOW_EXF */
281
282 #ifdef ALLOW_OBCS
283 # ifdef ALLOW_OBCS_NORTH
284 C-- Over all tiles
285 DO bj = myByLo(myThid), myByHi(myThid)
286 DO bi = myBxLo(myThid), myBxHi(myThid)
287 C- 2D arrays
288 DO K=1,Nr
289 DO I=1-Olx,sNx+Olx
290 OBNt(I,K,bi,bj) = StoreOBCSN(I,K,bi,bj,1)
291 OBNs(I,K,bi,bj) = StoreOBCSN(I,K,bi,bj,2)
292 OBNu0(I,K,bi,bj) = StoreOBCSN(I,K,bi,bj,3)
293 OBNv0(I,K,bi,bj) = StoreOBCSN(I,K,bi,bj,4)
294 OBNt0(I,K,bi,bj) = StoreOBCSN(I,K,bi,bj,5)
295 OBNs0(I,K,bi,bj) = StoreOBCSN(I,K,bi,bj,6)
296 OBNu1(I,K,bi,bj) = StoreOBCSN(I,K,bi,bj,7)
297 OBNv1(I,K,bi,bj) = StoreOBCSN(I,K,bi,bj,8)
298 OBNt1(I,K,bi,bj) = StoreOBCSN(I,K,bi,bj,9)
299 OBNs1(I,K,bi,bj) = StoreOBCSN(I,K,bi,bj,10)
300 # ifdef ALLOW_OBCSN_CONTROL
301 xx_obcsn0(I,K,i,j,1) = StoreOBCSN(I,K,bi,bj,11)
302 xx_obcsn0(I,K,i,j,2) = StoreOBCSN(I,K,bi,bj,12)
303 xx_obcsn0(I,K,i,j,3) = StoreOBCSN(I,K,bi,bj,13)
304 xx_obcsn0(I,K,i,j,4) = StoreOBCSN(I,K,bi,bj,14)
305 xx_obcsn1(I,K,i,j,1) = StoreOBCSN(I,K,bi,bj,15)
306 xx_obcsn1(I,K,i,j,2) = StoreOBCSN(I,K,bi,bj,16)
307 xx_obcsn1(I,K,i,j,3) = StoreOBCSN(I,K,bi,bj,17)
308 xx_obcsn1(I,K,i,j,4) = StoreOBCSN(I,K,bi,bj,18)
309 # endif
310 enddo
311 enddo
312 enddo
313 enddo
314 # endif /* ALLOW_OBCS_NORTH */
315
316 # ifdef ALLOW_OBCS_SOUTH
317 C-- Over all tiles
318 DO bj = myByLo(myThid), myByHi(myThid)
319 DO bi = myBxLo(myThid), myBxHi(myThid)
320 C- 2D arrays
321 DO K=1,Nr
322 DO I=1-Olx,sNx+Olx
323 OBSt(I,K,bi,bj) = StoreOBCSS(I,K,bi,bj,1)
324 OBSs(I,K,bi,bj) = StoreOBCSS(I,K,bi,bj,2)
325 OBSu0(I,K,bi,bj) = StoreOBCSS(I,K,bi,bj,3)
326 OBSv0(I,K,bi,bj) = StoreOBCSS(I,K,bi,bj,4)
327 OBSt0(I,K,bi,bj) = StoreOBCSS(I,K,bi,bj,5)
328 OBSs0(I,K,bi,bj) = StoreOBCSS(I,K,bi,bj,6)
329 OBSu1(I,K,bi,bj) = StoreOBCSS(I,K,bi,bj,7)
330 OBSv1(I,K,bi,bj) = StoreOBCSS(I,K,bi,bj,8)
331 OBSt1(I,K,bi,bj) = StoreOBCSS(I,K,bi,bj,9)
332 OBSs1(I,K,bi,bj) = StoreOBCSS(I,K,bi,bj,10)
333 # ifdef ALLOW_OBCSS_CONTROL
334 xx_obcss0(I,K,i,j,1) = StoreOBCSS(I,K,bi,bj,11)
335 xx_obcss0(I,K,i,j,2) = StoreOBCSS(I,K,bi,bj,12)
336 xx_obcss0(I,K,i,j,3) = StoreOBCSS(I,K,bi,bj,13)
337 xx_obcss0(I,K,i,j,4) = StoreOBCSS(I,K,bi,bj,14)
338 xx_obcss1(I,K,i,j,1) = StoreOBCSS(I,K,bi,bj,15)
339 xx_obcss1(I,K,i,j,2) = StoreOBCSS(I,K,bi,bj,16)
340 xx_obcss1(I,K,i,j,3) = StoreOBCSS(I,K,bi,bj,17)
341 xx_obcss1(I,K,i,j,4) = StoreOBCSS(I,K,bi,bj,18)
342 # endif
343 enddo
344 enddo
345 enddo
346 enddo
347 # endif /* ALLOW_OBCS_SOUTH */
348
349 # ifdef ALLOW_OBCS_EAST
350 C-- Over all tiles
351 DO bj = myByLo(myThid), myByHi(myThid)
352 DO bi = myBxLo(myThid), myBxHi(myThid)
353 C- 2D arrays
354 DO K=1,Nr
355 DO J=1-Oly,sNy+Oly
356 OBEt(J,K,bi,bj) = StoreOBCSE(J,K,bi,bj,1)
357 OBEs(J,K,bi,bj) = StoreOBCSE(J,K,bi,bj,2)
358 OBEu0(J,K,bi,bj) = StoreOBCSE(J,K,bi,bj,3)
359 OBEv0(J,K,bi,bj) = StoreOBCSE(J,K,bi,bj,4)
360 OBEt0(J,K,bi,bj) = StoreOBCSE(J,K,bi,bj,5)
361 OBEs0(J,K,bi,bj) = StoreOBCSE(J,K,bi,bj,6)
362 OBEu1(J,K,bi,bj) = StoreOBCSE(J,K,bi,bj,7)
363 OBEv1(J,K,bi,bj) = StoreOBCSE(J,K,bi,bj,8)
364 OBEt1(J,K,bi,bj) = StoreOBCSE(J,K,bi,bj,9)
365 OBEs1(J,K,bi,bj) = StoreOBCSE(J,K,bi,bj,10)
366 # ifdef ALLOW_OBCSE_CONTROL
367 xx_obcse0(J,K,bi,bj,1) = StoreOBCSE(J,K,bi,bj,11)
368 xx_obcse0(J,K,bi,bj,2) = StoreOBCSE(J,K,bi,bj,12)
369 xx_obcse0(J,K,bi,bj,3) = StoreOBCSE(J,K,bi,bj,13)
370 xx_obcse0(J,K,bi,bj,4) = StoreOBCSE(J,K,bi,bj,14)
371 xx_obcse1(J,K,bi,bj,1) = StoreOBCSE(J,K,bi,bj,15)
372 xx_obcse1(J,K,bi,bj,2) = StoreOBCSE(J,K,bi,bj,16)
373 xx_obcse1(J,K,bi,bj,3) = StoreOBCSE(J,K,bi,bj,17)
374 xx_obcse1(J,K,bi,bj,4) = StoreOBCSE(J,K,bi,bj,18)
375 # endif
376 enddo
377 enddo
378 enddo
379 enddo
380 # endif /* ALLOW_OBCS_EAST */
381
382 # ifdef ALLOW_OBCS_WEST
383 C-- Over all tiles
384 DO bj = myByLo(myThid), myByHi(myThid)
385 DO bi = myBxLo(myThid), myBxHi(myThid)
386 C- 2D arrays
387 DO K=1,Nr
388 DO J=1-Oly,sNy+Oly
389 OBWt(J,K,bi,bj) = StoreOBCSW(J,K,bi,bj,1)
390 OBWs(J,K,bi,bj) = StoreOBCSW(J,K,bi,bj,2)
391 OBWu0(J,K,bi,bj) = StoreOBCSW(J,K,bi,bj,3)
392 OBWv0(J,K,bi,bj) = StoreOBCSW(J,K,bi,bj,4)
393 OBWt0(J,K,bi,bj) = StoreOBCSW(J,K,bi,bj,5)
394 OBWs0(J,K,bi,bj) = StoreOBCSW(J,K,bi,bj,6)
395 OBWu1(J,K,bi,bj) = StoreOBCSW(J,K,bi,bj,7)
396 OBWv1(J,K,bi,bj) = StoreOBCSW(J,K,bi,bj,8)
397 OBWt1(J,K,bi,bj) = StoreOBCSW(J,K,bi,bj,9)
398 OBWs1(J,K,bi,bj) = StoreOBCSW(J,K,bi,bj,10)
399 # ifdef ALLOW_OBCSW_CONTROL
400 xx_obcsw0(J,K,i,j,1) = StoreOBCSW(J,K,bi,bj,11)
401 xx_obcsw0(J,K,i,j,2) = StoreOBCSW(J,K,bi,bj,12)
402 xx_obcsw0(J,K,i,j,3) = StoreOBCSW(J,K,bi,bj,13)
403 xx_obcsw0(J,K,i,j,4) = StoreOBCSW(J,K,bi,bj,14)
404 xx_obcsw1(J,K,i,j,1) = StoreOBCSW(J,K,bi,bj,15)
405 xx_obcsw1(J,K,i,j,2) = StoreOBCSW(J,K,bi,bj,16)
406 xx_obcsw1(J,K,i,j,3) = StoreOBCSW(J,K,bi,bj,17)
407 xx_obcsw1(J,K,i,j,4) = StoreOBCSW(J,K,bi,bj,18)
408 # endif
409 enddo
410 enddo
411 enddo
412 enddo
413 # endif /* ALLOW_OBCS_WEST */
414 #endif /* ALLOW_OBCS */
415
416 #ifdef ALLOW_SEAICE
417 C-- Over all tiles
418 DO bj = myByLo(myThid), myByHi(myThid)
419 DO bi = myBxLo(myThid), myBxHi(myThid)
420 C- 2D arrays
421 DO J=1-Oly,sNy+Oly
422 DO I=1-Olx,sNx+Olx
423 AREA(I,J,1,bi,bj) = StoreSEAICE(I,J,bi,bj,1)
424 AREA(I,J,2,bi,bj) = StoreSEAICE(I,J,bi,bj,2)
425 AREA(I,J,3,bi,bj) = StoreSEAICE(I,J,bi,bj,3)
426 HEFF(I,J,1,bi,bj) = StoreSEAICE(I,J,bi,bj,4)
427 HEFF(I,J,2,bi,bj) = StoreSEAICE(I,J,bi,bj,5)
428 HEFF(I,J,3,bi,bj) = StoreSEAICE(I,J,bi,bj,6)
429 HSNOW(I,J,bi,bj) = StoreSEAICE(I,J,bi,bj,7)
430 TICE(I,J,bi,bj) = StoreSEAICE(I,J,bi,bj,8)
431 RUNOFF(I,J,bi,bj) = StoreSEAICE(I,J,bi,bj,9)
432 # ifdef SEAICE_MULTICATEGORY
433 TICES(I,J,bi,bj) = StoreSEAICE(I,J,bi,bj,10)
434 # endif
435 # ifdef SEAICE_ALLOW_DYNAMICS
436 UICE(I,J,1,bi,bj) = StoreSEAICE(I,J,bi,bj,11)
437 UICE(I,J,2,bi,bj) = StoreSEAICE(I,J,bi,bj,12)
438 UICE(I,J,3,bi,bj) = StoreSEAICE(I,J,bi,bj,13)
439 VICE(I,J,1,bi,bj) = StoreSEAICE(I,J,bi,bj,14)
440 VICE(I,J,2,bi,bj) = StoreSEAICE(I,J,bi,bj,15)
441 VICE(I,J,3,bi,bj) = StoreSEAICE(I,J,bi,bj,16)
442 ZETA(I,J,bi,bj) = StoreSEAICE(I,J,bi,bj,17)
443 ETA(I,J,bi,bj) = StoreSEAICE(I,J,bi,bj,18)
444 # ifdef SEAICE_CGRID
445 dwatn(I,J,bi,bj) = StoreSEAICE(I,J,bi,bj,19)
446 seaicemasku(I,J,bi,bj) = StoreSEAICE(I,J,bi,bj,20)
447 seaicemaskv(I,J,bi,bj) = StoreSEAICE(I,J,bi,bj,21)
448 # endif /* SEAICE_CGRID */
449 # ifdef SEAICE_ALLOW_EVP
450 seaice_sigma1(I,J,bi,bj) = StoreSEAICE(I,J,bi,bj,22)
451 seaice_sigma2(I,J,bi,bj) = StoreSEAICE(I,J,bi,bj,23)
452 seaice_sigma12(I,J,bi,bj) = StoreSEAICE(I,J,bi,bj,24)
453 # endif /* SEAICE_ALLOW_EVP */
454 # endif /* SEAICE_ALLOW_DYNAMICS */
455 # ifdef SEAICE_SALINITY
456 HSALT(I,J,bi,bj) = StoreSEAICE(I,J,bi,bj,25)
457 # endif
458 enddo
459 enddo
460 enddo
461 enddo
462 #endif /* ALLOW_SEAICE */
463
464 #ifdef ALLOW_DEBUG
465 IF ( debugLevel .GE. debLevB )
466 & CALL DEBUG_LEAVE('AUTODIFF_RESTORE',myThid)
467 #endif
468
469 #endif /* ALLOW_AUTODIFF_TAMC */
470 c**************************************
471
472 return
473 end
474

  ViewVC Help
Powered by ViewVC 1.1.22