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

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

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

revision 1.6 by heimbach, Tue Sep 23 06:13:59 2008 UTC revision 1.18 by jmc, Tue May 24 20:35:54 2011 UTC
# Line 1  Line 1 
1  C $Header$  C $Header$
2  C $Name$  C $Name$
3    
4  #include "PACKAGES_CONFIG.h"  #include "AUTODIFF_OPTIONS.h"
 #include "CPP_OPTIONS.h"  
5  #ifdef ALLOW_OBCS  #ifdef ALLOW_OBCS
6  # include "OBCS_OPTIONS.h"  # include "OBCS_OPTIONS.h"
7  #endif  #endif
8  #ifdef ALLOW_SEAICE  #ifdef ALLOW_SEAICE
9  # include "SEAICE_OPTIONS.h"  # include "SEAICE_OPTIONS.h"
10  #endif  #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 )        subroutine autodiff_store( mythid )
18    
# Line 32  c     == global variables == Line 36  c     == global variables ==
36  #include "EEPARAMS.h"  #include "EEPARAMS.h"
37  #include "PARAMS.h"  #include "PARAMS.h"
38  c**************************************  c**************************************
39  #ifdef ALLOW_AUTODIFF_TAMC  c These includes are needed for
40    c AD-checkpointing.
 c These includes are needed for  
 c AD-checkpointing.  
41  c They provide the fields to be stored.  c They provide the fields to be stored.
42    
43  # include "GRID.h"  # include "GRID.h"
# Line 45  c They provide the fields to be stored. Line 47  c They provide the fields to be stored.
47  # include "AUTODIFF.h"  # include "AUTODIFF.h"
48    
49  # ifdef ALLOW_OBCS  # ifdef ALLOW_OBCS
50  #  include "OBCS.h"  #  include "OBCS_FIELDS.h"
51    #  include "OBCS_SEAICE.h"
52  # endif  # endif
53  # ifdef ALLOW_EXF  # ifdef ALLOW_EXF
54  #  include "EXF_FIELDS.h"  #  include "EXF_FIELDS.h"
# Line 60  c They provide the fields to be stored. Line 63  c They provide the fields to be stored.
63  # include "ctrl.h"  # include "ctrl.h"
64    
65  c     == routine arguments ==  c     == routine arguments ==
66  c     note: under the multi-threaded model myiter and  c     note: under the multi-threaded model myiter and
67  c           mytime are local variables passed around as routine  c           mytime are local variables passed around as routine
68  c           arguments. Although this is fiddly it saves the need to  c           arguments. Although this is fiddly it saves the need to
69  c           impose additional synchronisation points when they are  c           impose additional synchronisation points when they are
70  c           updated.  c           updated.
71  c     mythid - thread number for this instance of the routine.  c     mythid - thread number for this instance of the routine.
72        integer mythid        integer mythid
73    
74    #ifdef ALLOW_AUTODIFF_TAMC
75  c     == local variables ==  c     == local variables ==
76    
77        integer bi,bj        integer bi,bj
78        integer I,J,K        integer I,J,K
79          
80  c--   == end of interface ==  c--   == end of interface ==
81    
82  #ifdef ALLOW_DEBUG  #ifdef ALLOW_DEBUG
83        IF ( debugLevel .GE. debLevB )        IF ( debugLevel .GE. debLevB )
84       &    CALL DEBUG_ENTER('AUTODIFF_STORE',myThid)       &    CALL DEBUG_ENTER('AUTODIFF_STORE',myThid)
85  #endif  #endif
86              
87  C--   Over all tiles  C--   Over all tiles
88        DO bj = myByLo(myThid), myByHi(myThid)        DO bj = myByLo(myThid), myByHi(myThid)
89         DO bi = myBxLo(myThid), myBxHi(myThid)         DO bi = myBxLo(myThid), myBxHi(myThid)
# Line 137  C-      3D arrays Line 141  C-      3D arrays
141           DO J=1-Oly,sNy+Oly           DO J=1-Oly,sNy+Oly
142            DO I=1-Olx,sNx+Olx            DO I=1-Olx,sNx+Olx
143         StoreDynVars3D(I,J,K,bi,bj,1) = gs(I,J,K,bi,bj)         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)                     StoreDynVars3D(I,J,K,bi,bj,2) = gt(I,J,K,bi,bj)
145         StoreDynVars3D(I,J,K,bi,bj,3) = gtnm1(I,J,K,bi,bj)              #ifdef ALLOW_ADAMSBASHFORTH_3
146         StoreDynVars3D(I,J,K,bi,bj,4) = gsnm1(I,J,K,bi,bj)                     StoreDynVars3D(I,J,K,bi,bj,3) = gtnm(I,J,K,bi,bj,1)
147         StoreDynVars3D(I,J,K,bi,bj,5) = gunm1(I,J,K,bi,bj)                     StoreDynVars3D(I,J,K,bi,bj,4) = gsnm(I,J,K,bi,bj,1)
148         StoreDynVars3D(I,J,K,bi,bj,6) = gvnm1(I,J,K,bi,bj)                     StoreDynVars3D(I,J,K,bi,bj,5) = gunm(I,J,K,bi,bj,1)
149         StoreDynVars3D(I,J,K,bi,bj,7) = theta(I,J,K,bi,bj)                     StoreDynVars3D(I,J,K,bi,bj,6) = gvnm(I,J,K,bi,bj,1)
150         StoreDynVars3D(I,J,K,bi,bj,8) = salt(I,J,K,bi,bj)              #else
151         StoreDynVars3D(I,J,K,bi,bj,9) = uvel(I,J,K,bi,bj)                     StoreDynVars3D(I,J,K,bi,bj,3) = gtnm1(I,J,K,bi,bj)
152         StoreDynVars3D(I,J,K,bi,bj,10) = vvel(I,J,K,bi,bj)             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)         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)         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            ENDDO
169           ENDDO           ENDDO
170          ENDDO          ENDDO
# Line 155  C-      3D arrays Line 172  C-      3D arrays
172    
173         ENDDO         ENDDO
174        ENDDO        ENDDO
175      
176  #ifdef ALLOW_EXF  #ifdef ALLOW_EXF
177    
178  C--   Over all tiles  C--   Over all tiles
# Line 215  C-      2D arrays Line 232  C-      2D arrays
232          enddo          enddo
233         enddo         enddo
234        enddo        enddo
235          
236  # if (defined (ALLOW_ATM_TEMP) || defined (ALLOW_ATM_WIND))  # if (defined (ALLOW_ATM_TEMP) || defined (ALLOW_ATM_WIND))
237  C--   Over all tiles  C--   Over all tiles
238        DO bj = myByLo(myThid), myByHi(myThid)        DO bj = myByLo(myThid), myByHi(myThid)
# Line 232  C-      2D arrays Line 249  C-      2D arrays
249            StoreEXF2(I,J,bi,bj,6) = precip1(I,J,bi,bj)            StoreEXF2(I,J,bi,bj,6) = precip1(I,J,bi,bj)
250            StoreEXF2(I,J,bi,bj,7) = lwflux0(I,J,bi,bj)            StoreEXF2(I,J,bi,bj,7) = lwflux0(I,J,bi,bj)
251            StoreEXF2(I,J,bi,bj,8) = lwflux1(I,J,bi,bj)            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  #   ifdef EXF_READ_EVAP
255            StoreEXF2(I,J,bi,bj,9) = evap0(I,J,bi,bj)            StoreEXF2(I,J,bi,bj,11) = evap0(I,J,bi,bj)
256            StoreEXF2(I,J,bi,bj,10) = evap1(I,J,bi,bj)            StoreEXF2(I,J,bi,bj,12) = evap1(I,J,bi,bj)
257  #   else  #   else
258            StoreEXF2(I,J,bi,bj,9) = evap(I,J,bi,bj)            StoreEXF2(I,J,bi,bj,11) = evap(I,J,bi,bj)
259            StoreEXF2(I,J,bi,bj,10) = 0.0            StoreEXF2(I,J,bi,bj,12) = 0.0
260  #   endif /* EXF_READ_EVAP */  #   endif /* EXF_READ_EVAP */
261  #   ifdef ALLOW_DOWNWARD_RADIATION  #   ifdef ALLOW_DOWNWARD_RADIATION
262            StoreEXF2(I,J,bi,bj,11) = swdown0(I,J,bi,bj)            StoreEXF2(I,J,bi,bj,13) = swdown0(I,J,bi,bj)
263            StoreEXF2(I,J,bi,bj,12) = swdown1(I,J,bi,bj)            StoreEXF2(I,J,bi,bj,14) = swdown1(I,J,bi,bj)
264            StoreEXF2(I,J,bi,bj,13) = lwdown0(I,J,bi,bj)            StoreEXF2(I,J,bi,bj,15) = lwdown0(I,J,bi,bj)
265            StoreEXF2(I,J,bi,bj,14) = lwdown1(I,J,bi,bj)            StoreEXF2(I,J,bi,bj,16) = lwdown1(I,J,bi,bj)
266  #   else  #   else
           StoreEXF2(I,J,bi,bj,11) = 0.0  
           StoreEXF2(I,J,bi,bj,12) = 0.0  
