146 |
CADJ & = comlev1_stream_ij, key = ikey_1 |
CADJ & = comlev1_stream_ij, key = ikey_1 |
147 |
#endif |
#endif |
148 |
|
|
149 |
|
IF (.not. STREAMICE_calve_to_mask .OR. |
150 |
|
& STREAMICE_calve_mask (i,j,bi,bj) .eq. 1.0) THEN |
151 |
|
|
152 |
IF ((Gi .ge. 1) .and. (Gi .le. Nx) .and. |
IF ((Gi .ge. 1) .and. (Gi .le. Nx) .and. |
153 |
& (STREAMICE_Hmask(i,j,bi,bj).eq.0.0 .or. |
& (STREAMICE_Hmask(i,j,bi,bj).eq.0.0 .or. |
154 |
& STREAMICE_Hmask(i,j,bi,bj).eq.2.0)) THEN |
& STREAMICE_Hmask(i,j,bi,bj).eq.2.0)) THEN |
225 |
H_streamice (i,j,bi,bj) = href |
H_streamice (i,j,bi,bj) = href |
226 |
ELSE ! cell is filled - do overflow |
ELSE ! cell is filled - do overflow |
227 |
|
|
228 |
|
|
229 |
|
|
230 |
STREAMICE_hmask (i,j,bi,bj) = 1.0 |
STREAMICE_hmask (i,j,bi,bj) = 1.0 |
231 |
area_shelf_streamice(i,j,bi,bj) = |
area_shelf_streamice(i,j,bi,bj) = |
232 |
& rA(i,j,bi,bj) |
& rA(i,j,bi,bj) |
233 |
|
|
234 |
|
PRINT *, "GOT HERE OVERFLOW ", i,j, |
235 |
|
& area_shelf_streamice(i,j,bi,bj) |
236 |
partial_vol = partial_vol - href * rA(i,j,bi,bj) |
partial_vol = partial_vol - href * rA(i,j,bi,bj) |
237 |
|
|
238 |
iter_flag = 1. _d 0 |
iter_flag = 1. _d 0 |
243 |
ENDDO |
ENDDO |
244 |
|
|
245 |
DO k=1,2 |
DO k=1,2 |
246 |
IF (STREAMICE_ufacemask(i-1+k,j,bi,bj).eq.2.0) THEN ! at a permanent calving boundary - no advance allowed |
IF ( (STREAMICE_ufacemask(i-1+k,j,bi,bj).eq.2.0) .or. |
247 |
|
& (STREAMICE_calve_to_mask .and. |
248 |
|
& STREAMICE_calve_mask(i+2*k-3,j,bi,bj).ne.1.0) |
249 |
|
& ) THEN ! at a permanent calving boundary - no advance allowed |
250 |
n_flux_2 = n_flux_2 + 1. _d 0 |
n_flux_2 = n_flux_2 + 1. _d 0 |
251 |
ELSEIF (STREAMICE_hmask(i+2*k-3,j,bi,bj).eq.0 _d 0) THEN ! adjacent cell is completely ice free |
ELSEIF (STREAMICE_hmask(i+2*k-3,j,bi,bj).eq.0 _d 0) THEN ! adjacent cell is completely ice free |
252 |
n_flux_2 = n_flux_2 + 1. _d 0 |
n_flux_2 = n_flux_2 + 1. _d 0 |
254 |
ENDIF |
ENDIF |
255 |
ENDDO |
ENDDO |
256 |
DO k=1,2 |
DO k=1,2 |
257 |
IF (STREAMICE_vfacemask (i,j-1+k,bi,bj).eq.2.0) THEN |
IF ( (STREAMICE_vfacemask (i,j-1+k,bi,bj).eq.2.0) .or. |
258 |
|
& (STREAMICE_calve_to_mask .and. |
259 |
|
& STREAMICE_calve_mask(i,j+2*k-3,bi,bj).ne.1.0) |
260 |
|
& ) THEN ! at a permanent calving boundary - no advance allowed |
261 |
n_flux_2 = n_flux_2 + 1. _d 0 |
n_flux_2 = n_flux_2 + 1. _d 0 |
262 |
ELSEIF (STREAMICE_hmask(i,j+2*k-3,bi,bj).eq.0 _d 0) THEN |
ELSEIF (STREAMICE_hmask(i,j+2*k-3,bi,bj).eq.0 _d 0) THEN |
263 |
n_flux_2 = n_flux_2 + 1. _d 0 |
n_flux_2 = n_flux_2 + 1. _d 0 |
292 |
ENDIF |
ENDIF |
293 |
|
|
294 |
ENDIF |
ENDIF |
295 |
|
ENDIF |
296 |
ENDDO |
ENDDO |
297 |
ENDIF |
ENDIF |
298 |
ENDDO |
ENDDO |