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