120 |
|
|
121 |
dt = thSIce_deltaT |
dt = thSIce_deltaT |
122 |
dBug = .FALSE. |
dBug = .FALSE. |
123 |
c dBug = ( bi.EQ.3 .AND. i.EQ.13 .AND. j.EQ.13 ) |
c dBug = ( bi.EQ.3 .AND. i.EQ.15 .AND. j.EQ.11 ) |
124 |
c dBug = ( bi.EQ.6 .AND. i.EQ.18 .AND. j.EQ.10 ) |
c dBug = ( bi.EQ.6 .AND. i.EQ.18 .AND. j.EQ.10 ) |
125 |
IF ( dBug ) WRITE(6,'(A,2I4,2I2)') 'ThSI_THERM: i,j=',i,j,bi,bj |
IF ( dBug ) WRITE(6,'(A,2I4,2I2)') 'ThSI_SOLVE4T: i,j=',i,j,bi,bj |
126 |
|
|
127 |
if ( hi.lt.himin ) then |
if ( hi.lt.himin ) then |
128 |
C If hi < himin, melt the ice. |
C If hi < himin, melt the ice. |
129 |
STOP 'THSICE_THERM: should not enter if hi<himin' |
STOP 'THSICE_SOLVE4TEMP: should not enter if hi<himin' |
130 |
endif |
endif |
131 |
|
|
132 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
158 |
write (6,*) 'BBerr Tice(1) > 0 = ',Tice(1) |
write (6,*) 'BBerr Tice(1) > 0 = ',Tice(1) |
159 |
write (6,*) 'BBerr Tice(2) > 0 = ',Tice(2) |
write (6,*) 'BBerr Tice(2) > 0 = ',Tice(2) |
160 |
endif |
endif |
161 |
IF ( dBug ) WRITE(6,1010) 'ThSI_THERM: k,Tice=',0,Tsf,Tice |
IF ( dBug ) WRITE(6,1010) 'ThSI_SOLVE4T: k,Tice=',0,Tsf,Tice |
162 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
163 |
|
|
164 |
C Compute coefficients used in quadratic formula. |
C Compute coefficients used in quadratic formula. |
209 |
dTsf = (flx0 + k12*(Tice(1)-Tsf)) / (k12-df0dT) |
dTsf = (flx0 + k12*(Tice(1)-Tsf)) / (k12-df0dT) |
210 |
Tsf = Tsf + dTsf |
Tsf = Tsf + dTsf |
211 |
if (Tsf .gt. 0. _d 0) then |
if (Tsf .gt. 0. _d 0) then |
212 |
IF(dBug) WRITE(6,1010) 'ThSI_THERM: k,tice=', |
IF(dBug) WRITE(6,1010) 'ThSI_SOLVE4T: k,tice=', |
213 |
& k,Tsf,Tice(1),dTsf |
& k,Tsf,Tice(1),dTsf |
214 |
a1 = a10 + k12 |
a1 = a10 + k12 |
215 |
b1 = b10 ! note b1 = b10 - k12*Tf0 |
b1 = b10 ! note b1 = b10 - k12*Tf0 |
242 |
C if Tsfc has not converged.) |
C if Tsfc has not converged.) |
243 |
C If no convergence, then repeat. |
C If no convergence, then repeat. |
244 |
|
|
245 |
IF ( dBug ) WRITE(6,1010) 'ThSI_THERM: k,tice=', |
IF ( dBug ) WRITE(6,1010) 'ThSI_SOLVE4T: k,tice=', |
246 |
& k,Tsf,Tice(1),dTsf |
& k,Tsf,Tice(1),dTsf |
247 |
IF ( useBlkFlx ) THEN |
IF ( useBlkFlx ) THEN |
248 |
if (abs(dTsf).lt.Terrmax) then |
if (abs(dTsf).lt.Terrmax) then |
271 |
Tice(2) = (2. _d 0*dt*k32*(Tice(1)+2. _d 0*Tf) |
Tice(2) = (2. _d 0*dt*k32*(Tice(1)+2. _d 0*Tf) |
272 |
& + rhoi*cpice *hi*Tice(2)) |
& + rhoi*cpice *hi*Tice(2)) |
273 |
& /(6. _d 0*dt*k32 + rhoi*cpice *hi) |
& /(6. _d 0*dt*k32 + rhoi*cpice *hi) |
274 |
IF ( dBug ) WRITE(6,1010) 'ThSI_THERM: k,Tice=',k,Tsf,Tice |
IF ( dBug ) WRITE(6,1010) 'ThSI_SOLVE4T: k,Tice=',k,Tsf,Tice |
275 |
|
|
276 |
|
|
277 |
C Compute final flux values at surfaces. |
C Compute final flux values at surfaces. |
296 |
C- SW flux at sea-ice base left to the ocean |
C- SW flux at sea-ice base left to the ocean |
297 |
flxSW = fswocn |
flxSW = fswocn |
298 |
|
|
299 |
IF (dBug) WRITE(6,1020) 'ThSI_THERM: flx0,fct,Dif,flxCnB=', |
IF (dBug) WRITE(6,1020) 'ThSI_SOLVE4T: flx0,fct,Dif,flxCnB=', |
300 |
& flx0,fct,flx0-fct,flxCnB |
& flx0,fct,flx0-fct,flxCnB |
301 |
|
|
302 |
C Compute new enthalpy for each layer. |
C Compute new enthalpy for each layer. |