39 |
! there are valid cells to calculate a |
! there are valid cells to calculate a |
40 |
! slope-limited 2nd order flux |
! slope-limited 2nd order flux |
41 |
_RL SLOPE_LIMITER |
_RL SLOPE_LIMITER |
42 |
_RL total_vol_out |
! _RL total_vol_out |
43 |
external SLOPE_LIMITER |
external SLOPE_LIMITER |
44 |
|
|
45 |
total_vol_out = 0.0 |
! total_vol_out = 0.0 |
46 |
|
|
47 |
DO bj=myByLo(myThid),myByHi(myThid) |
DO bj=myByLo(myThid),myByHi(myThid) |
48 |
DO bi=myBxLo(myThid),myBxHi(myThid) |
DO bi=myBxLo(myThid),myBxHi(myThid) |
85 |
& (STREAMICE_hmask(i-2,j,bi,bj).eq.1.0)) |
& (STREAMICE_hmask(i-2,j,bi,bj).eq.1.0)) |
86 |
& H0_valid(i,j,bi,bj)=.true. |
& H0_valid(i,j,bi,bj)=.true. |
87 |
|
|
88 |
IF ((Gi.eq.1).and.(STREAMICE_hmask(i-1,j,bi,bj).eq.3.0)) |
IF ((STREAMICE_hmask(i-1,j,bi,bj).eq.3.0)) |
89 |
& THEN ! we are at western bdry and there is a thick. bdry cond |
& THEN ! we are at western bdry and there is a thick. bdry cond |
90 |
hflux_x (i,j,bi,bj) = h(i-1,j,bi,bj) * uface |
hflux_x (i,j,bi,bj) = h(i-1,j,bi,bj) * uface |
91 |
|
! PRINT *, "BOUNDARY FLUX RIGHT", hflux_x (i,j,bi,bj), |
92 |
|
! & h(i-1,j,bi,bj),uface,i,j |
93 |
ELSEIF (H0_valid(i,j,bi,bj)) THEN |
ELSEIF (H0_valid(i,j,bi,bj)) THEN |
94 |
phi = SLOPE_LIMITER ( |
phi = SLOPE_LIMITER ( |
95 |
& stencil(0)-stencil(-1), |
& stencil(0)-stencil(-1), |
109 |
& (STREAMICE_hmask(i+1,j,bi,bj).eq.1.0)) |
& (STREAMICE_hmask(i+1,j,bi,bj).eq.1.0)) |
110 |
& H0_valid(i,j,bi,bj)=.true. |
& H0_valid(i,j,bi,bj)=.true. |
111 |
|
|
112 |
IF ((Gi.eq.Nx).and.(STREAMICE_hmask(i+1,j,bi,bj).eq.3.0)) |
IF ((STREAMICE_hmask(i,j,bi,bj).eq.3.0)) |
113 |
& THEN ! we are at western bdry and there is a thick. bdry cond |
& THEN ! we are at western bdry and there is a thick. bdry cond |
114 |
hflux_x (i,j,bi,bj) = h(i+1,j,bi,bj) * uface |
hflux_x (i,j,bi,bj) = h(i,j,bi,bj) * uface |
115 |
|
! PRINT *, "BOUNDARY FLUX LEFT", hflux_x(i,j,bi,bj), |
116 |
|
! & h(i,j,bi,bj),uface |
117 |
ELSEIF (H0_valid(i,j,bi,bj)) THEN |
ELSEIF (H0_valid(i,j,bi,bj)) THEN |
118 |
phi = SLOPE_LIMITER ( |
phi = SLOPE_LIMITER ( |
119 |
& stencil(0)-stencil(-1), |
& stencil(0)-stencil(-1), |
128 |
|
|
129 |
ENDIF |
ENDIF |
130 |
|
|
131 |
if (streamice_ufacemask(i,j,bi,bj).eq.2.0) THEN |
! if (streamice_ufacemask(i,j,bi,bj).eq.2.0) THEN |
132 |
total_vol_out = total_vol_out + |
! total_vol_out = total_vol_out + |
133 |
& hflux_x (i,j,bi,bj) * time_step |
! & hflux_x (i,j,bi,bj) * time_step |
134 |
ENDIF |
! ENDIF |
135 |
|
|
136 |
ENDIF |
ENDIF |
137 |
ENDDO |
ENDDO |
160 |
ENDDO |
ENDDO |
161 |
ENDDO |
ENDDO |
162 |
|
|
163 |
! PRINT *, "TOTAL VOLUME OUT: ", total_vol_out |
|
164 |
|
|
165 |
#endif |
#endif |
166 |
RETURN |
RETURN |