SPEED
READ_DIME_HEADER.f90
Go to the documentation of this file.
1! Copyright (C) 2012 The SPEED FOUNDATION
2! Author: Ilario Mazzieri
3!
4! This file is part of SPEED.
5!
6! SPEED is free software; you can redistribute it and/or modify it
7! under the terms of the GNU Affero General Public License as
8! published by the Free Software Foundation, either version 3 of the
9! License, or (at your option) any later version.
10!
11! SPEED is distributed in the hope that it will be useful, but
12! WITHOUT ANY WARRANTY; without even the implied warranty of
13! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14! Affero General Public License for more details.
15!
16! You should have received a copy of the GNU Affero General Public License
17! along with SPEED. If not, see <http://www.gnu.org/licenses/>.
18
26
27 subroutine read_dime_header(file_head,nsnapshots,ntime_err,debug)
28
29 implicit none
30
31 character*70 :: file_head
32 character*80 :: input_line
33 character*8 :: keyword
34
35 integer*4 :: status
36 integer*4 :: nmonitors,nsnapshots,ntime_err,debug
37
38
39 nmonitors = 0
40 nsnapshots = 0
41 ntime_err = 0
42
43 open(20,file=file_head)
44
45 do
46 read(20,'(A)',iostat = status) input_line
47
48 if (status.ne.0) exit
49
50 keyword = input_line(1:8)
51
52 if (keyword(1:7).eq.'RESTART') then
53 nsnapshots = 1
54 endif
55 if (keyword(1:7).eq.'TIMEERR') then
56 ntime_err = ntime_err + 1
57 endif
58 if (keyword(1:5).eq.'DEBUG') then
59 debug = 1
60 endif
61
62
63
64 enddo
65
66 close(20)
67
68 return
69 end subroutine read_dime_header
70
subroutine read_dime_header(file_head, nsnapshots, ntime_err, debug)
Reads dimension in SPEED.input file.