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