/[MITgcm]/MITgcm_contrib/dgoldberg/streamice/streamice_adv_front.F
ViewVC logotype

Diff of /MITgcm_contrib/dgoldberg/streamice/streamice_adv_front.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.3 by dgoldberg, Thu May 3 15:52:06 2012 UTC revision 1.7 by heimbach, Thu Oct 4 03:45:53 2012 UTC
# Line 39  C     === Global variables === Line 39  C     === Global variables ===
39        _RL iter_flag        _RL iter_flag
40        _RL n_flux_1, n_flux_2        _RL n_flux_1, n_flux_2
41        _RL href, rho, partial_vol, tot_flux, hpot        _RL href, rho, partial_vol, tot_flux, hpot
42          CHARACTER*(MAX_LEN_MBUF) msgBuf
43    
44        rho = streamice_density        rho = streamice_density
45  cph      iter_count = 0  cph      iter_count = 0
# Line 94  CADJ &     = comlev1_stream_front, key = Line 95  CADJ &     = comlev1_stream_front, key =
95    
96           DO j=1-1,sNy+1           DO j=1-1,sNy+1
97            Gj = (myYGlobalLo-1)+(bj-1)*sNy+j            Gj = (myYGlobalLo-1)+(bj-1)*sNy+j
98  cph          IF ((Gj .ge. 1) .and. (Gj .le. Ny)) THEN            IF ((Gj .ge. 1) .and. (Gj .le. Ny)) THEN
99             DO i=1-1,sNx+1             DO i=1-1,sNx+1
100              Gi = (myXGlobalLo-1)+(bi-1)*sNx+i              Gi = (myXGlobalLo-1)+(bi-1)*sNx+i
101    
# Line 106  cph          IF ((Gj .ge. 1) .and. (Gj . Line 107  cph          IF ((Gj .ge. 1) .and. (Gj .
107            act3 = myThid - 1            act3 = myThid - 1
108            max3 = nTx*nTy            max3 = nTx*nTy
109            act4 = ikey_front - 1            act4 = ikey_front - 1
110            ikey_1 = i            ikey_1 = i + 1
111       &         + sNx*(j-1)       &         + (sNx+2)*(j)
112       &         + sNx*sNy*act1       &         + (sNx+2)*(sNy+2)*act1
113       &         + sNx*sNy*max1*act2       &         + (sNx+2)*(sNy+2)*max1*act2
114       &         + sNx*sNy*max1*max2*act3       &         + (sNx+2)*(sNy+2)*max1*max2*act3
115       &         + sNx*sNy*max1*max2*max3*act4       &         + (sNx+2)*(sNy+2)*max1*max2*max3*act4
116  CADJ STORE area_shelf_streamice(i,j,bi,bj)  CADJ STORE area_shelf_streamice(i,j,bi,bj)
117  CADJ &     = comlev1_stream_ij, key = ikey_1  CADJ &     = comlev1_stream_ij, key = ikey_1
118  CADJ STORE h_streamice(i,j,bi,bj)  CADJ STORE h_streamice(i,j,bi,bj)
# Line 124  CADJ STORE streamice_hmask(i,j,bi,bj) Line 125  CADJ STORE streamice_hmask(i,j,bi,bj)
125  CADJ &     = comlev1_stream_ij, key = ikey_1  CADJ &     = comlev1_stream_ij, key = ikey_1
126  #endif  #endif
127    
128  cph            IF ((Gi .ge. 1) .and. (Gi .le. Nx) .and.              IF ((Gi .ge. 1) .and. (Gi .le. Nx) .and.
129              IF ((STREAMICE_Hmask(i,j,bi,bj).eq.0.0 .or.       &          (STREAMICE_Hmask(i,j,bi,bj).eq.0.0 .or.
130       &           STREAMICE_Hmask(i,j,bi,bj).eq.2.0)) THEN       &           STREAMICE_Hmask(i,j,bi,bj).eq.2.0)) THEN
131               n_flux_1 = 0. _d 0               n_flux_1 = 0. _d 0
132               href = 0. _d 0               href = 0. _d 0
# Line 193  CADJ &     = comlev1_stream_ij, key = ik Line 194  CADJ &     = comlev1_stream_ij, key = ik
194       &           rA(i,j,bi,bj)       &           rA(i,j,bi,bj)
195                ELSEIF (hpot .lt. href) THEN ! cell still unfilled                ELSEIF (hpot .lt. href) THEN ! cell still unfilled
196    
197  !                PRINT *, "PARTIAL CELL INCREASED", tot_flux, i,  
 !      &         area_shelf_streamice (i,j,bi,bj),  
 !      &         H_streamice (i,j,bi,bj)  
198    
199                 STREAMICE_hmask (i,j,bi,bj) = 2.0                 STREAMICE_hmask (i,j,bi,bj) = 2.0
200                 area_shelf_streamice (i,j,bi,bj) = partial_vol / href                 area_shelf_streamice (i,j,bi,bj) = partial_vol / href
201                 H_streamice (i,j,bi,bj) = href                 H_streamice (i,j,bi,bj) = href
202                ELSE ! cell is filled - do overflow                ELSE ! cell is filled - do overflow
203    
 !                PRINT *, "CELL FILLED"  
204    
205                 STREAMICE_hmask (i,j,bi,bj) = 1.0                 STREAMICE_hmask (i,j,bi,bj) = 1.0
206                 area_shelf_streamice(i,j,bi,bj) =                 area_shelf_streamice(i,j,bi,bj) =
# Line 263  CADJ &     = comlev1_stream_ij, key = ik Line 261  CADJ &     = comlev1_stream_ij, key = ik
261    
262              ENDIF              ENDIF
263             ENDDO             ENDDO
264  cph          ENDIF            ENDIF
265           ENDDO           ENDDO
266  c  c
267          ENDDO          ENDDO
# Line 273  c Line 271  c
271        ENDDO        ENDDO
272    
273        IF (iter_rpt.gt.1) THEN        IF (iter_rpt.gt.1) THEN
274         PRINT *, "FRONT ADVANCE: ", iter_rpt, " ITERATIONS"         WRITE(msgBuf,'(A,I5,A)') 'FRONT ADVANCE: ',iter_rpt,
275         &  ' ITERATIONS'
276           CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
277         &                     SQUEEZE_RIGHT , 1)      
278        ENDIF        ENDIF
279    
280    

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.22