267            StoreEXF2(I,J,bi,bj,13) = 0.0            StoreEXF2(I,J,bi,bj,13) = 0.0
268            StoreEXF2(I,J,bi,bj,14) = 0.0            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  #   endif
272  #  endif /* ALLOW_ATM_TEMP */  #  endif /* ALLOW_ATM_TEMP */
273  #  ifdef ALLOW_ATM_WIND  #  ifdef ALLOW_ATM_WIND
274            StoreEXF2(I,J,bi,bj,15) = uwind0(I,J,bi,bj)            StoreEXF2(I,J,bi,bj,17) = uwind0(I,J,bi,bj)
275            StoreEXF2(I,J,bi,bj,16) = uwind1(I,J,bi,bj)            StoreEXF2(I,J,bi,bj,18) = uwind1(I,J,bi,bj)
276            StoreEXF2(I,J,bi,bj,17) = vwind0(I,J,bi,bj)            StoreEXF2(I,J,bi,bj,19) = vwind0(I,J,bi,bj)
277            StoreEXF2(I,J,bi,bj,18) = vwind1(I,J,bi,bj)            StoreEXF2(I,J,bi,bj,20) = vwind1(I,J,bi,bj)
278  #  else /* ALLOW_ATM_WIND undef */  #  else /* ALLOW_ATM_WIND undef */
           StoreEXF2(I,J,bi,bj,15) = 0.0  
           StoreEXF2(I,J,bi,bj,16) = 0.0  
