/[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.5 by heimbach, Wed Oct 3 02:37:16 2012 UTC revision 1.8 by dgoldberg, Sat Jun 8 22:15:33 2013 UTC
# Line 6  C $Name$ Line 6  C $Name$
6  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
7    
8  CBOP  CBOP
9        SUBROUTINE STREAMICE_ADV_FRONT ( myThid, time_step )        SUBROUTINE STREAMICE_ADV_FRONT (
10         & myThid,
11         & time_step,
12         & hflux_x_si,
13         & hflux_y_si )
14    
15  C     /============================================================\  C     /============================================================\
16  C     | SUBROUTINE                                                 |    C     | SUBROUTINE                                                 |  
# Line 29  C     === Global variables === Line 33  C     === Global variables ===
33    
34        INTEGER myThid        INTEGER myThid
35        _RL time_step        _RL time_step
36          _RL hflux_x_SI (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
37          _RL hflux_y_SI (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
38    
39  #ifdef ALLOW_STREAMICE  #ifdef ALLOW_STREAMICE
40    
# Line 40  C     === Global variables === Line 46  C     === Global variables ===
46        _RL n_flux_1, n_flux_2        _RL n_flux_1, n_flux_2
47        _RL href, rho, partial_vol, tot_flux, hpot        _RL href, rho, partial_vol, tot_flux, hpot
48        CHARACTER*(MAX_LEN_MBUF) msgBuf        CHARACTER*(MAX_LEN_MBUF) msgBuf
49          _RL hflux_x_SI2 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
50          _RL hflux_y_SI2 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
51    
52    
53        rho = streamice_density        rho = streamice_density
54  cph      iter_count = 0  cph      iter_count = 0
55        iter_flag = 1. _d 0        iter_flag = 1. _d 0
56        iter_rpt = 0        iter_rpt = 0
57    
58            DO bj=myByLo(myThid),myByHi(myThid)
59             DO bi=myBxLo(myThid),myBxHi(myThid)
60              DO j=1-OLy,sNy+OLy
61               DO i=1-OLx,sNx+OLx
62                hflux_x_SI2(i,j,bi,bj) = 0. _d 0
63                hflux_y_SI2(i,j,bi,bj) = 0. _d 0
64               ENDDO
65              ENDDO
66             ENDDO
67            ENDDO
68    
69    
70        DO iter_count = 0, 3        DO iter_count = 0, 3
71    
72  #ifdef ALLOW_AUTODIFF_TAMC  #ifdef ALLOW_AUTODIFF_TAMC
# Line 95  CADJ &     = comlev1_stream_front, key = Line 116  CADJ &     = comlev1_stream_front, key =
116    
117           DO j=1-1,sNy+1           DO j=1-1,sNy+1
118            Gj = (myYGlobalLo-1)+(bj-1)*sNy+j            Gj = (myYGlobalLo-1)+(bj-1)*sNy+j
119  cph          IF ((Gj .ge. 1) .and. (Gj .le. Ny)) THEN            IF ((Gj .ge. 1) .and. (Gj .le. Ny)) THEN
120             DO i=1-1,sNx+1             DO i=1-1,sNx+1
121              Gi = (myXGlobalLo-1)+(bi-1)*sNx+i              Gi = (myXGlobalLo-1)+(bi-1)*sNx+i
122    
# Line 107  cph          IF ((Gj .ge. 1) .and. (Gj . Line 128  cph          IF ((Gj .ge. 1) .and. (Gj .
128            act3 = myThid - 1            act3 = myThid - 1
129            max3 = nTx*nTy            max3 = nTx*nTy
130            act4 = ikey_front - 1            act4 = ikey_front - 1
131            ikey_1 = i + 2            ikey_1 = i + 1
132       &         + (sNx+2)*(j-1)       &         + (sNx+2)*(j)
133       &         + (sNx+2)*(sNy+2)*act1       &         + (sNx+2)*(sNy+2)*act1
134       &         + (sNx+2)*(sNy+2)*max1*act2       &         + (sNx+2)*(sNy+2)*max1*act2
135       &         + (sNx+2)*(sNy+2)*max1*max2*act3       &         + (sNx+2)*(sNy+2)*max1*max2*act3
# Line 125  CADJ STORE streamice_hmask(i,j,bi,bj) Line 146  CADJ STORE streamice_hmask(i,j,bi,bj)
146  CADJ &     = comlev1_stream_ij, key = ikey_1  CADJ &     = comlev1_stream_ij, key = ikey_1
147  #endif  #endif
148    
149  cph            IF ((Gi .ge. 1) .and. (Gi .le. Nx) .and.              IF ((Gi .ge. 1) .and. (Gi .le. Nx) .and.
150              IF ((STREAMICE_Hmask(i,j,bi,bj).eq.0.0 .or.       &          (STREAMICE_Hmask(i,j,bi,bj).eq.0.0 .or.
151       &           STREAMICE_Hmask(i,j,bi,bj).eq.2.0)) THEN       &           STREAMICE_Hmask(i,j,bi,bj).eq.2.0)) THEN
152               n_flux_1 = 0. _d 0               n_flux_1 = 0. _d 0
153               href = 0. _d 0               href = 0. _d 0
# Line 261  CADJ &     = comlev1_stream_ij, key = ik Line 282  CADJ &     = comlev1_stream_ij, key = ik
282    
283              ENDIF              ENDIF
284             ENDDO             ENDDO
285  cph          ENDIF            ENDIF
286           ENDDO           ENDDO
287  c  c
288          ENDDO          ENDDO

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.22