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

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

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

revision 1.2 by dgoldberg, Tue Sep 18 17:06:48 2012 UTC revision 1.3 by dgoldberg, Thu Sep 27 20:29:00 2012 UTC
# Line 74  C     LOCAL VARIABLES Line 74  C     LOCAL VARIABLES
74            Gj = (myYGlobalLo-1)+(bj-1)*sNy+j            Gj = (myYGlobalLo-1)+(bj-1)*sNy+j
75    
76            IF (STREAMICE_hmask(i,j,bi,bj).eq.1.0) THEN            IF (STREAMICE_hmask(i,j,bi,bj).eq.1.0) THEN
77    
78               ! we are in an "active" cell
79    
80             IF (Gi.eq.1.AND..NOT.STREAMICE_EW_periodic) THEN             IF (Gi.eq.1.AND..NOT.STREAMICE_EW_periodic) THEN
81    
82                ! western boundary - only one sided possible
83    
84              IF (STREAMICE_hmask(i+1,j,bi,bj).eq.1.0) THEN              IF (STREAMICE_hmask(i+1,j,bi,bj).eq.1.0) THEN
85    
86                 ! cell to east is active
87    
88               sx = (surf_el_streamice(i+1,j,bi,bj)-               sx = (surf_el_streamice(i+1,j,bi,bj)-
89       &             surf_el_streamice(i,j,bi,bj))/dxC(i+1,j,bi,bj)       &             surf_el_streamice(i,j,bi,bj))/dxC(i+1,j,bi,bj)
90              ELSE              ELSE
91    
92                 ! cell to east is empty
93    
94               sx = 0. _d 0               sx = 0. _d 0
95              ENDIF              ENDIF
96    
97             ELSEIF (Gi.eq.Nx.AND..NOT.STREAMICE_EW_periodic) THEN             ELSEIF (Gi.eq.Nx.AND..NOT.STREAMICE_EW_periodic) THEN
98    
99                ! eastern boundary - only one sided possible
100    
101              IF (STREAMICE_hmask(i-1,j,bi,bj).eq.1.0) THEN              IF (STREAMICE_hmask(i-1,j,bi,bj).eq.1.0) THEN
102    
103                 ! cell to west is active
104    
105               sx = (surf_el_streamice(i,j,bi,bj)-               sx = (surf_el_streamice(i,j,bi,bj)-
106       &             surf_el_streamice(i-1,j,bi,bj))/dxC(i,j,bi,bj)       &             surf_el_streamice(i-1,j,bi,bj))/dxC(i,j,bi,bj)
107              ELSE              ELSE
108    
109                 ! cell to west is inactive
110    
111               sx = 0. _d 0               sx = 0. _d 0
112              ENDIF              ENDIF
113    
114             ELSE             ELSE
115    
116                ! interior (west-east) cell
117    
118              IF (STREAMICE_hmask(i+1,j,bi,bj).eq.1.0) THEN              IF (STREAMICE_hmask(i+1,j,bi,bj).eq.1.0) THEN
119    
120                 ! cell to east is active
121    
122               diffx = diffx + dxC(i+1,j,bi,bj)               diffx = diffx + dxC(i+1,j,bi,bj)
123               sx = surf_el_streamice(i+1,j,bi,bj)               sx = surf_el_streamice(i+1,j,bi,bj)
124              ELSE              ELSE
125               sx = surf_el_streamice(i,j,bi,bj)               sx = surf_el_streamice(i,j,bi,bj)
126              ENDIF              ENDIF
127              IF (STREAMICE_hmask(i-1,j,bi,bj).eq.1.0) THEN              IF (STREAMICE_hmask(i-1,j,bi,bj).eq.1.0) THEN
128    
129                 ! cell to west is active
130    
131               diffx = diffx + dxC(i,j,bi,bj)               diffx = diffx + dxC(i,j,bi,bj)
132               sx = sx - surf_el_streamice(i-1,j,bi,bj)               sx = sx - surf_el_streamice(i-1,j,bi,bj)
133              ELSE              ELSE
# Line 106  C     LOCAL VARIABLES Line 138  C     LOCAL VARIABLES
138              ELSE              ELSE
139               sx = 0. _d 0               sx = 0. _d 0
140              ENDIF              ENDIF
141    
142             ENDIF             ENDIF
143    
144                        
# Line 164  C     LOCAL VARIABLES Line 197  C     LOCAL VARIABLES
197             ENDDO             ENDDO
198    
199             IF (float_frac_streamice(i,j,bi,bj) .eq. 1.0) then             IF (float_frac_streamice(i,j,bi,bj) .eq. 1.0) then
200    #ifdef USE_ALT_RLOW
201                neu_val = .5 * gravity *
202         &       (streamice_density * H_streamice (i,j,bi,bj) ** 2 -
203         &        streamice_density_ocean_avg * R_low_si(i,j,bi,bj) ** 2)
204    #else
205              neu_val = .5 * gravity *              neu_val = .5 * gravity *
206       &       (streamice_density * H_streamice (i,j,bi,bj) ** 2 -       &       (streamice_density * H_streamice (i,j,bi,bj) ** 2 -
207       &        streamice_density_ocean_avg * R_low(i,j,bi,bj) ** 2)       &        streamice_density_ocean_avg * R_low(i,j,bi,bj) ** 2
208    #endif
209             ELSE             ELSE
210              neu_val = .5 * gravity *              neu_val = .5 * gravity *
211       &       (1-streamice_density/streamice_density_ocean_avg) *       &       (1-streamice_density/streamice_density_ocean_avg) *

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

  ViewVC Help
Powered by ViewVC 1.1.22