SICOPOLIS V3.2
 All Classes Files Functions Variables Macros
calc_enhance.F90
Go to the documentation of this file.
1 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 !
3 ! Subroutine : c a l c _ e n h a n c e
4 !
5 !> @file
6 !!
7 !! Computation of the flow enhancement factor.
8 !!
9 !! @section Copyright
10 !!
11 !! Copyright 2009-2016 Ralf Greve
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 flow enhancement factor.
34 !<------------------------------------------------------------------------------
35 subroutine calc_enhance(time)
36 
37 use sico_types
39 use sico_vars
40 
41 implicit none
42 
43 real(dp), intent(in) :: time
44 
45 integer(i4b) :: i, j, kc, kt
46 real(dp) :: age_trans, date_trans1, date_trans2, date_trans3
47 real(dp) :: enh_shear_compr_diff, enh_mult
48 
49 #if (ENHMOD==1)
50 
51 enh_t = enh_fact
52 enh_c = enh_fact
53 
54 #elif (ENHMOD==2)
55 
56 age_trans = age_trans_0*year_sec
57 
58 do i=0, imax
59 do j=0, jmax
60 
61  do kt=0, ktmax
62  if (age_t(kt,j,i) < age_trans) then
63  enh_t(kt,j,i) = enh_intg ! Holocene ice
64  else
65  enh_t(kt,j,i) = enh_fact ! Pleistocene ice
66  end if
67  end do
68 
69  do kc=0, kcmax
70  if (age_c(kc,j,i) < age_trans) then
71  enh_c(kc,j,i) = enh_intg ! Holocene ice
72  else
73  enh_c(kc,j,i) = enh_fact ! Pleistocene ice
74  end if
75  end do
76 
77 end do
78 end do
79 
80 #elif (ENHMOD==3)
81 
82 date_trans1 = date_trans1_0*year_sec
83 date_trans2 = date_trans2_0*year_sec
84 date_trans3 = date_trans3_0*year_sec
85 
86 do i=0, imax
87 do j=0, jmax
88 
89  do kt=0, ktmax
90  if ( (time-age_t(kt,j,i)) < date_trans1 ) then
91  enh_t(kt,j,i) = enh_fact ! pre-Eemian ice
92  else if ( ((time-age_t(kt,j,i)) >= date_trans1).and. &
93  ((time-age_t(kt,j,i)) < date_trans2) ) then
94  enh_t(kt,j,i) = enh_intg ! Eemian ice
95  else if ( ((time-age_t(kt,j,i)) >= date_trans2).and. &
96  ((time-age_t(kt,j,i)) < date_trans3) ) then
97  enh_t(kt,j,i) = enh_fact ! Weichselian ice
98  else
99  enh_t(kt,j,i) = enh_intg ! Holocene ice
100  end if
101  end do
102 
103  do kc=0, kcmax
104  if ( (time-age_c(kc,j,i)) < date_trans1 ) then
105  enh_c(kc,j,i) = enh_fact ! pre-Eemian ice
106  else if ( ((time-age_c(kc,j,i)) >= date_trans1).and. &
107  ((time-age_c(kc,j,i)) < date_trans2) ) then
108  enh_c(kc,j,i) = enh_intg ! Eemian ice
109  else if ( ((time-age_c(kc,j,i)) >= date_trans2).and. &
110  ((time-age_c(kc,j,i)) < date_trans3) ) then
111  enh_c(kc,j,i) = enh_fact ! Weichselian ice
112  else
113  enh_c(kc,j,i) = enh_intg ! Holocene ice
114  end if
115  end do
116 
117 end do
118 end do
119 
120 #elif (ENHMOD==4 || ENHMOD==5)
121 
122 enh_shear_compr_diff = enh_shear-enh_compr
123 
124 do i=0, imax
125 do j=0, jmax
126 
127  do kt=0, ktmax
128  enh_t(kt,j,i) = enh_compr &
129  + enh_shear_compr_diff*lambda_shear_t(kt,j,i)**2
130  end do
131 
132  do kc=0, kcmax
133  enh_c(kc,j,i) = enh_compr &
134  + enh_shear_compr_diff*lambda_shear_c(kc,j,i)**2
135  end do
136 
137 end do
138 end do
139 
140 #else
141  stop ' calc_enhance: Parameter ENHMOD must be either 1, 2, 3, 4 or 5!'
142 #endif
143 
144 !-------- Modification for floating ice --------
145 
146 #if (MARGIN==3)
147 
148 #if (ENHMOD==1 || ENHMOD==2 || ENHMOD==3 || ENHMOD==4)
149 
150 do i=0, imax
151 do j=0, jmax
152 
153  if ( maske(j,i)==3_i2b ) then ! floating ice
154 
155  do kt=0, ktmax
156  enh_t(kt,j,i) = enh_shelf
157  end do
158 
159  do kc=0, kcmax
160  enh_c(kc,j,i) = enh_shelf
161  end do
162 
163  end if
164 
165 end do
166 end do
167 
168 #elif (ENHMOD==5)
169 
170 continue ! no modification
171 
172 #else
173  stop ' calc_enhance: Parameter ENHMOD must be either 1, 2, 3, 4 or 5!'
174 #endif
175 
176 #endif
177 
178 !-------- Modification due to dust content (Martian polar caps only) --------
179 
180 #if ( defined(NMARS) \
181  || defined(smars) ) /* martian ice sheet */
182 
183 #if (FLOW_LAW==1)
184  enh_mult = exp(-3.0_dp*2.0_dp*frac_dust)
185 #elif (FLOW_LAW==2)
186  enh_mult = exp(-1.8_dp*2.0_dp*frac_dust)
187 #elif (FLOW_LAW==3)
188  enh_mult = exp(-4.0_dp*2.0_dp*frac_dust)
189 #elif (FLOW_LAW==4)
190  stop ' calc_enhance: FLOW_LAW==4 has not been implemented yet!'
191 #endif
192 
193 enh_t = enh_t * enh_mult
194 enh_c = enh_c * enh_mult
195 
196 #endif
197 
198 end subroutine calc_enhance
199 !
Declarations of kind types for SICOPOLIS.
Definition: sico_types.F90:35
Declarations of global variables for SICOPOLIS (for the ANT domain).
Definition: sico_vars.F90:35
subroutine calc_enhance(time)
Computation of the flow enhancement factor.
Declarations of global variables for SICOPOLIS.