279            StoreEXF2(I,J,bi,bj,17) = 0.0            StoreEXF2(I,J,bi,bj,17) = 0.0
280            StoreEXF2(I,J,bi,bj,18) = 0.0            StoreEXF2(I,J,bi,bj,18) = 0.0
281              StoreEXF2(I,J,bi,bj,19) = 0.0
282              StoreEXF2(I,J,bi,bj,20) = 0.0
283  #  endif  /* ALLOW_ATM_WIND */  #  endif  /* ALLOW_ATM_WIND */
284           enddo           enddo
285          enddo          enddo
# Line 277  C-      2D arrays Line 296  C-      2D arrays
296  # ifdef ALLOW_UWIND_CONTROL  # ifdef ALLOW_UWIND_CONTROL
297            StoreCTRLS1(I,J,bi,bj,1) = xx_uwind0(I,J,bi,bj)            StoreCTRLS1(I,J,bi,bj,1) = xx_uwind0(I,J,bi,bj)
298            StoreCTRLS1(I,J,bi,bj,2) = xx_uwind1(I,J,bi,bj)            StoreCTRLS1(I,J,bi,bj,2) = xx_uwind1(I,J,bi,bj)
299  #  else              #  else
300            StoreCTRLS1(I,J,bi,bj,1) = 0.0            StoreCTRLS1(I,J,bi,bj,1) = 0.0
301            StoreCTRLS1(I,J,bi,bj,2) = 0.0            StoreCTRLS1(I,J,bi,bj,2) = 0.0
302  #  endif  #  endif
303  # ifdef ALLOW_VWIND_CONTROL  # ifdef ALLOW_VWIND_CONTROL
304            StoreCTRLS1(I,J,bi,bj,3) = xx_vwind0(I,J,bi,bj)            StoreCTRLS1(I,J,bi,bj,3) = xx_vwind0(I,J,bi,bj)
305            StoreCTRLS1(I,J,bi,bj,4) = xx_vwind1(I,J,bi,bj)            StoreCTRLS1(I,J,bi,bj,4) = xx_vwind1(I,J,bi,bj)
306  #  else              #  else
307            StoreCTRLS1(I,J,bi,bj,3) = 0.0            StoreCTRLS1(I,J,bi,bj,3) = 0.0
308            StoreCTRLS1(I,J,bi,bj,4) = 0.0            StoreCTRLS1(I,J,bi,bj,4) = 0.0
309  #  endif  #  endif
310  # ifdef ALLOW_ATEMP_CONTROL  # ifdef ALLOW_ATEMP_CONTROL
311            StoreCTRLS1(I,J,bi,bj,5) = xx_atemp0(I,J,bi,bj)            StoreCTRLS1(I,J,bi,bj,5) = xx_atemp0(I,J,bi,bj)
312            StoreCTRLS1(I,J,bi,bj,6) = xx_atemp1(I,J,bi,bj)            StoreCTRLS1(I,J,bi,bj,6) = xx_atemp1(I,J,bi,bj)
313  #  else              #  else
314            StoreCTRLS1(I,J,bi,bj,5) = 0.0            StoreCTRLS1(I,J,bi,bj,5) = 0.0
315            StoreCTRLS1(I,J,bi,bj,6) = 0.0            StoreCTRLS1(I,J,bi,bj,6) = 0.0
316  #  endif  #  endif
317  # ifdef ALLOW_AQH_CONTROL  # ifdef ALLOW_AQH_CONTROL
318            StoreCTRLS1(I,J,bi,bj,7) = xx_aqh0(I,J,bi,bj)            StoreCTRLS1(I,J,bi,bj,7) = xx_aqh0(I,J,bi,bj)
319            StoreCTRLS1(I,J,bi,bj,8) = xx_aqh1(I,J,bi,bj)            StoreCTRLS1(I,J,bi,bj,8) = xx_aqh1(I,J,bi,bj)
320  #  else              #  else
321            StoreCTRLS1(I,J,bi,bj,7) = 0.0            StoreCTRLS1(I,J,bi,bj,7) = 0.0
322            StoreCTRLS1(I,J,bi,bj,8) = 0.0            StoreCTRLS1(I,J,bi,bj,8) = 0.0
323  #  endif  #  endif
324  # ifdef ALLOW_PRECIP_CONTROL  # ifdef ALLOW_PRECIP_CONTROL
325            StoreCTRLS1(I,J,bi,bj,9) = xx_precip0(I,J,bi,bj)            StoreCTRLS1(I,J,bi,bj,9) = xx_precip0(I,J,bi,bj)
326            StoreCTRLS1(I,J,bi,bj,10) = xx_precip1(I,J,bi,bj)            StoreCTRLS1(I,J,bi,bj,10) = xx_precip1(I,J,bi,bj)
327  #  else              #  else
328            StoreCTRLS1(I,J,bi,bj,9) = 0.0            StoreCTRLS1(I,J,bi,bj,9) = 0.0
329            StoreCTRLS1(I,J,bi,bj,10) = 0.0            StoreCTRLS1(I,J,bi,bj,10) = 0.0
330  #  endif  #  endif
331  # ifdef ALLOW_SWFLUX_CONTROL  # ifdef ALLOW_SNOWPRECIP_CONTROL
332            StoreCTRLS1(I,J,bi,bj,11) = xx_swflux0(I,J,bi,bj)            StoreCTRLS1(I,J,bi,bj,11) = xx_snowprecip0(I,J,bi,bj)
333            StoreCTRLS1(I,J,bi,bj,12) = xx_swflux1(I,J,bi,bj)            StoreCTRLS1(I,J,bi,bj,12) = xx_snowprecip1(I,J,bi,bj)
334  #  else              #  else
335            StoreCTRLS1(I,J,bi,bj,11) = 0.0            StoreCTRLS1(I,J,bi,bj,11) = 0.0
336            StoreCTRLS1(I,J,bi,bj,12) = 0.0            StoreCTRLS1(I,J,bi,bj,12) = 0.0
337  #  endif  #  endif
338  #  ifdef ALLOW_SWDOWN_CONTROL  # ifdef ALLOW_SWFLUX_CONTROL
339            StoreCTRLS1(I,J,bi,bj,13) = xx_swdown0(I,J,bi,bj)            StoreCTRLS1(I,J,bi,bj,13) = xx_swflux0(I,J,bi,bj)
340            StoreCTRLS1(I,J,bi,bj,14) = xx_swdown1(I,J,bi,bj)            StoreCTRLS1(I,J,bi,bj,14) = xx_swflux1(I,J,bi,bj)
341  #  else              #  else
342            StoreCTRLS1(I,J,bi,bj,13) = 0.0            StoreCTRLS1(I,J,bi,bj,13) = 0.0
343            StoreCTRLS1(I,J,bi,bj,14) = 0.0            StoreCTRLS1(I,J,bi,bj,14) = 0.0
344  #  endif  #  endif
345  #  ifdef ALLOW_LWDOWN_CONTROL  #  ifdef ALLOW_SWDOWN_CONTROL
346            StoreCTRLS1(I,J,bi,bj,15) = xx_lwdown0(I,J,bi,bj)            StoreCTRLS1(I,J,bi,bj,15) = xx_swdown0(I,J,bi,bj)
347            StoreCTRLS1(I,J,bi,bj,16) = xx_lwdown1(I,J,bi,bj)            StoreCTRLS1(I,J,bi,bj,16) = xx_swdown1(I,J,bi,bj)
348  #  else              #  else
349            StoreCTRLS1(I,J,bi,bj,15) = 0.0            StoreCTRLS1(I,J,bi,bj,15) = 0.0
350            StoreCTRLS1(I,J,bi,bj,16) = 0.0            StoreCTRLS1(I,J,bi,bj,16) = 0.0
351  #  endif  #  endif
352  #  ifdef ALLOW_APRESSURE_CONTROL  #  ifdef ALLOW_LWDOWN_CONTROL
353            StoreCTRLS1(I,J,bi,bj,17) = xx_apressure0(I,J,bi,bj)            StoreCTRLS1(I,J,bi,bj,17) = xx_lwdown0(I,J,bi,bj)
354            StoreCTRLS1(I,J,bi,bj,18) = xx_apressure1(I,J,bi,bj)            StoreCTRLS1(I,J,bi,bj,18) = xx_lwdown1(I,J,bi,bj)
355  #  else              #  else
356            StoreCTRLS1(I,J,bi,bj,17) = 0.0            StoreCTRLS1(I,J,bi,bj,17) = 0.0
357            StoreCTRLS1(I,J,bi,bj,18) = 0.0            StoreCTRLS1(I,J,bi,bj,18) = 0.0
358  #  endif  #  endif
359    #  ifdef ALLOW_APRESSURE_CONTROL
360              StoreCTRLS1(I,J,bi,bj,19) = xx_apressure0(I,J,bi,bj)
361              StoreCTRLS1(I,J,bi,bj,20) = xx_apressure1(I,J,bi,bj)
362    #  else
363              StoreCTRLS1(I,J,bi,bj,19) = 0.0
364              StoreCTRLS1(I,J,bi,bj,20) = 0.0
365    #  endif
366           enddo           enddo
367          enddo          enddo
368         enddo         enddo
# Line 351  C--   Over all tiles Line 377  C--   Over all tiles
377  C-      2D arrays  C-      2D arrays
378          DO K=1,Nr          DO K=1,Nr
379           DO I=1-Olx,sNx+Olx           DO I=1-Olx,sNx+Olx
380            StoreOBCSN(I,Nr,bi,bj,1) = OBNt(I,Nr,bi,bj)            StoreOBCSN(I,K,bi,bj,1) = OBNt(I,K,bi,bj)
381            StoreOBCSN(I,Nr,bi,bj,2) = OBNs(I,Nr,bi,bj)            StoreOBCSN(I,K,bi,bj,2) = OBNs(I,K,bi,bj)
382            StoreOBCSN(I,Nr,bi,bj,3) = OBNu0(I,Nr,bi,bj)            StoreOBCSN(I,K,bi,bj,3) = OBNu0(I,K,bi,bj)
383            StoreOBCSN(I,Nr,bi,bj,4) = OBNv0(I,Nr,bi,bj)            StoreOBCSN(I,K,bi,bj,4) = OBNv0(I,K,bi,bj)
384            StoreOBCSN(I,Nr,bi,bj,5) = OBNt0(I,Nr,bi,bj)            StoreOBCSN(I,K,bi,bj,5) = OBNt0(I,K,bi,bj)
385            StoreOBCSN(I,Nr,bi,bj,6) = OBNs0(I,Nr,bi,bj)            StoreOBCSN(I,K,bi,bj,6) = OBNs0(I,K,bi,bj)
386            StoreOBCSN(I,Nr,bi,bj,7) = OBNu1(I,Nr,bi,bj)            StoreOBCSN(I,K,bi,bj,7) = OBNu1(I,K,bi,bj)
387            StoreOBCSN(I,Nr,bi,bj,8) = OBNv1(I,Nr,bi,bj)            StoreOBCSN(I,K,bi,bj,8) = OBNv1(I,K,bi,bj)
388            StoreOBCSN(I,Nr,bi,bj,9) = OBNt1(I,Nr,bi,bj)            StoreOBCSN(I,K,bi,bj,9) = OBNt1(I,K,bi,bj)
389            StoreOBCSN(I,Nr,bi,bj,10) = OBNs1(I,Nr,bi,bj)            StoreOBCSN(I,K,bi,bj,10) = OBNs1(I,K,bi,bj)
390  #  ifdef ALLOW_OBCSN_CONTROL  #  ifdef ALLOW_OBCSN_CONTROL
391            StoreOBCSN(I,Nr,bi,bj,11) = xx_obcsn0(I,Nr,bi,bj,1)            StoreOBCSN(I,K,bi,bj,11) = xx_obcsn0(I,K,bi,bj,1)
392            StoreOBCSN(I,Nr,bi,bj,12) = xx_obcsn0(I,Nr,bi,bj,2)            StoreOBCSN(I,K,bi,bj,12) = xx_obcsn0(I,K,bi,bj,2)
393            StoreOBCSN(I,Nr,bi,bj,13) = xx_obcsn0(I,Nr,bi,bj,3)            StoreOBCSN(I,K,bi,bj,13) = xx_obcsn0(I,K,bi,bj,3)
394            StoreOBCSN(I,Nr,bi,bj,14) = xx_obcsn0(I,Nr,bi,bj,4)            StoreOBCSN(I,K,bi,bj,14) = xx_obcsn0(I,K,bi,bj,4)
395            StoreOBCSN(I,Nr,bi,bj,15) = xx_obcsn1(I,Nr,bi,bj,1)            StoreOBCSN(I,K,bi,bj,15) = xx_obcsn1(I,K,bi,bj,1)
396            StoreOBCSN(I,Nr,bi,bj,16) = xx_obcsn1(I,Nr,bi,bj,2)            StoreOBCSN(I,K,bi,bj,16) = xx_obcsn1(I,K,bi,bj,2)
397            StoreOBCSN(I,Nr,bi,bj,17) = xx_obcsn1(I,Nr,bi,bj,3)            StoreOBCSN(I,K,bi,bj,17) = xx_obcsn1(I,K,bi,bj,3)
398            StoreOBCSN(I,Nr,bi,bj,18) = xx_obcsn1(I,Nr,bi,bj,4)            StoreOBCSN(I,K,bi,bj,18) = xx_obcsn1(I,K,bi,bj,4)
399  # else  # else
400            StoreOBCSN(I,Nr,bi,bj,11) = 0.0            StoreOBCSN(I,K,bi,bj,11) = 0.0
401            StoreOBCSN(I,Nr,bi,bj,12) = 0.0            StoreOBCSN(I,K,bi,bj,12) = 0.0
402            StoreOBCSN(I,Nr,bi,bj,13) = 0.0            StoreOBCSN(I,K,bi,bj,13) = 0.0
403            StoreOBCSN(I,Nr,bi,bj,14) = 0.0            StoreOBCSN(I,K,bi,bj,14) = 0.0
404            StoreOBCSN(I,Nr,bi,bj,15) = 0.0            StoreOBCSN(I,K,bi,bj,15) = 0.0
405            StoreOBCSN(I,Nr,bi,bj,16) = 0.0            StoreOBCSN(I,K,bi,bj,16) = 0.0
406            StoreOBCSN(I,Nr,bi,bj,17) = 0.0            StoreOBCSN(I,K,bi,bj,17) = 0.0
407            StoreOBCSN(I,Nr,bi,bj,18) = 0.0            StoreOBCSN(I,K,bi,bj,18) = 0.0
408  #  endif  #  endif
409           enddo           enddo
410          enddo          enddo
411         enddo         enddo
412        enddo        enddo
413  # endif /* ALLOW_OBCS_NORTH */        # endif /* ALLOW_OBCS_NORTH */
414    
415  # ifdef ALLOW_OBCS_SOUTH  # ifdef ALLOW_OBCS_SOUTH
416  C--   Over all tiles  C--   Over all tiles
# Line 393  C--   Over all tiles Line 419  C--   Over all tiles
419  C-      2D arrays  C-      2D arrays
420          DO K=1,Nr          DO K=1,Nr
421           DO I=1-Olx,sNx+Olx           DO I=1-Olx,sNx+Olx
422            StoreOBCSS(I,Nr,bi,bj,1) = OBSt(I,Nr,bi,bj)            StoreOBCSS(I,K,bi,bj,1) = OBSt(I,K,bi,bj)
423            StoreOBCSS(I,Nr,bi,bj,2) = OBSs(I,Nr,bi,bj)            StoreOBCSS(I,K,bi,bj,2) = OBSs(I,K,bi,bj)
424            StoreOBCSS(I,Nr,bi,bj,3) = OBSu0(I,Nr,bi,bj)            StoreOBCSS(I,K,bi,bj,3) = OBSu0(I,K,bi,bj)
425            StoreOBCSS(I,Nr,bi,bj,4) = OBSv0(I,Nr,bi,bj)            StoreOBCSS(I,K,bi,bj,4) = OBSv0(I,K,bi,bj)
426            StoreOBCSS(I,Nr,bi,bj,5) = OBSt0(I,Nr,bi,bj)            StoreOBCSS(I,K,bi,bj,5) = OBSt0(I,K,bi,bj)
427            StoreOBCSS(I,Nr,bi,bj,6) = OBSs0(I,Nr,bi,bj)            StoreOBCSS(I,K,bi,bj,6) = OBSs0(I,K,bi,bj)
428            StoreOBCSS(I,Nr,bi,bj,7) = OBSu1(I,Nr,bi,bj)            StoreOBCSS(I,K,bi,bj,7) = OBSu1(I,K,bi,bj)
429            StoreOBCSS(I,Nr,bi,bj,8) = OBSv1(I,Nr,bi,bj)            StoreOBCSS(I,K,bi,bj,8) = OBSv1(I,K,bi,bj)
430            StoreOBCSS(I,Nr,bi,bj,9) = OBSt1(I,Nr,bi,bj)            StoreOBCSS(I,K,bi,bj,9) = OBSt1(I,K,bi,bj)
431            StoreOBCSS(I,Nr,bi,bj,10)= OBSs1(I,Nr,bi,bj)            StoreOBCSS(I,K,bi,bj,10)= OBSs1(I,K,bi,bj)
432  #  ifdef ALLOW_OBCSS_CONTROL  #  ifdef ALLOW_OBCSS_CONTROL
433            StoreOBCSS(I,Nr,bi,bj,11) = xx_obcss0(I,Nr,bi,bj,1)            StoreOBCSS(I,K,bi,bj,11) = xx_obcss0(I,K,bi,bj,1)
434            StoreOBCSS(I,Nr,bi,bj,12) = xx_obcss0(I,Nr,bi,bj,2)            StoreOBCSS(I,K,bi,bj,12) = xx_obcss0(I,K,bi,bj,2)
435            StoreOBCSS(I,Nr,bi,bj,13) = xx_obcss0(I,Nr,bi,bj,3)            StoreOBCSS(I,K,bi,bj,13) = xx_obcss0(I,K,bi,bj,3)
436            StoreOBCSS(I,Nr,bi,bj,14) = xx_obcss0(I,Nr,bi,bj,4)            StoreOBCSS(I,K,bi,bj,14) = xx_obcss0(I,K,bi,bj,4)
437            StoreOBCSS(I,Nr,bi,bj,15) = xx_obcss1(I,Nr,bi,bj,1)            StoreOBCSS(I,K,bi,bj,15) = xx_obcss1(I,K,bi,bj,1)
438            StoreOBCSS(I,Nr,bi,bj,16) = xx_obcss1(I,Nr,bi,bj,2)            StoreOBCSS(I,K,bi,bj,16) = xx_obcss1(I,K,bi,bj,2)
439            StoreOBCSS(I,Nr,bi,bj,17) = xx_obcss1(I,Nr,bi,bj,3)            StoreOBCSS(I,K,bi,bj,17) = xx_obcss1(I,K,bi,bj,3)
440            StoreOBCSS(I,Nr,bi,bj,18) = xx_obcss1(I,Nr,bi,bj,4)            StoreOBCSS(I,K,bi,bj,18) = xx_obcss1(I,K,bi,bj,4)
441  # else  # else
442            StoreOBCSS(I,Nr,bi,bj,11) = 0.0            StoreOBCSS(I,K,bi,bj,11) = 0.0
443            StoreOBCSS(I,Nr,bi,bj,12) = 0.0            StoreOBCSS(I,K,bi,bj,12) = 0.0
444            StoreOBCSS(I,Nr,bi,bj,13) = 0.0            StoreOBCSS(I,K,bi,bj,13) = 0.0
445            StoreOBCSS(I,Nr,bi,bj,14) = 0.0            StoreOBCSS(I,K,bi,bj,14) = 0.0
446            StoreOBCSS(I,Nr,bi,bj,15) = 0.0            StoreOBCSS(I,K,bi,bj,15) = 0.0
447            StoreOBCSS(I,Nr,bi,bj,16) = 0.0            StoreOBCSS(I,K,bi,bj,16) = 0.0
448            StoreOBCSS(I,Nr,bi,bj,17) = 0.0            StoreOBCSS(I,K,bi,bj,17) = 0.0
449            StoreOBCSS(I,Nr,bi,bj,18) = 0.0            StoreOBCSS(I,K,bi,bj,18) = 0.0
450  #  endif  #  endif
451           enddo           enddo
452          enddo          enddo
453         enddo         enddo
454        enddo        enddo
455  # endif /* ALLOW_OBCS_SOUTH */        # endif /* ALLOW_OBCS_SOUTH */
456    
457  # ifdef ALLOW_OBCS_EAST  # ifdef ALLOW_OBCS_EAST
458  C--   Over all tiles  C--   Over all tiles
# Line 435  C--   Over all tiles Line 461  C--   Over all tiles
461  C-      2D arrays  C-      2D arrays
462          DO K=1,Nr          DO K=1,Nr
463           DO J=1-Oly,sNy+Oly           DO J=1-Oly,sNy+Oly
464            StoreOBCSE(J,Nr,bi,bj,1) = OBEt(J,Nr,bi,bj)            StoreOBCSE(J,K,bi,bj,1) = OBEt(J,K,bi,bj)
465            StoreOBCSE(J,Nr,bi,bj,2) = OBEs(J,Nr,bi,bj)            StoreOBCSE(J,K,bi,bj,2) = OBEs(J,K,bi,bj)
466            StoreOBCSE(J,Nr,bi,bj,3) = OBEu0(J,Nr,bi,bj)            StoreOBCSE(J,K,bi,bj,3) = OBEu0(J,K,bi,bj)
467            StoreOBCSE(J,Nr,bi,bj,4) = OBEv0(J,Nr,bi,bj)            StoreOBCSE(J,K,bi,bj,4) = OBEv0(J,K,bi,bj)
468            StoreOBCSE(J,Nr,bi,bj,5) = OBEt0(J,Nr,bi,bj)            StoreOBCSE(J,K,bi,bj,5) = OBEt0(J,K,bi,bj)
469            StoreOBCSE(J,Nr,bi,bj,6) = OBEs0(J,Nr,bi,bj)            StoreOBCSE(J,K,bi,bj,6) = OBEs0(J,K,bi,bj)
470            StoreOBCSE(J,Nr,bi,bj,7) = OBEu1(J,Nr,bi,bj)            StoreOBCSE(J,K,bi,bj,7) = OBEu1(J,K,bi,bj)
471            StoreOBCSE(J,Nr,bi,bj,8) = OBEv1(J,Nr,bi,bj)            StoreOBCSE(J,K,bi,bj,8) = OBEv1(J,K,bi,bj)
472            StoreOBCSE(J,Nr,bi,bj,9) = OBEt1(J,Nr,bi,bj)            StoreOBCSE(J,K,bi,bj,9) = OBEt1(J,K,bi,bj)
473            StoreOBCSE(J,Nr,bi,bj,10)= OBEs1(J,Nr,bi,bj)            StoreOBCSE(J,K,bi,bj,10)= OBEs1(J,K,bi,bj)
474  #  ifdef ALLOW_OBCSE_CONTROL  #  ifdef ALLOW_OBCSE_CONTROL
475            StoreOBCSE(J,Nr,bi,bj,11) = xx_obcse0(J,Nr,bi,bj,1)            StoreOBCSE(J,K,bi,bj,11) = xx_obcse0(J,K,bi,bj,1)
476            StoreOBCSE(J,Nr,bi,bj,12) = xx_obcse0(J,Nr,bi,bj,2)            StoreOBCSE(J,K,bi,bj,12) = xx_obcse0(J,K,bi,bj,2)
477            StoreOBCSE(J,Nr,bi,bj,13) = xx_obcse0(J,Nr,bi,bj,3)            StoreOBCSE(J,K,bi,bj,13) = xx_obcse0(J,K,bi,bj,3)
478            StoreOBCSE(J,Nr,bi,bj,14) = xx_obcse0(J,Nr,bi,bj,4)            StoreOBCSE(J,K,bi,bj,14) = xx_obcse0(J,K,bi,bj,4)
479            StoreOBCSE(J,Nr,bi,bj,15) = xx_obcse1(J,Nr,bi,bj,1)            StoreOBCSE(J,K,bi,bj,15) = xx_obcse1(J,K,bi,bj,1)
480            StoreOBCSE(J,Nr,bi,bj,16) = xx_obcse1(J,Nr,bi,bj,2)            StoreOBCSE(J,K,bi,bj,16) = xx_obcse1(J,K,bi,bj,2)
481            StoreOBCSE(J,Nr,bi,bj,17) = xx_obcse1(J,Nr,bi,bj,3)            StoreOBCSE(J,K,bi,bj,17) = xx_obcse1(J,K,bi,bj,3)
482            StoreOBCSE(J,Nr,bi,bj,18) = xx_obcse1(J,Nr,bi,bj,4)            StoreOBCSE(J,K,bi,bj,18) = xx_obcse1(J,K,bi,bj,4)
483  # else  # else
484            StoreOBCSE(J,Nr,bi,bj,11) = 0.0            StoreOBCSE(J,K,bi,bj,11) = 0.0
485            StoreOBCSE(J,Nr,bi,bj,12) = 0.0            StoreOBCSE(J,K,bi,bj,12) = 0.0
486            StoreOBCSE(J,Nr,bi,bj,13) = 0.0            StoreOBCSE(J,K,bi,bj,13) = 0.0
487            StoreOBCSE(J,Nr,bi,bj,14) = 0.0            StoreOBCSE(J,K,bi,bj,14) = 0.0
488            StoreOBCSE(J,Nr,bi,bj,15) = 0.0            StoreOBCSE(J,K,bi,bj,15) = 0.0
489            StoreOBCSE(J,Nr,bi,bj,16) = 0.0            StoreOBCSE(J,K,bi,bj,16) = 0.0
490            StoreOBCSE(J,Nr,bi,bj,17) = 0.0            StoreOBCSE(J,K,bi,bj,17) = 0.0
491            StoreOBCSE(J,Nr,bi,bj,18) = 0.0            StoreOBCSE(J,K,bi,bj,18) = 0.0
492  #  endif  #  endif
493           enddo           enddo
494          enddo          enddo
495         enddo         enddo
496        enddo        enddo
497  # endif /* ALLOW_OBCS_EAST */      # endif /* ALLOW_OBCS_EAST */
498    
499  # ifdef ALLOW_OBCS_WEST  # ifdef ALLOW_OBCS_WEST
500  C--   Over all tiles  C--   Over all tiles
# Line 477  C--   Over all tiles Line 503  C--   Over all tiles
503  C-      2D arrays  C-      2D arrays
504          DO K=1,Nr          DO K=1,Nr
505           DO J=1-Oly,sNy+Oly           DO J=1-Oly,sNy+Oly
506            StoreOBCSW(J,Nr,bi,bj,1) = OBWt(J,Nr,bi,bj)            StoreOBCSW(J,K,bi,bj,1) = OBWt(J,K,bi,bj)
507            StoreOBCSW(J,Nr,bi,bj,2) = OBWs(J,Nr,bi,bj)            StoreOBCSW(J,K,bi,bj,2) = OBWs(J,K,bi,bj)
508            StoreOBCSW(J,Nr,bi,bj,3) = OBWu0(J,Nr,bi,bj)            StoreOBCSW(J,K,bi,bj,3) = OBWu0(J,K,bi,bj)
509            StoreOBCSW(J,Nr,bi,bj,4) = OBWv0(J,Nr,bi,bj)            StoreOBCSW(J,K,bi,bj,4) = OBWv0(J,K,bi,bj)
510            StoreOBCSW(J,Nr,bi,bj,5) = OBWt0(J,Nr,bi,bj)            StoreOBCSW(J,K,bi,bj,5) = OBWt0(J,K,bi,bj)
511            StoreOBCSW(J,Nr,bi,bj,6) = OBWs0(J,Nr,bi,bj)            StoreOBCSW(J,K,bi,bj,6) = OBWs0(J,K,bi,bj)
512            StoreOBCSW(J,Nr,bi,bj,7) = OBWu1(J,Nr,bi,bj)            StoreOBCSW(J,K,bi,bj,7) = OBWu1(J,K,bi,bj)
513            StoreOBCSW(J,Nr,bi,bj,8) = OBWv1(J,Nr,bi,bj)            StoreOBCSW(J,K,bi,bj,8) = OBWv1(J,K,bi,bj)
514            StoreOBCSW(J,Nr,bi,bj,9) = OBWt1(J,Nr,bi,bj)            StoreOBCSW(J,K,bi,bj,9) = OBWt1(J,K,bi,bj)
515            StoreOBCSW(J,Nr,bi,bj,10)= OBWs1(J,Nr,bi,bj)            StoreOBCSW(J,K,bi,bj,10)= OBWs1(J,K,bi,bj)
516  #  ifdef ALLOW_OBCSW_CONTROL  #  ifdef ALLOW_OBCSW_CONTROL
517            StoreOBCSW(J,Nr,bi,bj,11) = xx_obcsw0(J,Nr,bi,bj,1)            StoreOBCSW(J,K,bi,bj,11) = xx_obcsw0(J,K,bi,bj,1)
518            StoreOBCSW(J,Nr,bi,bj,12) = xx_obcsw0(J,Nr,bi,bj,2)            StoreOBCSW(J,K,bi,bj,12) = xx_obcsw0(J,K,bi,bj,2)
519            StoreOBCSW(J,Nr,bi,bj,13) = xx_obcsw0(J,Nr,bi,bj,3)            StoreOBCSW(J,K,bi,bj,13) = xx_obcsw0(J,K,bi,bj,3)
520            StoreOBCSW(J,Nr,bi,bj,14) = xx_obcsw0(J,Nr,bi,bj,4)            StoreOBCSW(J,K,bi,bj,14) = xx_obcsw0(J,K,bi,bj,4)
521            StoreOBCSW(J,Nr,bi,bj,15) = xx_obcsw1(J,Nr,bi,bj,1)            StoreOBCSW(J,K,bi,bj,15) = xx_obcsw1(J,K,bi,bj,1)
522            StoreOBCSW(J,Nr,bi,bj,16) = xx_obcsw1(J,Nr,bi,bj,2)            StoreOBCSW(J,K,bi,bj,16) = xx_obcsw1(J,K,bi,bj,2)
523            StoreOBCSW(J,Nr,bi,bj,17) = xx_obcsw1(J,Nr,bi,bj,3)            StoreOBCSW(J,K,bi,bj,17) = xx_obcsw1(J,K,bi,bj,3)
524            StoreOBCSW(J,Nr,bi,bj,18) = xx_obcsw1(J,Nr,bi,bj,4)            StoreOBCSW(J,K,bi,bj,18) = xx_obcsw1(J,K,bi,bj,4)
525  # else  # else
526            StoreOBCSW(J,Nr,bi,bj,11) = 0.0            StoreOBCSW(J,K,bi,bj,11) = 0.0
527            StoreOBCSW(J,Nr,bi,bj,12) = 0.0            StoreOBCSW(J,K,bi,bj,12) = 0.0
528            StoreOBCSW(J,Nr,bi,bj,13) = 0.0            StoreOBCSW(J,K,bi,bj,13) = 0.0
529            StoreOBCSW(J,Nr,bi,bj,14) = 0.0            StoreOBCSW(J,K,bi,bj,14) = 0.0
530            StoreOBCSW(J,Nr,bi,bj,15) = 0.0            StoreOBCSW(J,K,bi,bj,15) = 0.0
531            StoreOBCSW(J,Nr,bi,bj,16) = 0.0            StoreOBCSW(J,K,bi,bj,16) = 0.0
532            StoreOBCSW(J,Nr,bi,bj,17) = 0.0            StoreOBCSW(J,K,bi,bj,17) = 0.0
533            StoreOBCSW(J,Nr,bi,bj,18) = 0.0            StoreOBCSW(J,K,bi,bj,18) = 0.0
534  #  endif  #  endif
535           enddo           enddo
536          enddo          enddo
# Line 520  C--   Over all tiles Line 546  C--   Over all tiles
546  C-      2D arrays  C-      2D arrays
547          DO J=1-Oly,sNy+Oly          DO J=1-Oly,sNy+Oly
548           DO I=1-Olx,sNx+Olx           DO I=1-Olx,sNx+Olx
549            StoreSEAICE(I,J,bi,bj,1) = AREA(I,J,1,bi,bj)            StoreSEAICE(I,J,bi,bj,1) = AREA(I,J,bi,bj)
550            StoreSEAICE(I,J,bi,bj,2) = AREA(I,J,2,bi,bj)            StoreSEAICE(I,J,bi,bj,2) = HEFF(I,J,bi,bj)
551            StoreSEAICE(I,J,bi,bj,3) = AREA(I,J,3,bi,bj)            StoreSEAICE(I,J,bi,bj,3) = HSNOW(I,J,bi,bj)
552            StoreSEAICE(I,J,bi,bj,4) = HEFF(I,J,1,bi,bj)            StoreSEAICE(I,J,bi,bj,4) = TICE(I,J,bi,bj)
553            StoreSEAICE(I,J,bi,bj,5) = HEFF(I,J,2,bi,bj)            StoreSEAICE(I,J,bi,bj,5) = RUNOFF(I,J,bi,bj)
554            StoreSEAICE(I,J,bi,bj,6) = HEFF(I,J,3,bi,bj)                      StoreSEAICE(I,J,bi,bj,6) = 0.0
555            StoreSEAICE(I,J,bi,bj,7) = HSNOW(I,J,bi,bj)  #  ifdef SEAICE_CGRID
556            StoreSEAICE(I,J,bi,bj,8) = TICE(I,J,bi,bj)            StoreSEAICE(I,J,bi,bj,14) = stressDivergenceX(I,J,bi,bj)
557            StoreSEAICE(I,J,bi,bj,9) = RUNOFF(I,J,bi,bj)            StoreSEAICE(I,J,bi,bj,15) = stressDivergenceY(I,J,bi,bj)
558  # ifdef SEAICE_MULTICATEGORY  #  else
559            StoreSEAICE(I,J,bi,bj,10) = TICES(I,J,bi,bj)            StoreSEAICE(I,J,bi,bj,14) = 0.0
560  # else            StoreSEAICE(I,J,bi,bj,15) = 0.0
           StoreSEAICE(I,J,bi,bj,10) = 0.0  
