7 !! Computation of the horizontal velocity vx, vy, the horizontal volume flux
8 !! qx, qy and the flux across the grounding line q_gl_g in the shallow shelf
13 !! Copyright 2009-2013 Ralf Greve, Tatsuru Sato
17 !! This file is part of SICOPOLIS.
19 !! SICOPOLIS is free software: you can redistribute it and/or modify
20 !! it under the terms of the GNU General Public License as published by
21 !! the Free Software Foundation, either version 3 of the License, or
22 !! (at your option) any later version.
24 !! SICOPOLIS is distributed in the hope that it will be useful,
25 !! but WITHOUT ANY WARRANTY; without even the implied warranty of
26 !! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 !! GNU General Public License for more details.
29 !! You should have received a copy of the GNU General Public License
30 !! along with SICOPOLIS. If not, see <http://www.gnu.org/licenses/>.
32 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
35 !> Computation of the horizontal velocity vx, vy, the horizontal volume flux
36 !! qx, qy and the flux across the grounding line q_gl_g in the shallow shelf
38 !<------------------------------------------------------------------------------
46 integer(i4b),
intent(in) :: ii((imax+1)*(jmax+1)), jj((imax+1)*(jmax+1))
47 integer(i4b),
intent(in) :: nn(0:jmax,0:imax)
48 real(dp),
intent(in) :: z_sl, dxi, deta, dzeta_c
50 integer(i4b) :: i, j, kc, kt, m
51 real(dp),
dimension(0:JMAX,0:IMAX) :: vx_m_prev, vy_m_prev
52 real(dp) :: dxi_inv, deta_inv
54 real(dp) :: qx_gl_g, qy_gl_g
56 integer(i4b),
parameter :: iter_ssa = 2
57 real(dp),
parameter :: rel = 0.7_dp
61 flag_grounding_line = .false.
62 flag_calving_front = .false.
67 if ( (maske(j,i)==0_i2b) &
69 ( (maske(j,i+1)==3_i2b) &
70 .or.(maske(j,i-1)==3_i2b) &
71 .or.(maske(j+1,i)==3_i2b) &
72 .or.(maske(j-1,i)==3_i2b) ) &
74 flag_grounding_line(j,i) = .true.
76 if ( (maske(j,i)==3_i2b) &
78 ( (maske(j,i+1)==2_i2b) &
79 .or.(maske(j,i-1)==2_i2b) &
80 .or.(maske(j+1,i)==2_i2b) &
81 .or.(maske(j-1,i)==2_i2b) ) &
83 flag_calving_front(j,i) = .true.
96 vis_int_g(j,i) = 1.0e+15_dp*(h_c(j,i)+h_t(j,i))
126 vx_m(j,i) = rel*vx_m(j,i) + (1.0_dp-rel)*vx_m_prev(j,i)
127 vy_m(j,i) = rel*vy_m(j,i) + (1.0_dp-rel)*vy_m_prev(j,i)
136 vh_max = vh_max/year_sec
140 vx_m(j,i) = max(vx_m(j,i), -vh_max)
141 vx_m(j,i) = min(vx_m(j,i), vh_max)
142 vy_m(j,i) = max(vy_m(j,i), -vh_max)
143 vy_m(j,i) = min(vy_m(j,i), vh_max)
154 if ( (maske(j,i)==3_i2b).or.(maske(j,i+1)==3_i2b) )
then
157 vx_t(kt,j,i) = vx_m(j,i)
161 vx_c(kc,j,i) = vx_m(j,i)
164 vx_b(j,i) = vx_m(j,i)
166 qx(j,i) = vx_m(j,i) * 0.5_dp*(h_c(j,i)+h_t(j,i)+h_c(j,i+1)+h_t(j,i+1))
178 if ( (maske(j,i)==3_i2b).or.(maske(j+1,i)==3_i2b) )
then
181 vy_t(kt,j,i) = vy_m(j,i)
185 vy_c(kc,j,i) = vy_m(j,i)
188 vy_b(j,i) = vy_m(j,i)
190 qy(j,i) = vy_m(j,i) * 0.5_dp*(h_c(j,i)+h_t(j,i)+h_c(j+1,i)+h_t(j+1,i))
203 if (maske(j,i)==3_i2b)
then
205 vx_s_g(j,i) = 0.5_dp*(vx_m(j,i-1)+vx_m(j,i))
206 vx_b_g(j,i) = vx_s_g(j,i)
208 vy_s_g(j,i) = 0.5_dp*(vy_m(j-1,i)+vy_m(j,i))
209 vy_b_g(j,i) = vy_s_g(j,i)
221 if ( flag_grounding_line(j,i) )
then
223 qx_gl_g = 0.5_dp*(qx(j,i)+qx(j,i-1))
224 qy_gl_g = 0.5_dp*(qy(j,i)+qy(j-1,i))
226 q_gl_g(j,i) = sqrt(qx_gl_g*qx_gl_g+qy_gl_g*qy_gl_g)