SICOPOLIS V3.0
 All Classes Files Functions Variables Macros
ratefac.F90
Go to the documentation of this file.
1 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 !
3 ! Function : r a t e f a c
4 !
5 !> @file
6 !!
7 !! Rate factor for cold ice:
8 !! Linear interpolation of tabulated values in RF(.).
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 !> Rate factor for cold ice:
35 !! Linear interpolation of tabulated values in RF(.).
36 !<------------------------------------------------------------------------------
37 function ratefac(temp_val, temp_m_val)
38 
39 use sico_types
41 
42 implicit none
43 real(dp) :: ratefac
44 real(dp), intent(in) :: temp_val, temp_m_val
45 
46 real(dp) :: temp_h_val
47 
48 temp_h_val = temp_val-temp_m_val
49 
50 ratefac = rf(floor(temp_h_val)) &
51  +(rf(floor(temp_h_val)+1)-rf(floor(temp_h_val))) &
52  *(temp_h_val-real(floor(temp_h_val),dp))
53 
54 end function ratefac
55 !