561  # endif  # endif
562  # ifdef SEAICE_ALLOW_DYNAMICS  # ifdef SEAICE_ALLOW_DYNAMICS
563            StoreSEAICE(I,J,bi,bj,11) = UICE(I,J,1,bi,bj)            StoreSEAICE(I,J,bi,bj,7) = UICE(I,J,bi,bj)
564            StoreSEAICE(I,J,bi,bj,12) = UICE(I,J,2,bi,bj)            StoreSEAICE(I,J,bi,bj,8) = VICE(I,J,bi,bj)
565            StoreSEAICE(I,J,bi,bj,13) = UICE(I,J,3,bi,bj)            StoreSEAICE(I,J,bi,bj,9) = ZETA(I,J,bi,bj)
566            StoreSEAICE(I,J,bi,bj,14) = VICE(I,J,1,bi,bj)            StoreSEAICE(I,J,bi,bj,10) = ETA(I,J,bi,bj)
           StoreSEAICE(I,J,bi,bj,15) = VICE(I,J,2,bi,bj)  
           StoreSEAICE(I,J,bi,bj,16) = VICE(I,J,3,bi,bj)  
           StoreSEAICE(I,J,bi,bj,17) = ZETA(I,J,bi,bj)  
           StoreSEAICE(I,J,bi,bj,18) = ETA(I,J,bi,bj)  
