7 !! Reading of the tabulated kei function.
11 !! Copyright 2009-2013 Ralf Greve
15 !! This file is part of SICOPOLIS.
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.
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.
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/>.
30 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
33 !> Reading of the tabulated kei function.
34 !<------------------------------------------------------------------------------
42 integer(i4b) :: n, n_data_kei_max
44 real(dp) :: r_val, d_dummy
47 n_data_kei_max = 10000
53 open(11, iostat=ios, &
54 file=inpath//
'/general/kei.dat', &
56 if (ios /= 0) stop
' read_kei: Error when opening the kei file!'
58 read(11,
'(a)') ch_dummy
59 read(11,
'(15x,f5.0)') kei_r_max
60 read(11,
'(15x,f5.0)') kei_r_incr
61 read(11,
'(a)') ch_dummy
63 n_data_kei = nint(kei_r_max/kei_r_incr)
65 if (n_data_kei > n_data_kei_max) stop
' read_kei: Array kei too small!'
67 read(11,
'(a)') ch_dummy
68 read(11,
'(a)') ch_dummy
69 read(11,
'(a)') ch_dummy
71 do n=-n_data_kei, n_data_kei
72 read(11,*) d_dummy, kei(n)
75 close(11, status=
'keep')