SICOPOLIS V3.2
 All Classes Files Functions Variables Macros
init_temp_water_age.F90
Go to the documentation of this file.
1 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 !
3 ! Subroutine : i n i t _ t e m p _ w a t e r _ a g e
4 !
5 !> @file
6 !!
7 !! Initial temperature, water content and age.
8 !!
9 !! @section Copyright
10 !!
11 !! Copyright 2009-2016 Ralf Greve, Thorben Dunse
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 !> Initial temperature, water content and age.
34 !<------------------------------------------------------------------------------
35 subroutine init_temp_water_age()
36 
37 use sico_types
39 use sico_vars
41 
42 implicit none
43 
44 integer(i4b) :: i, j, kc, kt, kr
45 real(dp) :: kappa_const_val, c_const_val
46 real(dp) :: as_val, h_val, qgeo_val, k, z_above_base, erf_val_1, erf_val_2
47 real(dp) :: temp_ice_base, temp_scale_factor
48 
49 !-------- Initial ice temperature --------
50 
51 ! ------ Present topography
52 
53 #if (ANF_DAT==1)
54 
55 do i=0, imax
56 do j=0, jmax
57 
58 #if (!defined(TEMP_INIT) || TEMP_INIT==1)
59 
60 #if (defined(NMARS) || defined(SMARS)) /* Polar caps of Mars */
61 
62  do kc=0, kcmax
63  temp_c(kc,j,i) = -100.0_dp
64  end do
65 
66 #else /* all other domains */
67 
68  do kc=0, kcmax
69  temp_c(kc,j,i) = -10.0_dp
70  end do
71 
72 #endif
73 
74 #elif (TEMP_INIT==2)
75 
76  do kc=0, kcmax
77  temp_c(kc,j,i) = temp_s(j,i)
78  end do
79 
80 #elif (TEMP_INIT==3)
81 
82 #if (defined(NMARS) || defined(SMARS)) /* Polar caps of Mars */
83  kappa_const_val = kappa_val(-100.0_dp)
84 #else /* all other domains */
85  kappa_const_val = kappa_val(-10.0_dp)
86 #endif
87 
88  if (maske(j,i)<=2_i2b) then
89 
90  do kc=0, kcmax
91 
92  !%%% TDUNSE 05.12.2008: vertical temp profile depends on surface temp
93  !%%% and increases lineray with depth according to the geothermal heat flux;
94  !%%% upper temperature limit of ice: pressure melting point
95  !%%% KAPPA_ice = 2.072_dp and q_geo = 50 mW/m^2 => 0.024 Km^-1
96  !%%% current description:
97  !
98  ! temp_c(kc,j,i) = temp_ma_present(j,i) &
99  ! + q_geo(j,i)/2.072_dp &
100  ! *H_c(j,i)*(1.0_dp-eaz_c_quotient(kc))
101  !
102  ! if (temp_c(kc,j,i) > -BETA*H_c(j,i)) then
103  ! temp_c(kc,j,i) = -BETA*H_c(j,i)
104  ! end if
105 
106  temp_c(kc,j,i) = temp_s(j,i) &
107  + (q_geo(j,i)/kappa_const_val) &
108  *h_c(j,i)*(1.0_dp-eaz_c_quotient(kc))
109  ! linear temperature distribution according to the
110  ! geothermal heat flux
111  end do
112 
113  if (temp_c(0,j,i) >= -beta*h_c(j,i)) then
114 
115  temp_ice_base = -beta*h_c(j,i)
116 
117  do kc=0, kcmax
118  temp_c(kc,j,i) = temp_s(j,i) &
119  + (temp_ice_base-temp_s(j,i)) &
120  *(1.0_dp-eaz_c_quotient(kc))
121  end do
122 
123  end if
124 
125  else ! maske(j,i)==3_i2b, floating ice
126 
127  temp_ice_base = -beta*h_c(j,i) - delta_tm_sw
128 
129  do kc=0, kcmax
130  temp_c(kc,j,i) = temp_s(j,i) &
131  + (temp_ice_base-temp_s(j,i)) &
132  *(1.0_dp-eaz_c_quotient(kc))
133  end do
134 
135  end if
136 
137 #elif (TEMP_INIT==4)
138 
139 #if (defined(NMARS) || defined(SMARS)) /* Polar caps of Mars */
140  kappa_const_val = kappa_val(-100.0_dp)
141  c_const_val = c_val(-100.0_dp)
142 #else /* all other domains */
143  kappa_const_val = kappa_val(-10.0_dp)
144  c_const_val = c_val(-10.0_dp)
145 #endif
146 
147  if (maske(j,i)<=2_i2b) then
148  as_val = max(as_perp(j,i), epsi)
149  else ! maske(j,i)==3_i2b, floating ice
150  as_val = epsi ! this will produce an almost linear temperature profile
151  end if
152 
153  h_val = max(h_c(j,i) , eps)
154  qgeo_val = max(q_geo(j,i), eps)
155 
156  k = sqrt( (kappa_const_val/(rho*c_const_val)) * (h_val/as_val) )
157 
158  erf_val_1 = erf(h_c(j,i)/(sqrt(2.0_dp)*k))
159 
160  do kc=0, kcmax
161  z_above_base = h_c(j,i)*eaz_c_quotient(kc)
162  erf_val_2 = erf(z_above_base/(sqrt(2.0_dp)*k))
163  temp_c(kc,j,i) = temp_s(j,i) &
164  + (qgeo_val/kappa_const_val) &
165  * sqrt(0.5_dp*pi)*k*(erf_val_1-erf_val_2)
166  end do
167 
168  if ( (maske(j,i) <= 2_i2b).and.(temp_c(0,j,i) >= -beta*h_c(j,i)) ) then
169  temp_ice_base = -beta*h_c(j,i)
170  temp_scale_factor = (temp_ice_base-temp_s(j,i)) &
171  /(temp_c(0,j,i)-temp_s(j,i))
172  else if (maske(j,i) == 3_i2b) then
173  temp_ice_base = -beta*h_c(j,i)-delta_tm_sw
174  temp_scale_factor = (temp_ice_base-temp_s(j,i)) &
175  /(temp_c(0,j,i)-temp_s(j,i))
176  else
177  temp_scale_factor = 1.0_dp
178  end if
179 
180  do kc=0, kcmax
181  temp_c(kc,j,i) = temp_s(j,i) &
182  + temp_scale_factor*(temp_c(kc,j,i)-temp_s(j,i))
183  end do
184 
185 #else
186 
187  write(6, fmt='(a)') ' ice_temp:'
188  write(6, fmt='(a)') ' TEMP_INIT must be set to either 1, 2, 3 or 4!'
189  stop
190 
191 #endif
192 
193 end do
194 end do
195 
196 ! ------ Ice-free, relaxed bedrock
197 
198 #elif (ANF_DAT==2)
199 
200 do i=0, imax
201 do j=0, jmax
202 
203  do kc=0, kcmax
204  temp_c(kc,j,i) = temp_s(j,i)
205  end do
206 
207 end do
208 end do
209 
210 #else
211 
212 write(6, fmt='(a)') ' ice_temp:'
213 write(6, fmt='(a)') ' Only to be called for ANF_DAT==1 or ANF_DAT==2!'
214 stop
215 
216 #endif
217 
218 !-------- Initial lithosphere temperature --------
219 
220 do i=0, imax
221 do j=0, jmax
222 
223  do kr=0, krmax
224  temp_r(kr,j,i) = temp_c(0,j,i) &
225  + (q_geo(j,i)/kappa_r) &
226  *h_r*(1.0_dp-zeta_r(kr))
227  ! linear temperature distribution according to the
228  ! geothermal heat flux
229  end do
230 
231 end do
232 end do
233 
234 !-------- Initial water content --------
235 
236 omega_c = 0.0_dp ! only required for the enthalpy method
237 omega_t = 0.0_dp
238 
239 !-------- Initial age --------
240 
241 #if (defined(ASF)) /* Austfonna */
242 
243 age_c = 3500.0_dp*year_sec
244 age_t = 3500.0_dp*year_sec
245 
246 #else /* all other domains */
247 
248 age_c = 15000.0_dp*year_sec
249 age_t = 15000.0_dp*year_sec
250 
251 #endif
252 
253 end subroutine init_temp_water_age
254 !
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
real(dp) function, public kappa_val(temp_val)
Heat conductivity of ice: Linear interpolation of tabulated values in KAPPA(.).
real(dp) function, public c_val(temp_val)
Specific heat of ice: Linear interpolation of tabulated values in C(.).
subroutine init_temp_water_age()
Initial temperature, water content and age.
Material quantities of ice: Rate factor, heat conductivity, specific heat (heat capacity).
Declarations of global variables for SICOPOLIS.