567  #  ifdef SEAICE_CGRID  #  ifdef SEAICE_CGRID
568            StoreSEAICE(I,J,bi,bj,19) = dwatn(I,J,bi,bj)            StoreSEAICE(I,J,bi,bj,11) = dwatn(I,J,bi,bj)
569            StoreSEAICE(I,J,bi,bj,20) = seaicemasku(I,J,bi,bj)            StoreSEAICE(I,J,bi,bj,12) = seaicemasku(I,J,bi,bj)
570            StoreSEAICE(I,J,bi,bj,21) = seaicemaskv(I,J,bi,bj)            StoreSEAICE(I,J,bi,bj,13) = seaicemaskv(I,J,bi,bj)
571  #  else  #  else
572            StoreSEAICE(I,J,bi,bj,19) = 0.0                  StoreSEAICE(I,J,bi,bj,11) = 0.0
573            StoreSEAICE(I,J,bi,bj,20) = 0.0                      StoreSEAICE(I,J,bi,bj,12) = 0.0
574            StoreSEAICE(I,J,bi,bj,21) = 0.0            StoreSEAICE(I,J,bi,bj,15) = 0.0
575  #  endif /* SEAICE_CGRID */  #  endif /* SEAICE_CGRID */
576  #  ifdef SEAICE_ALLOW_EVP  #  ifdef SEAICE_ALLOW_EVP
577            StoreSEAICE(I,J,bi,bj,22) = seaice_sigma1(I,J,bi,bj)            StoreSEAICE(I,J,bi,bj,16) = seaice_sigma1(I,J,bi,bj)
578            StoreSEAICE(I,J,bi,bj,23) = seaice_sigma2(I,J,bi,bj)            StoreSEAICE(I,J,bi,bj,17) = seaice_sigma2(I,J,bi,bj)
579            StoreSEAICE(I,J,bi,bj,24) = seaice_sigma12(I,J,bi,bj)            StoreSEAICE(I,J,bi,bj,18) = seaice_sigma12(I,J,bi,bj)
580  #  else  #  else
581            StoreSEAICE(I,J,bi,bj,22) = 0.0                  StoreSEAICE(I,J,bi,bj,16) = 0.0
582            StoreSEAICE(I,J,bi,bj,23) = 0.0                      StoreSEAICE(I,J,bi,bj,17) = 0.0
583            StoreSEAICE(I,J,bi,bj,24) = 0.0            StoreSEAICE(I,J,bi,bj,18) = 0.0
584  #  endif /* SEAICE_ALLOW_EVP */  #  endif /* SEAICE_ALLOW_EVP */
585  # else  # else
586            StoreSEAICE(I,J,bi,bj,11) = 0.0                  StoreSEAICE(I,J,bi,bj,7) = 0.0
587            StoreSEAICE(I,J,bi,bj,12) = 0.0                      StoreSEAICE(I,J,bi,bj,8) = 0.0
588              StoreSEAICE(I,J,bi,bj,9) = 0.0
589              StoreSEAICE(I,J,bi,bj,10) = 0.0
590              StoreSEAICE(I,J,bi,bj,11) = 0.0
591              StoreSEAICE(I,J,bi,bj,12) = 0.0
592            StoreSEAICE(I,J,bi,bj,13) = 0.0            StoreSEAICE(I,J,bi,bj,13) = 0.0
593            StoreSEAICE(I,J,bi,bj,14) = 0.0                  StoreSEAICE(I,J,bi,bj,14) = 0.0
594            StoreSEAICE(I,J,bi,bj,15) = 0.0                      StoreSEAICE(I,J,bi,bj,15) = 0.0
595            StoreSEAICE(I,J,bi,bj,16) = 0.0            StoreSEAICE(I,J,bi,bj,16) = 0.0
596            StoreSEAICE(I,J,bi,bj,17) = 0.0                  StoreSEAICE(I,J,bi,bj,17) = 0.0
597            StoreSEAICE(I,J,bi,bj,18) = 0.0                      StoreSEAICE(I,J,bi,bj,18) = 0.0
           StoreSEAICE(I,J,bi,bj,19) = 0.0        
           StoreSEAICE(I,J,bi,bj,20) = 0.0            
           StoreSEAICE(I,J,bi,bj,21) = 0.0  
           StoreSEAICE(I,J,bi,bj,22) = 0.0        
           StoreSEAICE(I,J,bi,bj,23) = 0.0            
           StoreSEAICE(I,J,bi,bj,24) = 0.0  
