source: trunk/SOURCES/write_datfile.f90 @ 37

Last change on this file since 37 was 4, checked in by dumas, 10 years ago

initial import GRISLI trunk

File size: 2.2 KB
Line 
1!> \file write_datfile.f90
2!! Fiel to write a ZBL file (strating from bottom left)
3!<
4
5!> SUBROUTINE: write_datfile2
6!! ecriture of a ZBL file (starting from bottom left)
7!! @param  nxx                dimension along x
8!! @param  nyy                dimension along y
9!! @param  numcol             column number
10!! @param  filename           
11!! @return Tab                the value of Tab(nxx,nyy): Warning it is a real
12
13subroutine write_datfile2(nxx,nyy,Tab1,Tab2,filename)
14
15implicit none
16integer,intent(in)  :: nxx                    !< dimension along x
17integer,intent(in)  :: nyy                    !< dimension along y
18character(len=80),intent(in) :: filename      !< name of the file
19real,dimension(nxx,nyy),intent(in) :: Tab1   !< the array that is writen
20real,dimension(nxx,nyy),intent(in) :: Tab2   !< the array that is writen
21
22
23integer  :: i,j                ! working integers
24integer  :: lx,ly              ! nxx, nyy read in the file
25
26
27open(22,file=trim(filename))
28write(22,*) nxx,nyy  !, xmin,xmax,ymin,ymax ?
29do j=1,nyy
30   do i=1,nxx
31      write(22,*) Tab1(i,j),Tab2(i,j)
32   end do
33end do
34
35
36close(22)
37return
38end subroutine write_datfile2
39!> SUBROUTINE: write_datfile3
40!! ecriture of a ZBL file (starting from bottom left)
41!! @param  nxx                dimension along x
42!! @param  nyy                dimension along y
43!! @param  numcol             column number
44!! @param  filename           
45!! @return Tab   
46subroutine write_datfile3(nxx,nyy,Tab1,Tab2,Tab3,filename)
47
48implicit none
49integer,intent(in)  :: nxx                    !< dimension along x
50integer,intent(in)  :: nyy                    !< dimension along y
51character(len=80),intent(in) :: filename      !< name of the file
52real,dimension(nxx,nyy),intent(in) :: Tab1   !< the array that is writen
53real,dimension(nxx,nyy),intent(in) :: Tab2   !< the array that is writen
54real,dimension(nxx,nyy),intent(in) :: Tab3   !< the array that is writen
55
56integer  :: i,j                ! working integers
57integer  :: lx,ly              ! nxx, nyy read in the file
58
59
60open(22,file=trim(filename))
61write(22,*) nxx,nyy  !, xmin,xmax,ymin,ymax ?
62do j=1,nyy
63   do i=1,nxx
64      write(22,*) Tab1(i,j),Tab2(i,j),Tab3(i,j)
65   end do
66end do
67
68
69close(22)
70return
71end subroutine write_datfile3
Note: See TracBrowser for help on using the repository browser.