SICOPOLIS V3.0
 All Classes Files Functions Variables Macros
calc_vz_ssa.F90
Go to the documentation of this file.
1 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 !
3 ! Subroutine : c a l c _ v z _ s s a
4 !
5 !> @file
6 !!
7 !! Computation of the vertical velocity vz in the shallow shelf approximation.
8 !!
9 !! @section Copyright
10 !!
11 !! Copyright 2009-2013 Ralf Greve, Tatsuru Sato
12 !!
13 !! @section License
14 !!
15 !! This file is part of SICOPOLIS.
16 !!
17 !! SICOPOLIS is free software: you can redistribute it and/or modify
18 !! it under the terms of the GNU General Public License as published by
19 !! the Free Software Foundation, either version 3 of the License, or
20 !! (at your option) any later version.
21 !!
22 !! SICOPOLIS is distributed in the hope that it will be useful,
23 !! but WITHOUT ANY WARRANTY; without even the implied warranty of
24 !! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 !! GNU General Public License for more details.
26 !!
27 !! You should have received a copy of the GNU General Public License
28 !! along with SICOPOLIS. If not, see <http://www.gnu.org/licenses/>.
29 !<
30 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
31 
32 !-------------------------------------------------------------------------------
33 !> Computation of the vertical velocity vz in the shallow shelf approximation.
34 !<------------------------------------------------------------------------------
35 subroutine calc_vz_ssa(z_sl, dxi, deta, dzeta_c)
36 
37 use sico_types
39 
40 implicit none
41 
42 real(dp), intent(in) :: z_sl
43 real(dp), intent(in) :: dxi, deta, dzeta_c
44 
45 integer(i4b) :: i, j, kt, kc
46 real(dp), dimension(0:JMAX,0:IMAX) :: vz_sl
47 real(dp), dimension(0:KCMAX) :: zeta_c_sgz, eaz_c_sgz, eaz_c_quotient_sgz
48 real(dp) :: dxi_inv, deta_inv
49 real(dp) :: dvx_dxi, dvy_deta
50 
51 dxi_inv = 1.0_dp/dxi
52 deta_inv = 1.0_dp/deta
53 
54 !-------- Abbreviations --------
55 
56 do kc=0, kcmax-1
57  zeta_c_sgz(kc) = (kc+0.5_dp)*dzeta_c
58  eaz_c_sgz(kc) = exp(deform*zeta_c_sgz(kc))
59  eaz_c_quotient_sgz(kc) = (eaz_c_sgz(kc)-1.0_dp)/(ea-1.0_dp)
60 end do
61 
62 !-------- Computation of vz --------
63 
64 do i=1, imax-1
65 do j=1, jmax-1
66 
67  if (maske(j,i)==3_i2b) then ! floating ice
68 
69 ! ------ Derivatives of the horizontal velocity
70 
71  dvx_dxi = insq_g11_g(j,i)*insq_g22_g(j,i) &
72  *(vx_m(j,i)*sq_g22_sgx(j,i)-vx_m(j,i-1)*sq_g22_sgx(j,i-1)) &
73  *dxi_inv
74 
75  dvy_deta = insq_g11_g(j,i)*insq_g22_g(j,i) &
76  *(vy_m(j,i)*sq_g11_sgy(j,i)-vy_m(j-1,i)*sq_g11_sgy(j-1,i)) &
77  *deta_inv
78 
79 ! ------ Basal velocity vz_b
80 
81  vz_b(j,i) = 0.5_dp*(vx_m(j,i)+vx_m(j,i-1))*dzb_dxi_g(j,i) &
82  +0.5_dp*(vy_m(j,i)+vy_m(j-1,i))*dzb_deta_g(j,i) &
83  +dzb_dtau(j,i)-q_b_tot(j,i)
84  ! kinematic boundary condition at the ice base
85 
86 ! ------ Velocity at sea level vz_sl
87 
88  vz_sl(j,i) = vz_b(j,i) - (z_sl-zb(j,i))*(dvx_dxi+dvy_deta)
89 
90 ! ------ Surface velocity vz_s
91 
92  vz_s(j,i) = vz_sl(j,i) - (zs(j,i)-z_sl)*(dvx_dxi+dvy_deta)
93 
94 ! ------ 3-D velocity vz_c and vz_t
95 
96  do kc=0, kcmax-1
97  vz_c(kc,j,i) = vz_sl(j,i) &
98  -(zm(j,i)+eaz_c_quotient_sgz(kc)*h_c(j,i)-z_sl) &
99  *(dvx_dxi+dvy_deta)
100  end do
101 
102  if ((n_cts(j,i) == -1).or.(n_cts(j,i) == 0)) then
103  ! cold ice base, temperate ice base
104 
105  do kt=0, ktmax-1
106  vz_t(kt,j,i) = vz_b(j,i)
107  end do
108 
109  else ! n_cts(j,i) == 1, temperate ice layer
110 
111  do kt=0, ktmax-1
112  vz_t(kt,j,i) = vz_sl(j,i) &
113  -(zb(j,i) &
114  +0.5_dp*(zeta_t(kt)+zeta_t(kt+1))*h_t(j,i) &
115  -z_sl) &
116  *(dvx_dxi+dvy_deta)
117  end do
118 
119  end if
120 
121  end if
122 
123 end do
124 end do
125 
126 end subroutine calc_vz_ssa
127 !