598  # endif /* SEAICE_ALLOW_DYNAMICS */  # endif /* SEAICE_ALLOW_DYNAMICS */
599  # ifdef SEAICE_SALINITY  # ifdef SEAICE_VARIABLE_SALINITY
600            StoreSEAICE(I,J,bi,bj,25) = HSALT(I,J,bi,bj)            StoreSEAICE(I,J,bi,bj,19) = HSALT(I,J,bi,bj)
601  # else  # else
602            StoreSEAICE(I,J,bi,bj,25) = 0.0            StoreSEAICE(I,J,bi,bj,19) = 0.0
603  # endif  # endif
604           enddo           enddo
605          enddo          enddo
# Line 589  C-      2D arrays Line 608  C-      2D arrays
608  #endif /* ALLOW_SEAICE */  #endif /* ALLOW_SEAICE */
609    
610  #ifdef ALLOW_DEBUG  #ifdef ALLOW_DEBUG
611        IF ( debugLevel .GE. debLevB )        IF ( debugLevel .GE. debLevB )
612       &    CALL DEBUG_LEAVE('AUTODIFF_STORE',myThid)       &    CALL DEBUG_LEAVE('AUTODIFF_STORE',myThid)
613  #endif  #endif
614    
# Line 598  c************************************** Line 617  c**************************************
617    
618        return        return
619        end        end
   

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.18

  ViewVC Help
Powered by ViewVC 1.1.22