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

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

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

revision 1.9 by dgoldberg, Tue Jun 11 17:42:17 2013 UTC revision 1.10 by dgoldberg, Wed Jun 12 20:48:08 2013 UTC
# Line 33  C     === Global variables === Line 33  C     === Global variables ===
33    
34  #ifdef ALLOW_STREAMICE  #ifdef ALLOW_STREAMICE
35    
36        INTEGER i, j, bi, bj        INTEGER i, j, bi, bj, Gi, Gj
37        _RL thick_bd, uflux, vflux, max_icfl, loc_icfl        _RL thick_bd, uflux, vflux, max_icfl, loc_icfl
38        _RL time_step_full, time_step_rem        _RL time_step_full, time_step_rem
39        _RL sec_per_year, time_step_loc, MR, SMB, TMB        _RL sec_per_year, time_step_loc, MR, SMB, TMB
# Line 63  CADJ STORE streamice_hmask  = comlev1, k Line 63  CADJ STORE streamice_hmask  = comlev1, k
63    
64        DO bj=myByLo(myThid),myByHi(myThid)        DO bj=myByLo(myThid),myByHi(myThid)
65         DO bi=myBxLo(myThid),myBxHi(myThid)         DO bi=myBxLo(myThid),myBxHi(myThid)
66          DO j=1-3,sNy+3          DO j=1,sNy+1
67           DO i=1-3,sNx+3           DO i=1,sNx+1
68    
69            H_streamice_prev(i,j,bi,bj) =            H_streamice_prev(i,j,bi,bj) =
70       &     H_streamice(i,j,bi,bj)       &     H_streamice(i,j,bi,bj)
# Line 157  CADJ STORE streamice_hmask  = comlev1, k Line 157  CADJ STORE streamice_hmask  = comlev1, k
157        CALL GLOBAL_MAX_R8 (max_icfl, myThid)        CALL GLOBAL_MAX_R8 (max_icfl, myThid)
158    
159  #endif  #endif
160          
161    
162  #ifdef ALLOW_AUTODIFF_TAMC  #ifdef ALLOW_AUTODIFF_TAMC
163  CADJ STORE streamice_hmask  = comlev1, key=ikey_dynamics  CADJ STORE streamice_hmask  = comlev1, key=ikey_dynamics
# Line 187  CADJ STORE H_streamice  = comlev1, key=i Line 187  CADJ STORE H_streamice  = comlev1, key=i
187        DO bj=myByLo(myThid),myByHi(myThid)        DO bj=myByLo(myThid),myByHi(myThid)
188         DO bi=myBxLo(myThid),myBxHi(myThid)         DO bi=myBxLo(myThid),myBxHi(myThid)
189          DO j=1-3,sNy+3          DO j=1-3,sNy+3
190           DO i=1-1,sNx+1           DO i=1,sNx
191              Gi = (myXGlobalLo-1)+(bi-1)*sNx+i
192              Gj = (myYGlobalLo-1)+(bj-1)*sNy+j
193              IF (((Gj .ge. 1) .and. (Gj .le. Ny))
194         &       .or.STREAMICE_NS_PERIODIC) THEN
195    
196            IF (STREAMICE_hmask(i,j,bi,bj).eq.1.0) THEN            IF (STREAMICE_hmask(i,j,bi,bj).eq.1.0) THEN
197             h_after_uflux_SI (i,j,bi,bj) = H_streamice(i,j,bi,bj) -             h_after_uflux_SI (i,j,bi,bj) = H_streamice(i,j,bi,bj) -
198       &      (hflux_x_SI(i+1,j,bi,bj)*dyG(i+1,j,bi,bj) -       &      (hflux_x_SI(i+1,j,bi,bj)*dyG(i+1,j,bi,bj) -
# Line 198  CADJ STORE H_streamice  = comlev1, key=i Line 203  CADJ STORE H_streamice  = comlev1, key=i
203       &        hflux_x_SI(i,j,bi,bj)       &        hflux_x_SI(i,j,bi,bj)
204             ENDIF             ENDIF
205            ENDIF            ENDIF
206    
207              ENDIF
208           ENDDO           ENDDO
209          ENDDO          ENDDO
210         ENDDO         ENDDO
211        ENDDO        ENDDO
212    
213    
   
214  #ifdef ALLOW_AUTODIFF_TAMC  #ifdef ALLOW_AUTODIFF_TAMC
215  CADJ STORE streamice_hmask  = comlev1, key=ikey_dynamics  CADJ STORE streamice_hmask  = comlev1, key=ikey_dynamics
216  #endif  #endif
# Line 225  CADJ STORE streamice_hmask  = comlev1, k Line 231  CADJ STORE streamice_hmask  = comlev1, k
231    
232        DO bj=myByLo(myThid),myByHi(myThid)        DO bj=myByLo(myThid),myByHi(myThid)
233         DO bi=myBxLo(myThid),myBxHi(myThid)         DO bi=myBxLo(myThid),myBxHi(myThid)
234          DO j=1-1,sNy+1          DO j=1,sNy
235           DO i=1-1,sNx+1           DO i=1,sNx
236              Gi = (myXGlobalLo-1)+(bi-1)*sNx+i
237              Gj = (myYGlobalLo-1)+(bj-1)*sNy+j
238              IF (((Gj .ge. 1) .and. (Gj .le. Ny))
239         &       .or.STREAMICE_EW_PERIODIC) THEN
240    
241            IF (STREAMICE_hmask(i,j,bi,bj).eq.1.0) THEN            IF (STREAMICE_hmask(i,j,bi,bj).eq.1.0) THEN
242             h_after_vflux_SI (i,j,bi,bj) = h_after_uflux_SI(i,j,bi,bj) -             h_after_vflux_SI (i,j,bi,bj) = h_after_uflux_SI(i,j,bi,bj) -
243       &      (hflux_y_SI(i,j+1,bi,bj)*dxG(i,j+1,bi,bj) -       &      (hflux_y_SI(i,j+1,bi,bj)*dxG(i,j+1,bi,bj) -
# Line 238  CADJ STORE streamice_hmask  = comlev1, k Line 249  CADJ STORE streamice_hmask  = comlev1, k
249             ENDIF             ENDIF
250    
251            ENDIF            ENDIF
252             ENDIF
253    
254           ENDDO           ENDDO
255          ENDDO          ENDDO
256         ENDDO         ENDDO
# Line 256  CADJ STORE streamice_hmask  = comlev1, k Line 269  CADJ STORE streamice_hmask  = comlev1, k
269         ENDDO         ENDDO
270        ENDDO        ENDDO
271    
272    ! NOTE: AT THIS POINT H IS NOT VALID ON OVERLAP!!!
273    
274  !      CALL STREAMICE_ADV_FRONT (  !      CALL STREAMICE_ADV_FRONT (
275  !     &  myThid, time_step_loc,  !     &  myThid, time_step_loc,
276  !     &  hflux_x_SI, hflux_y_SI )  !     &  hflux_x_SI, hflux_y_SI )
# Line 308  CADJ STORE streamice_hmask  = comlev1, k Line 323  CADJ STORE streamice_hmask  = comlev1, k
323        ENDDO            ENDDO    
324    
325        _EXCH_XY_RL (H_streamice,myThid)        _EXCH_XY_RL (H_streamice,myThid)
326    
327                
328        WRITE(msgBuf,'(A)') 'END STREAMICE_ADVECT_THICKNESS'        WRITE(msgBuf,'(A)') 'END STREAMICE_ADVECT_THICKNESS'
329         CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,         CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

  ViewVC Help
Powered by ViewVC 1.1.22