1 |
C $Header: /u/gcmpack/MITgcm/pkg/seaice/seaice_init_varia.F,v 1.77 2012/11/09 14:04:48 mlosch Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "SEAICE_OPTIONS.h" |
5 |
#ifdef ALLOW_OBCS |
6 |
# include "OBCS_OPTIONS.h" |
7 |
#endif |
8 |
|
9 |
CStartOfInterface |
10 |
SUBROUTINE SEAICE_INIT_VARIA( myThid ) |
11 |
C *==========================================================* |
12 |
C | SUBROUTINE SEAICE_INIT_VARIA | |
13 |
C | o Initialization of sea ice model. | |
14 |
C *==========================================================* |
15 |
C *==========================================================* |
16 |
IMPLICIT NONE |
17 |
|
18 |
C === Global variables === |
19 |
#include "SIZE.h" |
20 |
#include "EEPARAMS.h" |
21 |
#include "PARAMS.h" |
22 |
#include "GRID.h" |
23 |
#include "DYNVARS.h" |
24 |
#include "FFIELDS.h" |
25 |
#include "SEAICE_SIZE.h" |
26 |
#include "SEAICE_PARAMS.h" |
27 |
#include "SEAICE.h" |
28 |
#include "SEAICE_TRACER.h" |
29 |
#include "SEAICE_TAVE.h" |
30 |
#ifdef OBCS_UVICE_OLD |
31 |
# include "OBCS_GRID.h" |
32 |
#endif |
33 |
|
34 |
C === Routine arguments === |
35 |
C myThid :: Thread no. that called this routine. |
36 |
INTEGER myThid |
37 |
CEndOfInterface |
38 |
|
39 |
C === Local variables === |
40 |
C i,j,k,bi,bj :: Loop counters |
41 |
|
42 |
INTEGER i, j, bi, bj |
43 |
_RL PSTAR |
44 |
INTEGER kSurface |
45 |
#ifdef SEAICE_CGRID |
46 |
_RS mask_uice |
47 |
#endif |
48 |
INTEGER k |
49 |
#ifdef ALLOW_SITRACER |
50 |
INTEGER iTr, jTh |
51 |
#endif |
52 |
#ifdef OBCS_UVICE_OLD |
53 |
INTEGER I_obc, J_obc |
54 |
#endif /* ALLOW_OBCS */ |
55 |
|
56 |
IF ( buoyancyRelation .EQ. 'OCEANICP' ) THEN |
57 |
kSurface = Nr |
58 |
ELSE |
59 |
kSurface = 1 |
60 |
ENDIF |
61 |
|
62 |
C-- Initialise all variables in common blocks: |
63 |
DO bj=myByLo(myThid),myByHi(myThid) |
64 |
DO bi=myBxLo(myThid),myBxHi(myThid) |
65 |
DO j=1-OLy,sNy+OLy |
66 |
DO i=1-OLx,sNx+OLx |
67 |
HEFF(i,j,bi,bj)=0. _d 0 |
68 |
AREA(i,j,bi,bj)=0. _d 0 |
69 |
CToM<<< |
70 |
#ifdef SEAICE_ITD |
71 |
DO k=1,nITD |
72 |
AREAITD(i,j,k,bi,bj) =0. _d 0 |
73 |
HEFFITD(i,j,k,bi,bj) =0. _d 0 |
74 |
ENDDO |
75 |
#endif |
76 |
C>>>ToM |
77 |
UICE(i,j,bi,bj)=0. _d 0 |
78 |
VICE(i,j,bi,bj)=0. _d 0 |
79 |
#ifdef SEAICE_ALLOW_FREEDRIFT |
80 |
uice_fd(i,j,bi,bj)=0. _d 0 |
81 |
vice_fd(i,j,bi,bj)=0. _d 0 |
82 |
#endif |
83 |
C |
84 |
uIceNm1(i,j,bi,bj)=0. _d 0 |
85 |
vIceNm1(i,j,bi,bj)=0. _d 0 |
86 |
#ifdef SEAICE_GROWTH_LEGACY |
87 |
areaNm1(i,j,bi,bj)=0. _d 0 |
88 |
hEffNm1(i,j,bi,bj)=0. _d 0 |
89 |
#endif |
90 |
ETA (i,j,bi,bj) = 0. _d 0 |
91 |
etaZ(i,j,bi,bj) = 0. _d 0 |
92 |
ZETA(i,j,bi,bj) = 0. _d 0 |
93 |
FORCEX(i,j,bi,bj) = 0. _d 0 |
94 |
FORCEY(i,j,bi,bj) = 0. _d 0 |
95 |
uIceC(i,j,bi,bj) = 0. _d 0 |
96 |
vIceC(i,j,bi,bj) = 0. _d 0 |
97 |
#ifdef SEAICE_CGRID |
98 |
seaiceMassC(i,j,bi,bj)=0. _d 0 |
99 |
seaiceMassU(i,j,bi,bj)=0. _d 0 |
100 |
seaiceMassV(i,j,bi,bj)=0. _d 0 |
101 |
stressDivergenceX(i,j,bi,bj) = 0. _d 0 |
102 |
stressDivergenceY(i,j,bi,bj) = 0. _d 0 |
103 |
# ifdef SEAICE_ALLOW_EVP |
104 |
seaice_sigma1 (i,j,bi,bj) = 0. _d 0 |
105 |
seaice_sigma2 (i,j,bi,bj) = 0. _d 0 |
106 |
seaice_sigma12(i,j,bi,bj) = 0. _d 0 |
107 |
# endif /* SEAICE_ALLOW_EVP */ |
108 |
#else /* SEAICE_CGRID */ |
109 |
AMASS(i,j,bi,bj) = 0. _d 0 |
110 |
DAIRN(i,j,bi,bj) = 0. _d 0 |
111 |
WINDX(i,j,bi,bj) = 0. _d 0 |
112 |
WINDY(i,j,bi,bj) = 0. _d 0 |
113 |
GWATX(i,j,bi,bj) = 0. _d 0 |
114 |
GWATY(i,j,bi,bj) = 0. _d 0 |
115 |
#endif /* SEAICE_CGRID */ |
116 |
DWATN(i,j,bi,bj) = 0. _d 0 |
117 |
PRESS0(i,j,bi,bj) = 0. _d 0 |
118 |
FORCEX0(i,j,bi,bj)= 0. _d 0 |
119 |
FORCEY0(i,j,bi,bj)= 0. _d 0 |
120 |
ZMAX(i,j,bi,bj) = 0. _d 0 |
121 |
ZMIN(i,j,bi,bj) = 0. _d 0 |
122 |
HSNOW(i,j,bi,bj) = 0. _d 0 |
123 |
CToM<<< |
124 |
#ifdef SEAICE_ITD |
125 |
DO k=1,nITD |
126 |
HSNOWITD(i,j,k,bi,bj)=0. _d 0 |
127 |
ENDDO |
128 |
#endif |
129 |
C>>>ToM |
130 |
#ifdef SEAICE_VARIABLE_SALINITY |
131 |
HSALT(i,j,bi,bj) = 0. _d 0 |
132 |
#endif |
133 |
#ifdef ALLOW_SITRACER |
134 |
DO iTr = 1, SItrMaxNum |
135 |
SItracer(i,j,bi,bj,iTr) = 0. _d 0 |
136 |
SItrBucket(i,j,bi,bj,iTr) = 0. _d 0 |
137 |
c "ice concentration" tracer that should remain .EQ.1. |
138 |
if (SItrName(iTr).EQ.'one') SItracer(i,j,bi,bj,iTr)=1. _d 0 |
139 |
ENDDO |
140 |
DO jTh = 1, 5 |
141 |
SItrHEFF (i,j,bi,bj,jTh) = 0. _d 0 |
142 |
ENDDO |
143 |
DO jTh = 1, 3 |
144 |
SItrAREA (i,j,bi,bj,jTh) = 0. _d 0 |
145 |
ENDDO |
146 |
#endif |
147 |
TICE(i,j,bi,bj) = 0. _d 0 |
148 |
DO k=1,MULTDIM |
149 |
TICES(i,j,k,bi,bj)=0. _d 0 |
150 |
ENDDO |
151 |
TAUX(i,j,bi,bj) = 0. _d 0 |
152 |
TAUY(i,j,bi,bj) = 0. _d 0 |
153 |
#ifdef ALLOW_SEAICE_COST_EXPORT |
154 |
uHeffExportCell(i,j,bi,bj) = 0. _d 0 |
155 |
vHeffExportCell(i,j,bi,bj) = 0. _d 0 |
156 |
icevolMeanCell(i,j,bi,bj) = 0. _d 0 |
157 |
#endif |
158 |
saltWtrIce(i,j,bi,bj) = 0. _d 0 |
159 |
frWtrIce(i,j,bi,bj) = 0. _d 0 |
160 |
#if (defined (ALLOW_MEAN_SFLUX_COST_CONTRIBUTION) || defined (ALLOW_SSH_GLOBMEAN_COST_CONTRIBUTION)) |
161 |
frWtrAtm(i,j,bi,bj) = 0. _d 0 |
162 |
AREAforAtmFW(i,j,bi,bj)=0. _d 0 |
163 |
#endif |
164 |
ENDDO |
165 |
ENDDO |
166 |
ENDDO |
167 |
ENDDO |
168 |
|
169 |
#ifdef ALLOW_TIMEAVE |
170 |
C Initialize averages to zero |
171 |
DO bj = myByLo(myThid), myByHi(myThid) |
172 |
DO bi = myBxLo(myThid), myBxHi(myThid) |
173 |
CALL TIMEAVE_RESET( FUtave , 1, bi, bj, myThid ) |
174 |
CALL TIMEAVE_RESET( FVtave , 1, bi, bj, myThid ) |
175 |
CALL TIMEAVE_RESET( EmPmRtave, 1, bi, bj, myThid ) |
176 |
CALL TIMEAVE_RESET( QNETtave , 1, bi, bj, myThid ) |
177 |
CALL TIMEAVE_RESET( QSWtave , 1, bi, bj, myThid ) |
178 |
CALL TIMEAVE_RESET( UICEtave , 1, bi, bj, myThid ) |
179 |
CALL TIMEAVE_RESET( VICEtave , 1, bi, bj, myThid ) |
180 |
CALL TIMEAVE_RESET( HEFFtave , 1, bi, bj, myThid ) |
181 |
CALL TIMEAVE_RESET( AREAtave , 1, bi, bj, myThid ) |
182 |
SEAICE_timeAve(bi,bj) = ZERO |
183 |
ENDDO |
184 |
ENDDO |
185 |
#endif /* ALLOW_TIMEAVE */ |
186 |
|
187 |
C-- Initialize (variable) grid info. As long as we allow masking of |
188 |
C-- velocities outside of ice covered areas (in seaice_dynsolver) |
189 |
C-- we need to re-initialize seaiceMaskU/V here for TAF/TAMC |
190 |
#ifdef SEAICE_CGRID |
191 |
DO bj=myByLo(myThid),myByHi(myThid) |
192 |
DO bi=myBxLo(myThid),myBxHi(myThid) |
193 |
DO j=1-OLy+1,sNy+OLy |
194 |
DO i=1-OLx+1,sNx+OLx |
195 |
seaiceMaskU(i,j,bi,bj)= 0.0 _d 0 |
196 |
seaiceMaskV(i,j,bi,bj)= 0.0 _d 0 |
197 |
mask_uice=HEFFM(i,j,bi,bj)+HEFFM(i-1,j ,bi,bj) |
198 |
IF(mask_uice.GT.1.5 _d 0) seaiceMaskU(i,j,bi,bj)=1.0 _d 0 |
199 |
mask_uice=HEFFM(i,j,bi,bj)+HEFFM(i ,j-1,bi,bj) |
200 |
IF(mask_uice.GT.1.5 _d 0) seaiceMaskV(i,j,bi,bj)=1.0 _d 0 |
201 |
ENDDO |
202 |
ENDDO |
203 |
ENDDO |
204 |
ENDDO |
205 |
#endif /* SEAICE_CGRID */ |
206 |
|
207 |
DO bj=myByLo(myThid),myByHi(myThid) |
208 |
DO bi=myBxLo(myThid),myBxHi(myThid) |
209 |
#ifdef OBCS_UVICE_OLD |
210 |
#ifdef SEAICE_CGRID |
211 |
IF (useOBCS) THEN |
212 |
C-- If OBCS is turned on, close southern and western boundaries |
213 |
DO i=1-OLx,sNx+OLx |
214 |
C Southern boundary |
215 |
J_obc = OB_Js(i,bi,bj) |
216 |
IF ( J_obc.NE.OB_indexNone ) THEN |
217 |
seaiceMaskU(i,J_obc,bi,bj)= 0.0 _d 0 |
218 |
seaiceMaskV(i,J_obc,bi,bj)= 0.0 _d 0 |
219 |
ENDIF |
220 |
ENDDO |
221 |
DO j=1-OLy,sNy+OLy |
222 |
C Western boundary |
223 |
I_obc = OB_Iw(j,bi,bj) |
224 |
IF ( I_obc.NE.OB_indexNone ) THEN |
225 |
seaiceMaskU(I_obc,j,bi,bj)= 0.0 _d 0 |
226 |
seaiceMaskV(I_obc,j,bi,bj)= 0.0 _d 0 |
227 |
ENDIF |
228 |
ENDDO |
229 |
ENDIF |
230 |
#endif /* SEAICE_CGRID */ |
231 |
#endif /* OBCS_UVICE_OLD */ |
232 |
|
233 |
DO j=1-OLy,sNy+OLy |
234 |
DO i=1-OLx,sNx+OLx |
235 |
TICE(i,j,bi,bj)=273.0 _d 0 |
236 |
DO k=1,MULTDIM |
237 |
TICES(i,j,k,bi,bj)=273.0 _d 0 |
238 |
ENDDO |
239 |
#ifndef SEAICE_CGRID |
240 |
AMASS (i,j,bi,bj)=1000.0 _d 0 |
241 |
#else |
242 |
seaiceMassC(i,j,bi,bj)=1000.0 _d 0 |
243 |
seaiceMassU(i,j,bi,bj)=1000.0 _d 0 |
244 |
seaiceMassV(i,j,bi,bj)=1000.0 _d 0 |
245 |
#endif |
246 |
ENDDO |
247 |
ENDDO |
248 |
|
249 |
ENDDO |
250 |
ENDDO |
251 |
|
252 |
C-- Update overlap regions |
253 |
#ifdef SEAICE_CGRID |
254 |
CALL EXCH_UV_XY_RL(seaiceMaskU,seaiceMaskV,.FALSE.,myThid) |
255 |
#else |
256 |
_EXCH_XY_RS(UVM, myThid) |
257 |
#endif |
258 |
|
259 |
C-- Now lets look at all these beasts |
260 |
IF ( debugLevel .GE. debLevC ) THEN |
261 |
CALL PLOT_FIELD_XYRL( HEFFM , 'Current HEFFM ' , |
262 |
& nIter0, myThid ) |
263 |
#ifdef SEAICE_CGRID |
264 |
CALL PLOT_FIELD_XYRL( seaiceMaskU, 'Current seaiceMaskU', |
265 |
& nIter0, myThid ) |
266 |
CALL PLOT_FIELD_XYRL( seaiceMaskV, 'Current seaiceMaskV', |
267 |
& nIter0, myThid ) |
268 |
#else |
269 |
CALL PLOT_FIELD_XYRS( UVM , 'Current UVM ' , |
270 |
& nIter0, myThid ) |
271 |
#endif |
272 |
ENDIF |
273 |
|
274 |
C-- Set model variables to initial/restart conditions |
275 |
IF ( .NOT. ( startTime .EQ. baseTime .AND. nIter0 .EQ. 0 |
276 |
& .AND. pickupSuff .EQ. ' ') ) THEN |
277 |
|
278 |
CALL SEAICE_READ_PICKUP ( myThid ) |
279 |
|
280 |
ELSE |
281 |
|
282 |
DO bj=myByLo(myThid),myByHi(myThid) |
283 |
DO bi=myBxLo(myThid),myBxHi(myThid) |
284 |
DO j=1-OLy,sNy+OLy |
285 |
DO i=1-OLx,sNx+OLx |
286 |
HEFF(i,j,bi,bj)=SEAICE_initialHEFF*HEFFM(i,j,bi,bj) |
287 |
UICE(i,j,bi,bj)=ZERO |
288 |
VICE(i,j,bi,bj)=ZERO |
289 |
ENDDO |
290 |
ENDDO |
291 |
ENDDO |
292 |
ENDDO |
293 |
|
294 |
C-- Read initial sea-ice velocity from file (if available) |
295 |
IF ( uIceFile .NE. ' ' ) |
296 |
& CALL READ_FLD_XY_RL( uIceFile, ' ', uIce, 0, myThid ) |
297 |
IF ( vIceFile .NE. ' ' ) |
298 |
& CALL READ_FLD_XY_RL( vIceFile, ' ', vIce, 0, myThid ) |
299 |
IF ( uIceFile .NE. ' ' .OR. vIceFile .NE. ' ' ) THEN |
300 |
#ifdef SEAICE_CGRID |
301 |
DO bj=myByLo(myThid),myByHi(myThid) |
302 |
DO bi=myBxLo(myThid),myBxHi(myThid) |
303 |
DO j=1-OLy,sNy+OLy |
304 |
DO i=1-OLx,sNx+OLx |
305 |
uIce(i,j,bi,bj) = uIce(i,j,bi,bj)*seaiceMaskU(i,j,bi,bj) |
306 |
vIce(i,j,bi,bj) = vIce(i,j,bi,bj)*seaiceMaskV(i,j,bi,bj) |
307 |
ENDDO |
308 |
ENDDO |
309 |
ENDDO |
310 |
ENDDO |
311 |
#endif /* SEAICE_CGRID */ |
312 |
CALL EXCH_UV_XY_RL( uIce, vIce, .TRUE., myThid ) |
313 |
ENDIF |
314 |
|
315 |
C-- Read initial sea-ice thickness from file if available. |
316 |
IF ( HeffFile .NE. ' ' ) THEN |
317 |
CALL READ_FLD_XY_RL( HeffFile, ' ', HEFF, 0, myThid ) |
318 |
_EXCH_XY_RL(HEFF,myThid) |
319 |
DO bj=myByLo(myThid),myByHi(myThid) |
320 |
DO bi=myBxLo(myThid),myBxHi(myThid) |
321 |
DO j=1-OLy,sNy+OLy |
322 |
DO i=1-OLx,sNx+OLx |
323 |
HEFF(i,j,bi,bj) = MAX(HEFF(i,j,bi,bj),ZERO) |
324 |
ENDDO |
325 |
ENDDO |
326 |
ENDDO |
327 |
ENDDO |
328 |
ENDIF |
329 |
|
330 |
DO bj=myByLo(myThid),myByHi(myThid) |
331 |
DO bi=myBxLo(myThid),myBxHi(myThid) |
332 |
DO j=1-OLy,sNy+OLy |
333 |
DO i=1-OLx,sNx+OLx |
334 |
IF(HEFF(i,j,bi,bj).GT.ZERO) AREA(i,j,bi,bj)=ONE |
335 |
ENDDO |
336 |
ENDDO |
337 |
ENDDO |
338 |
ENDDO |
339 |
|
340 |
C-- Read initial sea-ice area from file if available. |
341 |
IF ( AreaFile .NE. ' ' ) THEN |
342 |
CALL READ_FLD_XY_RL( AreaFile, ' ', AREA, 0, myThid ) |
343 |
_EXCH_XY_RL(AREA,myThid) |
344 |
DO bj=myByLo(myThid),myByHi(myThid) |
345 |
DO bi=myBxLo(myThid),myBxHi(myThid) |
346 |
DO j=1-OLy,sNy+OLy |
347 |
DO i=1-OLx,sNx+OLx |
348 |
AREA(i,j,bi,bj) = MAX(AREA(i,j,bi,bj),ZERO) |
349 |
AREA(i,j,bi,bj) = MIN(AREA(i,j,bi,bj),ONE) |
350 |
IF ( AREA(i,j,bi,bj) .LE. ZERO ) HEFF(i,j,bi,bj) = ZERO |
351 |
IF ( HEFF(i,j,bi,bj) .LE. ZERO ) AREA(i,j,bi,bj) = ZERO |
352 |
ENDDO |
353 |
ENDDO |
354 |
ENDDO |
355 |
ENDDO |
356 |
ENDIF |
357 |
|
358 |
DO bj=myByLo(myThid),myByHi(myThid) |
359 |
DO bi=myBxLo(myThid),myBxHi(myThid) |
360 |
DO j=1-OLy,sNy+OLy |
361 |
DO i=1-OLx,sNx+OLx |
362 |
HSNOW(i,j,bi,bj) = 0.2 _d 0 * AREA(i,j,bi,bj) |
363 |
ENDDO |
364 |
ENDDO |
365 |
ENDDO |
366 |
ENDDO |
367 |
|
368 |
C-- Read initial snow thickness from file if available. |
369 |
IF ( HsnowFile .NE. ' ' ) THEN |
370 |
CALL READ_FLD_XY_RL( HsnowFile, ' ', HSNOW, 0, myThid ) |
371 |
_EXCH_XY_RL(HSNOW,myThid) |
372 |
DO bj=myByLo(myThid),myByHi(myThid) |
373 |
DO bi=myBxLo(myThid),myBxHi(myThid) |
374 |
DO j=1-OLy,sNy+OLy |
375 |
DO i=1-OLx,sNx+OLx |
376 |
HSNOW(i,j,bi,bj) = MAX(HSNOW(i,j,bi,bj),ZERO) |
377 |
ENDDO |
378 |
ENDDO |
379 |
ENDDO |
380 |
ENDDO |
381 |
ENDIF |
382 |
|
383 |
#ifdef SEAICE_ITD |
384 |
DO bj=myByLo(myThid),myByHi(myThid) |
385 |
DO bi=myBxLo(myThid),myBxHi(myThid) |
386 |
DO j=1-OLy,sNy+OLy |
387 |
DO i=1-OLx,sNx+OLx |
388 |
AREAITD(I,J,1,bi,bj) =AREA(I,J,bi,bj) |
389 |
HEFFITD(I,J,1,bi,bj) =HEFF(I,J,bi,bj) |
390 |
HSNOWITD(I,J,1,bi,bj)=HSNOW(I,J,bi,bj) |
391 |
ENDDO |
392 |
ENDDO |
393 |
ENDDO |
394 |
ENDDO |
395 |
C DO bj=myByLo(myThid),myByHi(myThid) |
396 |
C DO bi=myBxLo(myThid),myBxHi(myThid) |
397 |
C CALL SEAICE_ITD_REDIST(bi, bj, myTime, myIter, myThid) |
398 |
C ENDDO |
399 |
C ENDDO |
400 |
C it is sufficient to have first call of SEAICE_ITD_REDIST before SEAICE_GROWTH |
401 |
#endif |
402 |
|
403 |
#ifdef SEAICE_VARIABLE_SALINITY |
404 |
DO bj=myByLo(myThid),myByHi(myThid) |
405 |
DO bi=myBxLo(myThid),myBxHi(myThid) |
406 |
DO j=1-OLy,sNy+OLy |
407 |
DO i=1-OLx,sNx+OLx |
408 |
HSALT(i,j,bi,bj)=HEFF(i,j,bi,bj)*salt(i,j,kSurface,bi,bj)* |
409 |
& SEAICE_rhoIce*SEAICE_saltFrac |
410 |
cif & ICE2WATR*rhoConstFresh*SEAICE_saltFrac |
411 |
|
412 |
ENDDO |
413 |
ENDDO |
414 |
ENDDO |
415 |
ENDDO |
416 |
|
417 |
C-- Read initial sea ice salinity from file if available. |
418 |
IF ( HsaltFile .NE. ' ' ) THEN |
419 |
CALL READ_FLD_XY_RL( HsaltFile, ' ', HSALT, 0, myThid ) |
420 |
_EXCH_XY_RL(HSALT,myThid) |
421 |
ENDIF |
422 |
#endif /* SEAICE_VARIABLE_SALINITY */ |
423 |
|
424 |
#ifdef ALLOW_SITRACER |
425 |
C-- Read initial sea ice age from file if available. |
426 |
DO iTr = 1, SItrMaxNum |
427 |
IF ( SItrFile(iTr) .NE. ' ' ) THEN |
428 |
CALL READ_FLD_XY_RL( siTrFile(iTr), ' ', |
429 |
& SItracer(1-OLx,1-OLy,1,1,iTr), 0, myThid ) |
430 |
_EXCH_XY_RL(SItracer(1-OLx,1-OLy,1,1,iTr),myThid) |
431 |
ENDIF |
432 |
ENDDO |
433 |
#endif /* ALLOW_SITRACER */ |
434 |
|
435 |
ENDIF |
436 |
|
437 |
#if (defined (ALLOW_MEAN_SFLUX_COST_CONTRIBUTION) || defined (ALLOW_SSH_GLOBMEAN_COST_CONTRIBUTION)) |
438 |
DO bj=myByLo(myThid),myByHi(myThid) |
439 |
DO bi=myBxLo(myThid),myBxHi(myThid) |
440 |
DO j=1-OLy,sNy+OLy |
441 |
DO i=1-OLx,sNx+OLx |
442 |
AREAforAtmFW(i,j,bi,bj) = AREA(i,j,bi,bj) |
443 |
ENDDO |
444 |
ENDDO |
445 |
ENDDO |
446 |
ENDDO |
447 |
#endif |
448 |
|
449 |
#ifdef ALLOW_OBCS |
450 |
C-- In case we use scheme with a large stencil that extends into overlap: |
451 |
C no longer needed with the right masking in advection & diffusion S/R. |
452 |
c IF ( useOBCS ) THEN |
453 |
c DO bj=myByLo(myThid),myByHi(myThid) |
454 |
c DO bi=myBxLo(myThid),myBxHi(myThid) |
455 |
c CALL OBCS_COPY_TRACER( HEFF(1-OLx,1-OLy,bi,bj), |
456 |
c I 1, bi, bj, myThid ) |
457 |
c CALL OBCS_COPY_TRACER( AREA(1-OLx,1-OLy,bi,bj), |
458 |
c I 1, bi, bj, myThid ) |
459 |
c CALL OBCS_COPY_TRACER( HSNOW(1-OLx,1-OLy,bi,bj), |
460 |
c I 1, bi, bj, myThid ) |
461 |
#ifdef SEAICE_VARIABLE_SALINITY |
462 |
c CALL OBCS_COPY_TRACER( HSALT(1-OLx,1-OLy,bi,bj), |
463 |
c I 1, bi, bj, myThid ) |
464 |
#endif |
465 |
c ENDDO |
466 |
c ENDDO |
467 |
c ENDIF |
468 |
#endif /* ALLOW_OBCS */ |
469 |
|
470 |
#ifdef SEAICE_ALLOW_JFNK |
471 |
C Computing this metric cannot be done in S/R SEAICE_INIT_FIXED |
472 |
C where it belongs, because globalArea is only defined later after |
473 |
C S/R PACKAGES_INIT_FIXED, so we move this computation here. |
474 |
CALL SEAICE_MAP2VEC( nVec, rAw, rAs, |
475 |
& scalarProductMetric, .TRUE., myThid ) |
476 |
DO bj=myByLo(myThid),myByHi(myThid) |
477 |
DO bi=myBxLo(myThid),myBxHi(myThid) |
478 |
DO i=1,nVec |
479 |
scalarProductMetric(i,1,bi,bj) = |
480 |
& scalarProductMetric(i,1,bi,bj)/globalArea |
481 |
ENDDO |
482 |
ENDDO |
483 |
ENDDO |
484 |
#endif /* SEAICE_ALLOW_JFNK */ |
485 |
|
486 |
C--- Complete initialization |
487 |
PSTAR = SEAICE_strength |
488 |
DO bj=myByLo(myThid),myByHi(myThid) |
489 |
DO bi=myBxLo(myThid),myBxHi(myThid) |
490 |
DO j=1-OLy,sNy+OLy |
491 |
DO i=1-OLx,sNx+OLx |
492 |
ZETA(i,j,bi,bj) = HEFF(i,j,bi,bj)*(1.0 _d 11) |
493 |
ETA(i,j,bi,bj) = ZETA(i,j,bi,bj)/SEAICE_eccen**2 |
494 |
PRESS0(i,j,bi,bj) = PSTAR*HEFF(i,j,bi,bj) |
495 |
& *EXP(-20.0 _d 0*(ONE-AREA(i,j,bi,bj))) |
496 |
ZMAX(I,J,bi,bj) = SEAICE_zetaMaxFac*PRESS0(I,J,bi,bj) |
497 |
ZMIN(i,j,bi,bj) = SEAICE_zetaMin |
498 |
PRESS0(i,j,bi,bj) = PRESS0(i,j,bi,bj)*HEFFM(i,j,bi,bj) |
499 |
ENDDO |
500 |
ENDDO |
501 |
IF ( useRealFreshWaterFlux .AND. .NOT.useThSIce ) THEN |
502 |
DO j=1-OLy,sNy+OLy |
503 |
DO i=1-OLx,sNx+OLx |
504 |
sIceLoad(i,j,bi,bj) = HEFF(i,j,bi,bj)*SEAICE_rhoIce |
505 |
& + HSNOW(i,j,bi,bj)*SEAICE_rhoSnow |
506 |
|
507 |
ENDDO |
508 |
ENDDO |
509 |
ENDIF |
510 |
ENDDO |
511 |
ENDDO |
512 |
|
513 |
RETURN |
514 |
END |