1 |
C $Header: /u/gcmpack/MITgcm/pkg/thsice/thsice_step_fwd.F,v 1.42 2013/06/10 20:05:15 jmc Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "THSICE_OPTIONS.h" |
5 |
#ifdef ALLOW_ATM2D |
6 |
# include "ctrparam.h" |
7 |
#endif |
8 |
|
9 |
CBOP |
10 |
C !ROUTINE: THSICE_STEP_FWD |
11 |
C !INTERFACE: |
12 |
SUBROUTINE THSICE_STEP_FWD( |
13 |
I bi, bj, iMin, iMax, jMin, jMax, |
14 |
I prcAtm, snowPrc, qPrcRnO, |
15 |
I myTime, myIter, myThid ) |
16 |
C !DESCRIPTION: \bv |
17 |
C *==========================================================* |
18 |
C | S/R THSICE_STEP_FWD |
19 |
C | o Step Forward Therm-SeaIce model. |
20 |
C *==========================================================* |
21 |
C \ev |
22 |
|
23 |
C !USES: |
24 |
IMPLICIT NONE |
25 |
|
26 |
C === Global variables === |
27 |
#include "SIZE.h" |
28 |
#include "EEPARAMS.h" |
29 |
#include "PARAMS.h" |
30 |
#include "FFIELDS.h" |
31 |
#ifdef ALLOW_ATM2D |
32 |
# include "ATMSIZE.h" |
33 |
# include "ATM2D_VARS.h" |
34 |
#endif |
35 |
#include "THSICE_SIZE.h" |
36 |
#include "THSICE_PARAMS.h" |
37 |
#include "THSICE_VARS.h" |
38 |
#include "THSICE_TAVE.h" |
39 |
#ifdef ALLOW_AUTODIFF_TAMC |
40 |
# include "tamc.h" |
41 |
# include "tamc_keys.h" |
42 |
#endif |
43 |
|
44 |
INTEGER siLo, siHi, sjLo, sjHi |
45 |
PARAMETER ( siLo = 1-OLx , siHi = sNx+OLx ) |
46 |
PARAMETER ( sjLo = 1-OLy , sjHi = sNy+OLy ) |
47 |
|
48 |
C !INPUT/OUTPUT PARAMETERS: |
49 |
C === Routine arguments === |
50 |
C- input: |
51 |
C bi,bj :: tile indices |
52 |
C iMin,iMax :: computation domain: 1rst index range |
53 |
C jMin,jMax :: computation domain: 2nd index range |
54 |
C prcAtm :: total precip from the atmosphere [kg/m2/s] |
55 |
C snowPrc :: snow precipitation [kg/m2/s] |
56 |
C qPrcRnO :: Energy content of Precip+RunOff (+=down) [W/m2] |
57 |
C myTime :: current Time of simulation [s] |
58 |
C myIter :: current Iteration number in simulation |
59 |
C myThid :: my Thread Id number |
60 |
C-- Use fluxes hold in commom blocks |
61 |
C- input: |
62 |
C icFlxSW :: net short-wave heat flux (+=down) below sea-ice, into ocean |
63 |
C icFlxAtm :: net Atmospheric surf. heat flux over sea-ice [W/m2], (+=down) |
64 |
C icFrwAtm :: evaporation over sea-ice to the atmosphere [kg/m2/s] (+=up) |
65 |
C- output |
66 |
C icFlxAtm :: net Atmospheric surf. heat flux over ice+ocean [W/m2], (+=down) |
67 |
C icFrwAtm :: net fresh-water flux (E-P) from the atmosphere [kg/m2/s] (+=up) |
68 |
INTEGER bi,bj |
69 |
INTEGER iMin, iMax |
70 |
INTEGER jMin, jMax |
71 |
_RL prcAtm (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
72 |
_RL snowPrc(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
73 |
_RL qPrcRnO(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
74 |
_RL myTime |
75 |
INTEGER myIter |
76 |
INTEGER myThid |
77 |
CEOP |
78 |
|
79 |
#ifdef ALLOW_THSICE |
80 |
C !LOCAL VARIABLES: |
81 |
C === Local variables === |
82 |
C iceFrac :: fraction of grid area covered in ice |
83 |
C flx2oc :: net heat flux from the ice to the ocean (+=down) [W/m2] |
84 |
C frw2oc :: fresh-water flux from the ice to the ocean (+=down) |
85 |
C fsalt :: mass salt flux to the ocean (+=down) |
86 |
C frzSeaWat :: seawater freezing rate (expressed as mass flux) [kg/m^2/s] |
87 |
C frzmltMxL :: ocean mixed-layer freezing/melting potential [W/m2] |
88 |
C tFrzOce :: sea-water freezing temperature [oC] (function of S) |
89 |
C isIceFree :: true for ice-free grid-cell that remains ice-free |
90 |
C ageFac :: snow aging factor [1] |
91 |
C snowFac :: snowing refreshing-age factor [units of 1/snowPr] |
92 |
LOGICAL isIceFree(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
93 |
_RL iceFrac (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
94 |
_RL flx2oc (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
95 |
_RL frw2oc (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
96 |
_RL fsalt (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
97 |
_RL frzSeaWat(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
98 |
_RL tFrzOce (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
99 |
_RL frzmltMxL(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
100 |
_RL ageFac |
101 |
_RL snowFac |
102 |
_RL cphm |
103 |
_RL opFrac, icFrac |
104 |
INTEGER i,j |
105 |
LOGICAL dBugFlag |
106 |
|
107 |
C- define grid-point location where to print debugging values |
108 |
#include "THSICE_DEBUG.h" |
109 |
|
110 |
1010 FORMAT(A,1P4E14.6) |
111 |
|
112 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
113 |
|
114 |
#ifdef ALLOW_AUTODIFF_TAMC |
115 |
act1 = bi - myBxLo(myThid) |
116 |
max1 = myBxHi(myThid) - myBxLo(myThid) + 1 |
117 |
act2 = bj - myByLo(myThid) |
118 |
max2 = myByHi(myThid) - myByLo(myThid) + 1 |
119 |
act3 = myThid - 1 |
120 |
max3 = nTx*nTy |
121 |
act4 = ikey_dynamics - 1 |
122 |
ticekey = (act1 + 1) + act2*max1 |
123 |
& + act3*max1*max2 |
124 |
& + act4*max1*max2*max3 |
125 |
#endif /* ALLOW_AUTODIFF_TAMC */ |
126 |
|
127 |
C- Initialise |
128 |
dBugFlag = debugLevel.GE.debLevC |
129 |
DO j = 1-OLy, sNy+OLy |
130 |
DO i = 1-OLx, sNx+OLx |
131 |
isIceFree(i,j) = .FALSE. |
132 |
#ifdef ALLOW_ATM2D |
133 |
sFluxFromIce(i,j) = 0. _d 0 |
134 |
#else |
135 |
saltFlux(i,j,bi,bj) = 0. _d 0 |
136 |
#endif |
137 |
frzSeaWat(i,j) = 0. _d 0 |
138 |
#ifdef ALLOW_AUTODIFF_TAMC |
139 |
iceFrac(i,j) = 0. |
140 |
C- set these arrays everywhere: overlap are not set and not used, |
141 |
C but some arrays are stored and storage includes overlap. |
142 |
flx2oc(i,j) = 0. _d 0 |
143 |
frw2oc(i,j) = 0. _d 0 |
144 |
fsalt (i,j) = 0. _d 0 |
145 |
c tFrzOce (i,j) = 0. _d 0 |
146 |
c frzmltMxL(i,j) = 0. _d 0 |
147 |
#endif |
148 |
ENDDO |
149 |
ENDDO |
150 |
|
151 |
ageFac = 1. _d 0 - thSIce_deltaT/snowAgTime |
152 |
snowFac = thSIce_deltaT/(rhos*hNewSnowAge) |
153 |
|
154 |
#ifdef ALLOW_AUTODIFF_TAMC |
155 |
CADJ STORE iceMask(:,:,bi,bj) = comlev1_bibj,key=ticekey,byte=isbyte |
156 |
CADJ STORE iceheight(:,:,bi,bj) = comlev1_bibj,key=ticekey,byte=isbyte |
157 |
CADJ STORE icfrwatm(:,:,bi,bj) = comlev1_bibj,key=ticekey,byte=isbyte |
158 |
CADJ STORE qice1(:,:,bi,bj) = comlev1_bibj,key=ticekey,byte=isbyte |
159 |
CADJ STORE qice2(:,:,bi,bj) = comlev1_bibj,key=ticekey,byte=isbyte |
160 |
CADJ STORE snowheight(:,:,bi,bj) = comlev1_bibj,key=ticekey,byte=isbyte |
161 |
#endif |
162 |
DO j = jMin, jMax |
163 |
DO i = iMin, iMax |
164 |
IF (iceMask(i,j,bi,bj).GT.0. _d 0) THEN |
165 |
C-- Snow aging : |
166 |
snowAge(i,j,bi,bj) = thSIce_deltaT |
167 |
& + snowAge(i,j,bi,bj)*ageFac |
168 |
IF ( snowPrc(i,j).GT.0. _d 0 ) |
169 |
& snowAge(i,j,bi,bj) = snowAge(i,j,bi,bj) |
170 |
& * EXP( - snowFac*snowPrc(i,j) ) |
171 |
C------- |
172 |
C note: Any flux of mass (here fresh water) that enter or leave the system |
173 |
C with a non zero energy HAS TO be counted: add snow precip. |
174 |
icFlxAtm(i,j,bi,bj) = icFlxAtm(i,j,bi,bj) |
175 |
& - Lfresh*snowPrc(i,j) |
176 |
& + qPrcRnO(i,j) |
177 |
C-- |
178 |
ENDIF |
179 |
ENDDO |
180 |
ENDDO |
181 |
|
182 |
#ifdef ALLOW_DIAGNOSTICS |
183 |
IF ( useDiagnostics ) THEN |
184 |
# ifdef OLD_THSICE_CALL_SEQUENCE |
185 |
CALL DIAGNOSTICS_FILL(iceMask,'SI_FrcFx',0,1,1,bi,bj,myThid) |
186 |
# endif |
187 |
CALL DIAGNOSTICS_FRACT_FILL( snowPrc, |
188 |
I iceMask(1-OLx,1-OLy,bi,bj), oneRL, 1, |
189 |
I 'SIsnwPrc', 0,1,2,bi,bj,myThid ) |
190 |
CALL DIAGNOSTICS_FRACT_FILL( siceAlb, iceMask, oneRL, 1, |
191 |
I 'SIalbedo', 0,1,1,bi,bj,myThid ) |
192 |
ENDIF |
193 |
#endif /* ALLOW_DIAGNOSTICS */ |
194 |
DO j = jMin, jMax |
195 |
DO i = iMin, iMax |
196 |
siceAlb(i,j,bi,bj) = iceMask(i,j,bi,bj)*siceAlb(i,j,bi,bj) |
197 |
ENDDO |
198 |
ENDDO |
199 |
|
200 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
201 |
C part.2 : ice-covered fraction ; |
202 |
C change in ice/snow thickness and ice-fraction |
203 |
C note: can only reduce the ice-fraction but not increase it. |
204 |
C------- |
205 |
DO j = jMin, jMax |
206 |
DO i = iMin, iMax |
207 |
|
208 |
tFrzOce(i,j) = -mu_Tf*sOceMxL(i,j,bi,bj) |
209 |
cphm = cpwater*rhosw*hOceMxL(i,j,bi,bj) |
210 |
frzmltMxL(i,j) = ( tFrzOce(i,j)-tOceMxL(i,j,bi,bj) ) |
211 |
& * cphm/ocean_deltaT |
212 |
iceFrac(i,j) = iceMask(i,j,bi,bj) |
213 |
flx2oc(i,j) = icFlxSW(i,j,bi,bj) + qPrcRnO(i,j) |
214 |
C------- |
215 |
#ifdef ALLOW_DBUG_THSICE |
216 |
IF ( dBug(i,j,bi,bj) ) THEN |
217 |
IF (frzmltMxL(i,j).GT.0. .OR. iceFrac(i,j).GT.0.) THEN |
218 |
WRITE(6,'(A,2I4,2I2)') 'ThSI_FWD: i,j=',i,j,bi,bj |
219 |
WRITE(6,1010) 'ThSI_FWD:-1- iceMask, hIc, hSn, Tsf =', |
220 |
& iceFrac(i,j), iceHeight(i,j,bi,bj), |
221 |
& snowHeight(i,j,bi,bj), Tsrf(i,j,bi,bj) |
222 |
WRITE(6,1010) 'ThSI_FWD: ocTs,tFrzOce,frzmltMxL,Qnet=', |
223 |
& tOceMxL(i,j,bi,bj), tFrzOce(i,j), |
224 |
& frzmltMxL(i,j), Qnet(i,j,bi,bj) |
225 |
ENDIF |
226 |
IF (iceFrac(i,j).GT.0.) |
227 |
& WRITE(6,1010) 'ThSI_FWD: icFrac,flxAtm,evpAtm,flxSnw=', |
228 |
& iceFrac(i,j), icFlxAtm(i,j,bi,bj), |
229 |
& icFrwAtm(i,j,bi,bj),-Lfresh*snowPrc(i,j) |
230 |
ENDIF |
231 |
#endif |
232 |
ENDDO |
233 |
ENDDO |
234 |
|
235 |
#ifdef ALLOW_AUTODIFF_TAMC |
236 |
CADJ STORE iceMask(:,:,bi,bj) = comlev1_bibj,key=ticekey,byte=isbyte |
237 |
#endif |
238 |
|
239 |
CALL THSICE_CALC_THICKN( |
240 |
I bi, bj, |
241 |
I iMin,iMax, jMin,jMax, dBugFlag, |
242 |
I iceMask(siLo,sjLo,bi,bj), tFrzOce, |
243 |
I tOceMxL(siLo,sjLo,bi,bj), v2ocMxL(siLo,sjLo,bi,bj), |
244 |
I snowPrc(siLo,sjLo), prcAtm, |
245 |
I sHeating(siLo,sjLo,bi,bj), flxCndBt(siLo,sjLo,bi,bj), |
246 |
U iceFrac, iceHeight(siLo,sjLo,bi,bj), |
247 |
U snowHeight(siLo,sjLo,bi,bj), Tsrf(siLo,sjLo,bi,bj), |
248 |
U Qice1(siLo,sjLo,bi,bj), Qice2(siLo,sjLo,bi,bj), |
249 |
U icFrwAtm(siLo,sjLo,bi,bj), frzmltMxL, flx2oc, |
250 |
O frw2oc, fsalt, frzSeaWat, |
251 |
I myTime, myIter, myThid ) |
252 |
|
253 |
#ifdef ALLOW_AUTODIFF_TAMC |
254 |
CADJ STORE iceMask(:,:,bi,bj) = comlev1_bibj,key=ticekey,byte=isbyte |
255 |
CADJ STORE fsalt(:,:) = comlev1_bibj,key=ticekey,byte=isbyte |
256 |
CADJ STORE flx2oc(:,:) = comlev1_bibj,key=ticekey,byte=isbyte |
257 |
CADJ STORE frw2oc(:,:) = comlev1_bibj,key=ticekey,byte=isbyte |
258 |
#endif |
259 |
C-- Net fluxes : |
260 |
DO j = jMin, jMax |
261 |
DO i = iMin, iMax |
262 |
c#ifdef ALLOW_AUTODIFF_TAMC |
263 |
c ikey_1 = i |
264 |
c & + sNx*(j-1) |
265 |
c & + sNx*sNy*act1 |
266 |
c & + sNx*sNy*max1*act2 |
267 |
c & + sNx*sNy*max1*max2*act3 |
268 |
c & + sNx*sNy*max1*max2*max3*act4 |
269 |
c#endif /* ALLOW_AUTODIFF_TAMC */ |
270 |
c#ifdef ALLOW_AUTODIFF_TAMC |
271 |
cCADJ STORE icemask(i,j,bi,bj) = comlev1_thsice_1, key=ikey_1 |
272 |
c#endif |
273 |
IF (iceMask(i,j,bi,bj).GT.0. _d 0) THEN |
274 |
C- weighted average net fluxes: |
275 |
c#ifdef ALLOW_AUTODIFF_TAMC |
276 |
cCADJ STORE fsalt(i,j) = comlev1_thsice_1, key=ikey_1 |
277 |
cCADJ STORE flx2oc(i,j) = comlev1_thsice_1, key=ikey_1 |
278 |
cCADJ STORE frw2oc(i,j) = comlev1_thsice_1, key=ikey_1 |
279 |
cCADJ STORE icemask(i,j,bi,bj) = comlev1_thsice_1, key=ikey_1 |
280 |
c#endif |
281 |
icFrac = iceMask(i,j,bi,bj) |
282 |
opFrac= 1. _d 0-icFrac |
283 |
#ifdef ALLOW_ATM2D |
284 |
pass_qnet(i,j) = pass_qnet(i,j) - icFrac*flx2oc(i,j) |
285 |
pass_evap(i,j) = pass_evap(i,j) - icFrac*frw2oc(i,j)/rhofw |
286 |
sFluxFromIce(i,j) = -icFrac*fsalt(i,j) |
287 |
#else |
288 |
icFlxAtm(i,j,bi,bj) = icFrac*icFlxAtm(i,j,bi,bj) |
289 |
& - opFrac*Qnet(i,j,bi,bj) |
290 |
icFrwAtm(i,j,bi,bj) = icFrac*icFrwAtm(i,j,bi,bj) |
291 |
& + opFrac*EmPmR(i,j,bi,bj) |
292 |
Qnet(i,j,bi,bj) = -icFrac*flx2oc(i,j) + opFrac*Qnet(i,j,bi,bj) |
293 |
EmPmR(i,j,bi,bj)= -icFrac*frw2oc(i,j) |
294 |
& + opFrac*EmPmR(i,j,bi,bj) |
295 |
saltFlux(i,j,bi,bj) = -icFrac*fsalt(i,j) |
296 |
#endif |
297 |
C- All seawater freezing (no reduction by surf. melting) from CALC_THICKN |
298 |
c frzSeaWat(i,j) = icFrac*frzSeaWat(i,j) |
299 |
C- Net seawater freezing (underestimated if there is surf. melting or rain) |
300 |
frzSeaWat(i,j) = MAX( -icFrac*frw2oc(i,j), 0. _d 0 ) |
301 |
|
302 |
#ifdef ALLOW_DBUG_THSICE |
303 |
IF (dBug(i,j,bi,bj)) WRITE(6,1010) |
304 |
& 'ThSI_FWD:-3- iceFrac, hIc, hSn, Qnet =', |
305 |
& iceFrac(i,j), iceHeight(i,j,bi,bj), |
306 |
& snowHeight(i,j,bi,bj), Qnet(i,j,bi,bj) |
307 |
#endif |
308 |
|
309 |
ELSEIF (hOceMxL(i,j,bi,bj).GT.0. _d 0) THEN |
310 |
icFlxAtm(i,j,bi,bj) = -Qnet(i,j,bi,bj) |
311 |
icFrwAtm(i,j,bi,bj) = EmPmR(i,j,bi,bj) |
312 |
ELSE |
313 |
icFlxAtm(i,j,bi,bj) = 0. _d 0 |
314 |
icFrwAtm(i,j,bi,bj) = 0. _d 0 |
315 |
ENDIF |
316 |
ENDDO |
317 |
ENDDO |
318 |
|
319 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
320 |
C part.3 : freezing of sea-water |
321 |
C over ice-free fraction and what is left from ice-covered fraction |
322 |
C------- |
323 |
DO j = 1-OLy, sNy+OLy |
324 |
DO i = 1-OLx, sNx+OLx |
325 |
flx2oc(i,j) = 0. _d 0 |
326 |
frw2oc(i,j) = 0. _d 0 |
327 |
fsalt (i,j) = 0. _d 0 |
328 |
ENDDO |
329 |
ENDDO |
330 |
CALL THSICE_EXTEND( |
331 |
I bi, bj, |
332 |
I iMin,iMax, jMin,jMax, dBugFlag, |
333 |
I frzmltMxL, tFrzOce, |
334 |
I tOceMxL(siLo,sjLo,bi,bj), |
335 |
U iceFrac, iceHeight(siLo,sjLo,bi,bj), |
336 |
U snowHeight(siLo,sjLo,bi,bj), Tsrf(siLo,sjLo,bi,bj), |
337 |
U Tice1(siLo,sjLo,bi,bj), Tice2(siLo,sjLo,bi,bj), |
338 |
U Qice1(siLo,sjLo,bi,bj), Qice2(siLo,sjLo,bi,bj), |
339 |
O flx2oc, frw2oc, fsalt, |
340 |
I myTime, myIter, myThid ) |
341 |
|
342 |
#ifdef ALLOW_AUTODIFF_TAMC |
343 |
CADJ STORE snowHeight(:,:,bi,bj) = |
344 |
CADJ & comlev1_bibj,key=ticekey,byte=isbyte |
345 |
#endif |
346 |
DO j = jMin, jMax |
347 |
DO i = iMin, iMax |
348 |
C-- Net fluxes : (only non-zero contribution where frzmltMxL > 0 ) |
349 |
#ifdef ALLOW_ATM2D |
350 |
pass_qnet(i,j) = pass_qnet(i,j) - flx2oc(i,j) |
351 |
pass_evap(i,j) = pass_evap(i,j) - frw2oc(i,j)/rhofw |
352 |
sFluxFromIce(i,j)= sFluxFromIce(i,j) - fsalt(i,j) |
353 |
#else |
354 |
Qnet(i,j,bi,bj) = Qnet(i,j,bi,bj) - flx2oc(i,j) |
355 |
EmPmR(i,j,bi,bj)= EmPmR(i,j,bi,bj)- frw2oc(i,j) |
356 |
saltFlux(i,j,bi,bj)=saltFlux(i,j,bi,bj) - fsalt(i,j) |
357 |
#endif |
358 |
frzSeaWat(i,j) = frzSeaWat(i,j) + MAX(-frw2oc(i,j), 0. _d 0 ) |
359 |
|
360 |
#ifdef ALLOW_DBUG_THSICE |
361 |
IF (dBug(i,j,bi,bj)) WRITE(6,1010) |
362 |
& 'ThSI_FWD:-4- iceFrac, hIc, hSn, Qnet =', |
363 |
& iceFrac(i,j), iceHeight(i,j,bi,bj), |
364 |
& snowHeight(i,j,bi,bj), Qnet(i,j,bi,bj) |
365 |
#endif |
366 |
|
367 |
IF ( hOceMxL(i,j,bi,bj).GT.0. _d 0 ) |
368 |
& isIceFree(i,j) = iceMask(i,j,bi,bj).LE.0. _d 0 |
369 |
& .AND. iceFrac(i,j) .LE.0. _d 0 |
370 |
IF ( iceFrac(i,j) .GT. 0. _d 0 ) THEN |
371 |
iceMask(i,j,bi,bj)=iceFrac(i,j) |
372 |
IF ( snowHeight(i,j,bi,bj).EQ.0. _d 0 ) |
373 |
& snowAge(i,j,bi,bj) = 0. _d 0 |
374 |
ELSE |
375 |
iceMask(i,j,bi,bj) = 0. _d 0 |
376 |
iceHeight(i,j,bi,bj)= 0. _d 0 |
377 |
snowHeight(i,j,bi,bj)=0. _d 0 |
378 |
snowAge(i,j,bi,bj) = 0. _d 0 |
379 |
Tsrf(i,j,bi,bj) = tOceMxL(i,j,bi,bj) |
380 |
Tice1(i,j,bi,bj) = 0. _d 0 |
381 |
Tice2(i,j,bi,bj) = 0. _d 0 |
382 |
Qice1(i,j,bi,bj) = Lfresh |
383 |
Qice2(i,j,bi,bj) = Lfresh |
384 |
ENDIF |
385 |
ENDDO |
386 |
ENDDO |
387 |
|
388 |
#ifdef ALLOW_SALT_PLUME |
389 |
IF ( useSALT_PLUME ) THEN |
390 |
CALL THSICE_SALT_PLUME( |
391 |
I sOceMxL(1-OLx,1-OLy,bi,bj), |
392 |
I frzSeaWat, |
393 |
I iMin,iMax, jMin,jMax, bi, bj, |
394 |
I myTime, myIter, myThid ) |
395 |
ENDIF |
396 |
#endif /* ALLOW_SALT_PLUME */ |
397 |
|
398 |
# ifdef ALLOW_AUTODIFF_TAMC |
399 |
CADJ STORE snowHeight(:,:,bi,bj) = |
400 |
CADJ & comlev1_bibj,key=ticekey,byte=isbyte |
401 |
# endif |
402 |
#ifdef OLD_THSICE_CALL_SEQUENCE |
403 |
IF ( .TRUE. ) THEN |
404 |
#else /* OLD_THSICE_CALL_SEQUENCE */ |
405 |
IF ( thSIceAdvScheme.LE.0 ) THEN |
406 |
C- note: 1) regarding sIceLoad in ocean-dynamics, in case thSIceAdvScheme > 0, |
407 |
C compute sIceLoad in THSICE_DO_ADVECT after seaice advection is done. |
408 |
C 2) regarding sIceLoad in seaice-dynamics, probably better not to update |
409 |
C sIceLoad here, to keep the balance between sIceLoad and adjusted Eta. |
410 |
C 3) not sure in the case of no advection (thSIceAdvScheme=0) but using |
411 |
C seaice dynamics (unlikely senario anyway). |
412 |
#endif /* OLD_THSICE_CALL_SEQUENCE */ |
413 |
C-- Compute Sea-Ice Loading (= mass of sea-ice + snow / area unit) |
414 |
DO j = jMin, jMax |
415 |
DO i = iMin, iMax |
416 |
sIceLoad(i,j,bi,bj) = ( snowHeight(i,j,bi,bj)*rhos |
417 |
& + iceHeight(i,j,bi,bj)*rhoi |
418 |
& )*iceMask(i,j,bi,bj) |
419 |
#ifdef ALLOW_ATM2D |
420 |
pass_sIceLoad(i,j)=sIceLoad(i,j,bi,bj) |
421 |
#endif |
422 |
ENDDO |
423 |
ENDDO |
424 |
ENDIF |
425 |
|
426 |
#ifdef OLD_THSICE_CALL_SEQUENCE |
427 |
IF ( thSIceAdvScheme.GT.0 ) THEN |
428 |
C-- note: those fluxes should to be added directly to Qnet, EmPmR & saltFlux |
429 |
DO j = jMin, jMax |
430 |
DO i = iMin, iMax |
431 |
IF ( hOceMxL(i,j,bi,bj).GT.0. _d 0 ) THEN |
432 |
Qnet(i,j,bi,bj) = Qnet(i,j,bi,bj) - oceQnet(i,j,bi,bj) |
433 |
EmPmR(i,j,bi,bj)= EmPmR(i,j,bi,bj)- oceFWfx(i,j,bi,bj) |
434 |
saltFlux(i,j,bi,bj)=saltFlux(i,j,bi,bj) - oceSflx(i,j,bi,bj) |
435 |
ENDIF |
436 |
ENDDO |
437 |
ENDDO |
438 |
ENDIF |
439 |
#endif /* OLD_THSICE_CALL_SEQUENCE */ |
440 |
|
441 |
#ifdef ALLOW_BULK_FORCE |
442 |
IF ( useBulkForce ) THEN |
443 |
CALL BULKF_FLUX_ADJUST( |
444 |
I bi, bj, iMin, iMax, jMin, jMax, |
445 |
I isIceFree, myTime, myIter, myThid ) |
446 |
ENDIF |
447 |
#endif /* ALLOW_BULK_FORCE */ |
448 |
|
449 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
450 |
#endif /* ALLOW_THSICE */ |
451 |
|
452 |
RETURN |
453 |
END |