SICOPOLIS V3.0
 All Classes Files Functions Variables Macros
kappa_val.F90
Go to the documentation of this file.
1 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 !
3 ! Function : k a p p a _ v a l
4 !
5 !> @file
6 !!
7 !! Heat conductivity of ice:
8 !! Linear interpolation of tabulated values in KAPPA(.).
9 !!
10 !! @section Copyright
11 !!
12 !! Copyright 2009-2013 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 !> Heat conductivity of ice:
35 !! Linear interpolation of tabulated values in KAPPA(.).
36 !<------------------------------------------------------------------------------
37 function kappa_val(temp_val)
38 
39 use sico_types
41 
42 implicit none
43 real(dp) :: kappa_val
44 real(dp), intent(in) :: temp_val
45 
46 real(dp) :: kappa_ice
47 
48 !-------- Heat conductivity of pure ice --------
49 
50 #if defined(FRAC_DUST)
51 kappa_ice = kappa(floor(temp_val)) &
52  +(kappa(floor(temp_val)+1)-kappa(floor(temp_val))) &
53  *(temp_val-real(floor(temp_val),dp))
54 #else
55 kappa_val = kappa(floor(temp_val)) &
56  +(kappa(floor(temp_val)+1)-kappa(floor(temp_val))) &
57  *(temp_val-real(floor(temp_val),dp))
58 #endif
59 
60 !-------- If dust is present (polar caps of Mars):
61 ! Heat conductivity of ice-dust mixture --------
62 
63 #if defined(FRAC_DUST)
64 kappa_val = (1.0_dp-frac_dust)*kappa_ice + frac_dust*kappa_c
65 #endif
66 
67 end function kappa_val
68 !