SICOPOLIS V3.2
 All Classes Files Functions Variables Macros
ice_material_quantities.F90
Go to the documentation of this file.
1 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 !
3 ! Module : i c e _ m a t e r i a l _ q u a n t i t i e s
4 !
5 !> @file
6 !!
7 !! Material quantities of ice:
8 !! Rate factor, heat conductivity, specific heat (heat capacity).
9 !!
10 !! @section Copyright
11 !!
12 !! Copyright 2009-2016 Ralf Greve
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 !> Material quantities of ice:
35 !! Rate factor, heat conductivity, specific heat (heat capacity).
36 !<------------------------------------------------------------------------------
38 
39 use sico_types
40 
41 implicit none
42 save
43 
44 !> RF(n): Tabulated values for the rate factor of cold ice
45  real(dp), dimension(-256:255), private :: rf
46 !> R_T: Coefficient of the water-content dependence in the rate factor
47 !> for temperate ice
48  real(dp) , private :: r_t
49 !> KAPPA(n): Tabulated values for the heat conductivity of ice
50  real(dp), dimension(-256:255), private :: kappa
51 !> C(n): Tabulated values for the specific heat of ice
52  real(dp), dimension(-256:255), private :: c
53 
54 !> RHO_I: Density of ice
55  real(dp) , private :: rho_i
56  ! only for the Martian ice caps
57 !> RHO_C: Density of crustal material (dust)
58  real(dp) , private :: rho_c
59  ! only for the Martian ice caps
60 !> KAPPA_C: Heat conductivity of crustal material (dust)
61  real(dp) , private :: kappa_c
62  ! only for the Martian ice caps
63 !> C_C: Specific heat of crustal material (dust)
64  real(dp) , private :: c_c
65  ! only for the Martian ice caps
66 
68 
69 contains
70 
71 !-------------------------------------------------------------------------------
72 !> Setting of required physical parameters.
73 !<------------------------------------------------------------------------------
74 subroutine ice_mat_eqs_pars(RF_table, R_T_val, KAPPA_table, C_table, &
75  n_temp_min, n_temp_max, &
76  rho_i_val, rho_c_val, kappa_c_val, c_c_val)
77 
78 implicit none
79 
80 integer(i4b), intent(in) :: n_temp_min, n_temp_max
81 real(dp), dimension(n_temp_min:n_temp_max), &
82  intent(in) :: rf_table, kappa_table, c_table
83 real(dp), intent(in) :: r_t_val
84 real(dp), optional, intent(in) :: rho_i_val, rho_c_val, kappa_c_val, c_c_val
85 
86 integer(i4b) :: n
87 
88 !-------- Initialisation --------
89 
90 rf = 0.0_dp
91 kappa = 0.0_dp
92 c = 0.0_dp
93 
94 if ((n_temp_min <= -256).or.(n_temp_max >= 255)) &
95  stop ' ice_mat_eqs_pars: Temperature indices out of allowed range!'
96 
97 !-------- Assignment --------
98 
99 do n=n_temp_min, n_temp_max
100  rf(n) = rf_table(n)
101  kappa(n) = kappa_table(n)
102  c(n) = c_table(n)
103 end do
104 
105 do n=-256, n_temp_min-1
106  rf(n) = rf(n_temp_min) ! dummy values
107  kappa(n) = kappa(n_temp_min) ! dummy values
108  c(n) = c(n_temp_min) ! dummy values
109 end do
110 
111 do n=n_temp_max+1, 255
112  rf(n) = rf(n_temp_max) ! dummy values
113  kappa(n) = kappa(n_temp_max) ! dummy values
114  c(n) = c(n_temp_max) ! dummy values
115 end do
116 
117 r_t = r_t_val
118 
119 !-------- Martian stuff --------
120 
121 if ( present(rho_i_val) ) then
122  rho_i = rho_i_val
123 else
124  rho_i = 0.0_dp ! dummy value
125 end if
126 
127 if ( present(rho_c_val) ) then
128  rho_c = rho_c_val
129 else
130  rho_c = 0.0_dp ! dummy value
131 end if
132 
133 if ( present(kappa_c_val) ) then
134  kappa_c = kappa_c_val
135 else
136  kappa_c = 0.0_dp ! dummy value
137 end if
138 
139 if ( present(c_c_val) ) then
140  c_c = c_c_val
141 else
142  c_c = 0.0_dp ! dummy value
143 end if
144 
145 end subroutine ice_mat_eqs_pars
146 
147 !-------------------------------------------------------------------------------
148 !> Rate factor for cold ice:
149 !! Linear interpolation of tabulated values in RF(.).
150 !<------------------------------------------------------------------------------
151 function ratefac_c(temp_val, temp_m_val)
152 
153 use sico_types
154 use sico_variables
155 use sico_vars
156 
157 implicit none
158 real(dp) :: ratefac_c
159 real(dp), intent(in) :: temp_val, temp_m_val
160 
161 real(dp) :: temp_h_val
162 
163 temp_h_val = temp_val-temp_m_val
164 
165 ratefac_c = rf(floor(temp_h_val)) &
166  +(rf(floor(temp_h_val)+1)-rf(floor(temp_h_val))) &
167  *(temp_h_val-real(floor(temp_h_val),dp))
168 
169 end function ratefac_c
170 
171 !-------------------------------------------------------------------------------
172 !> Rate factor for temperate ice.
173 !<------------------------------------------------------------------------------
174 function ratefac_t(omega_val)
175 
176 use sico_types
177 use sico_variables
178 use sico_vars
179 
180 implicit none
181 real(dp) :: ratefac_t
182 real(dp), intent(in) :: omega_val
183 
184 ratefac_t = rf(0)*(1.0_dp+r_t*(omega_val))
185 
186 end function ratefac_t
187 
188 !-------------------------------------------------------------------------------
189 !> Rate factor for cold and temperate ice:
190 !! Combination of ratefac_c and ratefac_t (only for the enthalpy method).
191 !<------------------------------------------------------------------------------
192 function ratefac_c_t(temp_val, omega_val, temp_m_val)
193 
194 use sico_types
195 use sico_variables
196 use sico_vars
197 
198 implicit none
199 real(dp) :: ratefac_c_t
200 real(dp), intent(in) :: temp_val, temp_m_val, omega_val
201 
202 real(dp) :: temp_h_val
203 
204 temp_h_val = temp_val-temp_m_val
205 
206 ratefac_c_t = ( rf(floor(temp_h_val)) &
207  +(rf(floor(temp_h_val)+1)-rf(floor(temp_h_val))) &
208  *(temp_h_val-real(floor(temp_h_val),dp)) ) &
209  *(1.0_dp+r_t*(omega_val))
210 
211 end function ratefac_c_t
212 
213 !-------------------------------------------------------------------------------
214 !> Heat conductivity of ice:
215 !! Linear interpolation of tabulated values in KAPPA(.).
216 !<------------------------------------------------------------------------------
217 function kappa_val(temp_val)
218 
219 use sico_types
220 use sico_variables
221 use sico_vars
222 
223 implicit none
224 real(dp) :: kappa_val
225 real(dp), intent(in) :: temp_val
226 
227 real(dp) :: kappa_ice
228 
229 !-------- Heat conductivity of pure ice --------
230 
231 #if defined(FRAC_DUST)
232 kappa_ice = kappa(floor(temp_val)) &
233  +(kappa(floor(temp_val)+1)-kappa(floor(temp_val))) &
234  *(temp_val-real(floor(temp_val),dp))
235 #else
236 kappa_val = kappa(floor(temp_val)) &
237  +(kappa(floor(temp_val)+1)-kappa(floor(temp_val))) &
238  *(temp_val-real(floor(temp_val),dp))
239 #endif
240 
241 !-------- If dust is present (polar caps of Mars):
242 ! Heat conductivity of ice-dust mixture --------
243 
244 #if defined(FRAC_DUST)
245 kappa_val = (1.0_dp-frac_dust)*kappa_ice + frac_dust*kappa_c
246 #endif
247 
248 end function kappa_val
249 
250 !-------------------------------------------------------------------------------
251 !> Specific heat of ice:
252 !! Linear interpolation of tabulated values in C(.).
253 !<------------------------------------------------------------------------------
254 function c_val(temp_val)
255 
256 use sico_types
257 use sico_variables
258 use sico_vars
259 
260 implicit none
261 real(dp) :: c_val
262 real(dp), intent(in) :: temp_val
263 
264 real(dp) :: c_ice
265 
266 !-------- Specific heat of pure ice --------
267 
268 #if defined(FRAC_DUST)
269 c_ice = c(floor(temp_val)) &
270  +(c(floor(temp_val)+1)-c(floor(temp_val))) &
271  *(temp_val-real(floor(temp_val),dp))
272 #else
273 c_val = c(floor(temp_val)) &
274  +(c(floor(temp_val)+1)-c(floor(temp_val))) &
275  *(temp_val-real(floor(temp_val),dp))
276 #endif
277 
278 !-------- If dust is present (polar caps of Mars):
279 ! Specific heat of ice-dust mixture --------
280 
281 #if defined(FRAC_DUST)
282 c_val = rho_inv * ( (1.0_dp-frac_dust)*rho_i*c_ice + frac_dust*rho_c*c_c )
283 #endif
284 
285 end function c_val
286 
287 !-------------------------------------------------------------------------------
288 
289 end module ice_material_quantities
290 !
subroutine, public ice_mat_eqs_pars(RF_table, R_T_val, KAPPA_table, C_table, n_temp_min, n_temp_max, RHO_I_val, RHO_C_val, KAPPA_C_val, C_C_val)
Setting of required physical parameters.
real(dp) function, public ratefac_t(omega_val)
Rate factor for temperate ice.
Declarations of kind types for SICOPOLIS.
Definition: sico_types.F90:35
real(dp) function, public ratefac_c_t(temp_val, omega_val, temp_m_val)
Rate factor for cold and temperate ice: Combination of ratefac_c and ratefac_t (only for the enthalpy...
Declarations of global variables for SICOPOLIS (for the ANT domain).
Definition: sico_vars.F90:35
real(dp) function, public ratefac_c(temp_val, temp_m_val)
Rate factor for cold ice: Linear interpolation of tabulated values in RF(.).
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(.).
Material quantities of ice: Rate factor, heat conductivity, specific heat (heat capacity).
Declarations of global variables for SICOPOLIS.