/[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.21 - (show annotations) (download)
Tue Aug 28 19:18:45 2012 UTC (11 years, 10 months ago) by gforget
Branch: MAIN
CVS Tags: checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint63s, checkpoint64
Changes since 1.20: +2 -9 lines
- pkg/exf : added run time switch useAtmWind to replace ALLOW_ATM_WIND
  cpp switch. ALLOW_ATM_WIND now just sets the useAtmWind default (see
  exf_readparms.F) and force defines ALLOW_BULKFORMULAE (EXF_OPTIONS.h).
- pkg/exf, autodiff, ctrl, ecco and seaice : remove ALLOW_ATM_WIND
  brackets, or replace them with useAtmWind ones.
- pkg/ctrl, ecco : allow to compile both ALLOW_U/VSTRESS_CONTROL and
  ALLOW_U/VWIND_CONTROL. Depending on useAtmWind, one is inactive,
  and the other is active (see exf_getffields.F/exf_getsurfacefluxes.F).

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

  ViewVC Help
Powered by ViewVC 1.1.22