SICOPOLIS V3.0
 All Classes Files Functions Variables Macros
calc_vis_ssa.F90
Go to the documentation of this file.
1 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 !
3 ! Subroutine : c a l c _ v i s _ s s a
4 !
5 !> @file
6 !!
7 !! Computation of the depth-integrated viscosity vis_int_g in the
8 !! shallow shelf approximation.
9 !!
10 !! @section Copyright
11 !!
12 !! Copyright 2009-2013 Ralf Greve, Tatsuru Sato
13 !!
14 !! @section License
15 !!
16 !! This file is part of SICOPOLIS.
17 !!
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.
22 !!
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.
27 !!
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/>.
30 !<
31 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
32 
33 !-------------------------------------------------------------------------------
34 !> Computation of the depth-integrated viscosity vis_int_g in the
35 !! shallow shelf approximation.
36 !<------------------------------------------------------------------------------
37 subroutine calc_vis_ssa(dxi, deta, dzeta_c)
38 
39 use sico_types
41 
42 implicit none
43 
44 real(dp), intent(in) :: dxi, deta, dzeta_c
45 
46 integer(i4b) :: i, j, kc
47 real(dp) :: dxi_inv, deta_inv
48 real(dp) :: dvx_dxi, dvx_deta, dvy_dxi, dvy_deta
49 real(dp) :: aqxy1(0:kcmax)
50 real(dp) :: cvis1(0:kcmax)
51 real(dp) :: viscosity
52 
53 !-------- Term abbreviations --------
54 
55 dxi_inv = 1.0_dp/dxi
56 deta_inv = 1.0_dp/deta
57 
58 do kc=0, kcmax
59  aqxy1(kc) = deform/(ea-1.0_dp)*eaz_c(kc)*dzeta_c
60 end do
61 
62 !-------- Computation of the depth-integrated viscosity --------
63 
64 do i=0, imax
65 do j=0, jmax
66 
67  if (maske(j,i)==0_i2b.and..not.flag_sf(j,i)) then ! grounded ice
68 
69  de_ssa(j,i) = 0.0_dp ! dummy value
70 
71  vis_int_g(j,i) = (h_c(j,i)+h_t(j,i)) / flui_ave_sia(j,i)
72 
73  else if ((maske(j,i)==1_i2b).or.(maske(j,i)==2_i2b)) then
74  ! ice-free land or ocean
75  de_ssa(j,i) = 0.0_dp ! dummy value
76 
77  vis_int_g(j,i) = 0.0_dp ! dummy value
78 
79  else ! maske(j,i)==3_i2b, flag_sf(j,i)==.true., floating ice;
80  ! must not be at the margin of the computational domain
81 
82 ! ------ Effective strain rate
83 
84  dvx_dxi = (vx_m(j,i)-vx_m(j,i-1))*dxi_inv
85  dvy_deta = (vy_m(j,i)-vy_m(j-1,i))*deta_inv
86 
87  dvx_deta = 0.25_dp*deta_inv &
88  *(vx_m(j+1,i)+vx_m(j+1,i-1)-vx_m(j-1,i)-vx_m(j-1,i-1))
89  dvy_dxi = 0.25_dp*dxi_inv &
90  *(vy_m(j,i+1)+vy_m(j-1,i+1)-vy_m(j,i-1)-vy_m(j-1,i-1))
91 
92  de_ssa(j,i) = sqrt( dvx_dxi*dvx_dxi &
93  + dvy_deta*dvy_deta &
94  + dvx_dxi*dvy_deta &
95  + 0.25_dp*(dvx_deta+dvy_dxi)*(dvx_deta+dvy_dxi) )
96 
97 ! ------ Term abbreviation
98 
99  do kc=0, kcmax
100 
101  cvis1(kc) = aqxy1(kc)*h_c(j,i) &
102  *viscosity(de_ssa(j,i), &
103  temp_c(kc,j,i), temp_c_m(kc,j,i), 0.0_dp, &
104  enh_c(kc,j,i), .true.)
105 
106  end do
107 
108 ! ------ Depth-integrated viscosity
109 
110  vis_int_g(j,i) = 0.0_dp
111 
112  do kc=0, kcmax-1
113  vis_int_g(j,i) = vis_int_g(j,i)+0.5_dp*(cvis1(kc+1)+cvis1(kc))
114  end do
115 
116  end if
117 
118 end do
119 end do
120 
121 end subroutine calc_vis_ssa
122 !