SICOPOLIS V3.1
 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 
52 !-------- Term abbreviations --------
53 
54 dxi_inv = 1.0_dp/dxi
55 deta_inv = 1.0_dp/deta
56 
57 do kc=0, kcmax
58  aqxy1(kc) = deform/(ea-1.0_dp)*eaz_c(kc)*dzeta_c
59 end do
60 
61 !-------- Computation of the depth-integrated viscosity --------
62 
63 do i=0, imax
64 do j=0, jmax
65 
66  if (maske(j,i)==0_i2b.and..not.flag_sf(j,i)) then ! grounded ice
67 
68  de_ssa(j,i) = 0.0_dp ! dummy value
69 
70  vis_int_g(j,i) = (h_c(j,i)+h_t(j,i)) / flui_ave_sia(j,i)
71 
72  else if ((maske(j,i)==1_i2b).or.(maske(j,i)==2_i2b)) then
73  ! ice-free land or ocean
74  de_ssa(j,i) = 0.0_dp ! dummy value
75 
76  vis_int_g(j,i) = 0.0_dp ! dummy value
77 
78  else ! maske(j,i)==3_i2b, flag_sf(j,i)==.true., floating ice;
79  ! must not be at the margin of the computational domain
80 
81 ! ------ Effective strain rate
82 
83  dvx_dxi = (vx_m(j,i)-vx_m(j,i-1))*dxi_inv
84  dvy_deta = (vy_m(j,i)-vy_m(j-1,i))*deta_inv
85 
86  dvx_deta = 0.25_dp*deta_inv &
87  *(vx_m(j+1,i)+vx_m(j+1,i-1)-vx_m(j-1,i)-vx_m(j-1,i-1))
88  dvy_dxi = 0.25_dp*dxi_inv &
89  *(vy_m(j,i+1)+vy_m(j-1,i+1)-vy_m(j,i-1)-vy_m(j-1,i-1))
90 
91  de_ssa(j,i) = sqrt( dvx_dxi*dvx_dxi &
92  + dvy_deta*dvy_deta &
93  + dvx_dxi*dvy_deta &
94  + 0.25_dp*(dvx_deta+dvy_dxi)*(dvx_deta+dvy_dxi) )
95 
96 ! ------ Term abbreviation
97 
98  do kc=0, kcmax
99 
100  cvis1(kc) = aqxy1(kc)*h_c(j,i) &
101  *viscosity(de_ssa(j,i), &
102  temp_c(kc,j,i), temp_c_m(kc,j,i), 0.0_dp, &
103  enh_c(kc,j,i), .true.)
104 
105  end do
106 
107 ! ------ Depth-integrated viscosity
108 
109  vis_int_g(j,i) = 0.0_dp
110 
111  do kc=0, kcmax-1
112  vis_int_g(j,i) = vis_int_g(j,i)+0.5_dp*(cvis1(kc+1)+cvis1(kc))
113  end do
114 
115  end if
116 
117 end do
118 end do
119 
120 end subroutine calc_vis_ssa
121 !