SPEED
WRITE_FILE_MPGM.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
30
31
32 subroutine write_file_mpgm(filec,nmon,n_mon,el_mon,xr_mon,yr_mon,zr_mon)
33
34
35 implicit none
36
37 character*70 :: filec
38 character*100000 :: input_line
39
40 integer*4 :: nmon, i, trash
41 integer*4 :: ileft, iright, status
42
43 integer*4,dimension(nmon) :: n_mon
44 integer*4,dimension(nmon) :: el_mon
45
46 real*8,dimension(nmon) :: xr_mon
47 real*8,dimension(nmon) :: yr_mon
48 real*8,dimension(nmon) :: zr_mon
49
50
51 open(20,file=filec)
52 write(20,'(I20)')nmon
53
54 do i = 1,nmon
55 write(20,'(1I20,1X,1I20,1X,1I20,1X,1E20.12,1X,1E20.12,1X,1E20.12)') &
56 i,n_mon(i),el_mon(i),&
57 xr_mon(i),yr_mon(i),zr_mon(i)
58
59 enddo
60
61 close(20)
62
63 return
64
65 end subroutine write_file_mpgm
66