7 !! Computation of the basal horizontal velocity vx_b, vy_b in the shallow ice
12 !! Copyright 2009-2013 Ralf Greve
16 !! This file is part of SICOPOLIS.
18 !! SICOPOLIS is free software: you can redistribute it and/or modify
19 !! it under the terms of the GNU General Public License as published by
20 !! the Free Software Foundation, either version 3 of the License, or
21 !! (at your option) any later version.
23 !! SICOPOLIS is distributed in the hope that it will be useful,
24 !! but WITHOUT ANY WARRANTY; without even the implied warranty of
25 !! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 !! GNU General Public License for more details.
28 !! You should have received a copy of the GNU General Public License
29 !! along with SICOPOLIS. If not, see <http://www.gnu.org/licenses/>.
31 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
34 !> Computation of the basal horizontal velocity vx_b, vy_b in the shallow ice
36 !<------------------------------------------------------------------------------
44 real(dp),
intent(in) :: time, z_sl
47 integer(i4b) :: r_smw_1, s_smw_1, r_smw_2, s_smw_2
48 integer(i4b),
dimension(0:JMAX,0:IMAX) :: p_weert, q_weert
49 real(dp),
dimension(0:JMAX,0:IMAX) :: c_slide, gamma_slide_inv
50 real(dp) :: gamma_slide_inv_1, gamma_slide_inv_2
51 real(dp) :: smw_coeff_1, smw_coeff_2
52 real(dp),
dimension(0:JMAX,0:IMAX) :: p_b, p_b_red, tau_b
53 real(dp) :: cvxy1, cvxy1a
56 real(dp) :: year_sec_inv
57 logical,
dimension(0:JMAX,0:IMAX) :: sub_melt_flag
61 year_sec_inv = 1.0_dp/year_sec
63 #if ( defined(ANT) && ( !defined(SEDI_SLIDE) || SEDI_SLIDE==1 ) )
67 gamma_slide_inv_1 = 1.0_dp/max(gamma_slide, eps)
71 c_slide(j,i) = c_slide*year_sec_inv
72 p_weert(j,i) = p_weert
73 q_weert(j,i) = q_weert
74 gamma_slide_inv(j,i) = gamma_slide_inv_1
75 sub_melt_flag(j,i) = (gamma_slide >= eps)
79 #elif ( defined(ANT) && SEDI_SLIDE==2 )
83 gamma_slide_inv_1 = 1.0_dp/max(gamma_slide, eps)
84 gamma_slide_inv_2 = 1.0_dp/max(gamma_slide_sedi, eps)
89 if (maske_sedi(j,i) /= 7)
then
90 c_slide(j,i) = c_slide*year_sec_inv
91 p_weert(j,i) = p_weert
92 q_weert(j,i) = q_weert
93 gamma_slide_inv(j,i) = gamma_slide_inv_1
94 sub_melt_flag(j,i) = (gamma_slide >= eps)
96 c_slide(j,i) = c_slide_sedi*year_sec_inv
97 p_weert(j,i) = p_weert_sedi
98 q_weert(j,i) = q_weert_sedi
99 gamma_slide_inv(j,i) = gamma_slide_inv_2
100 sub_melt_flag(j,i) = (gamma_slide_sedi >= eps)
106 #elif ( defined(GRL) && ICE_STREAM==1 \
107 || defined(asf) && ice_stream==1 )
112 gamma_slide_inv_1 = 1.0_dp/max(gamma_slide, eps)
116 smw_coeff_1 = smw_coeff*year_sec**s_smw_1
120 c_slide(j,i) = c_slide*year_sec_inv &
121 *(1.0_dp+smw_coeff_1*runoff(j,i)**s_smw_1 &
122 /max((h_c(j,i)+h_t(j,i))**r_smw_1, eps))
123 p_weert(j,i) = p_weert
124 q_weert(j,i) = q_weert
125 gamma_slide_inv(j,i) = gamma_slide_inv_1
126 sub_melt_flag(j,i) = (gamma_slide >= eps)
130 #elif ( defined(GRL) && ICE_STREAM==2 \
131 || defined(asf) && ice_stream==2 )
135 gamma_slide_inv_1 = 1.0_dp/max(gamma_slide, eps)
136 gamma_slide_inv_2 = 1.0_dp/max(gamma_slide_sedi, eps)
140 smw_coeff_1 = smw_coeff *year_sec**s_smw_1
143 smw_coeff_2 = smw_coeff_sedi*year_sec**s_smw_2
148 if (maske_sedi(j,i) /= 7)
then
149 c_slide(j,i) = c_slide*year_sec_inv &
150 *(1.0_dp+smw_coeff_1*runoff(j,i)**s_smw_1 &
151 /max((h_c(j,i)+h_t(j,i))**r_smw_1, eps))
152 p_weert(j,i) = p_weert
153 q_weert(j,i) = q_weert
154 gamma_slide_inv(j,i) = gamma_slide_inv_1
155 sub_melt_flag(j,i) = (gamma_slide >= eps)
157 c_slide(j,i) = c_slide_sedi*year_sec_inv &
158 *(1.0_dp+smw_coeff_2*runoff(j,i)**s_smw_2 &
159 /max((h_c(j,i)+h_t(j,i))**r_smw_2, eps))
160 p_weert(j,i) = p_weert_sedi
161 q_weert(j,i) = q_weert_sedi
162 gamma_slide_inv(j,i) = gamma_slide_inv_2
163 sub_melt_flag(j,i) = (gamma_slide_sedi >= eps)
169 #elif ( defined(HEINO) )
173 gamma_slide_inv_1 = 1.0_dp/max(gamma_slide, eps)
174 gamma_slide_inv_2 = 1.0_dp/max(gamma_slide_sedi, eps)
179 if (maske_sedi(j,i) /= 7)
then
180 c_slide(j,i) = c_slide*year_sec_inv
181 p_weert(j,i) = p_weert
182 q_weert(j,i) = q_weert
183 gamma_slide_inv(j,i) = gamma_slide_inv_1
184 sub_melt_flag(j,i) = (gamma_slide >= eps)
186 c_slide(j,i) = c_slide_sedi*year_sec_inv
187 p_weert(j,i) = p_weert_sedi
188 q_weert(j,i) = q_weert_sedi
189 gamma_slide_inv(j,i) = gamma_slide_inv_2
190 sub_melt_flag(j,i) = (gamma_slide_sedi >= eps)
196 #elif ( defined(SCAND) \
201 || defined(emtp2sge) )
204 gamma_slide_inv_1 = 1.0_dp/max(gamma_slide, eps)
208 c_slide(j,i) = c_slide*year_sec_inv
209 p_weert(j,i) = p_weert
210 q_weert(j,i) = q_weert
211 gamma_slide_inv(j,i) = gamma_slide_inv_1
212 sub_melt_flag(j,i) = (gamma_slide >= eps)
218 stop
' calc_vxy_b_sia: No valid domain specified!'
230 if (maske(j,i) == 0)
then
232 p_b(j,i) = rho*g*(h_c(j,i)+h_t(j,i))
233 p_b_w(j,i) = rho_sw*g*max((z_sl-zb(j,i)), 0.0_dp)
234 p_b_red(j,i) = p_b(j,i)-p_b_w(j,i)
235 p_b_red(j,i) = max(p_b_red(j,i), red_pres_limit_fact*p_b(j,i))
243 p_b_red(j,i) = 0.0_dp
254 tau_b(j,i) = p_b(j,i)*(dzs_dxi_g(j,i)**2+dzs_deta_g(j,i)**2)**0.5_dp
263 if (maske(j,i) == 0)
then
268 cvxy1 = c_slide(j,i) &
269 * (tau_b(j,i)**(p_weert(j,i)-1)/p_b(j,i)**q_weert(j,i)) &
273 cvxy1 = c_slide(j,i) &
274 * (tau_b(j,i)**(p_weert(j,i)-1)/p_b_red(j,i)**q_weert(j,i)) &
281 if (n_cts(j,i) == -1)
then
283 if (sub_melt_flag(j,i))
then
284 temp_diff = max((temp_c_m(0,j,i)-temp_c(0,j,i)), 0.0_dp)
285 cvxy1a = exp(-gamma_slide_inv(j,i)*temp_diff)
290 d_help_b(j,i) = cvxy1*cvxy1a
292 else if (n_cts(j,i) == 0)
then
294 d_help_b(j,i) = cvxy1
299 d_help_b(j,i) = cvxy1
306 d_help_b(j,i) = 0.0_dp
317 vx_b(j,i) = -0.5_dp*(d_help_b(j,i)+d_help_b(j,i+1))*dzs_dxi(j,i)
325 vy_b(j,i) = -0.5_dp*(d_help_b(j,i)+d_help_b(j+1,i))*dzs_deta(j,i)
333 vx_b_g(j,i) = -d_help_b(j,i)*dzs_dxi_g(j,i)
334 vy_b_g(j,i) = -d_help_b(j,i)*dzs_deta_g(j,i)
341 vh_max = vh_max/year_sec
345 vx_b(j,i) = max(vx_b(j,i), -vh_max)
346 vx_b(j,i) = min(vx_b(j,i), vh_max)
347 vy_b(j,i) = max(vy_b(j,i), -vh_max)
348 vy_b(j,i) = min(vy_b(j,i), vh_max)
349 vx_b_g(j,i) = max(vx_b_g(j,i), -vh_max)
350 vx_b_g(j,i) = min(vx_b_g(j,i), vh_max)
351 vy_b_g(j,i) = max(vy_b_g(j,i), -vh_max)
352 vy_b_g(j,i) = min(vy_b_g(j,i), vh_max)