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 | |
---|
13 | subroutine write_datfile2(nxx,nyy,Tab1,Tab2,filename) |
---|
14 | |
---|
15 | implicit none |
---|
16 | integer,intent(in) :: nxx !< dimension along x |
---|
17 | integer,intent(in) :: nyy !< dimension along y |
---|
18 | character(len=80),intent(in) :: filename !< name of the file |
---|
19 | real,dimension(nxx,nyy),intent(in) :: Tab1 !< the array that is writen |
---|
20 | real,dimension(nxx,nyy),intent(in) :: Tab2 !< the array that is writen |
---|
21 | |
---|
22 | |
---|
23 | integer :: i,j ! working integers |
---|
24 | integer :: lx,ly ! nxx, nyy read in the file |
---|
25 | |
---|
26 | |
---|
27 | open(22,file=trim(filename)) |
---|
28 | write(22,*) nxx,nyy !, xmin,xmax,ymin,ymax ? |
---|
29 | do j=1,nyy |
---|
30 | do i=1,nxx |
---|
31 | write(22,*) Tab1(i,j),Tab2(i,j) |
---|
32 | end do |
---|
33 | end do |
---|
34 | |
---|
35 | |
---|
36 | close(22) |
---|
37 | return |
---|
38 | end 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 |
---|
46 | subroutine write_datfile3(nxx,nyy,Tab1,Tab2,Tab3,filename) |
---|
47 | |
---|
48 | implicit none |
---|
49 | integer,intent(in) :: nxx !< dimension along x |
---|
50 | integer,intent(in) :: nyy !< dimension along y |
---|
51 | character(len=80),intent(in) :: filename !< name of the file |
---|
52 | real,dimension(nxx,nyy),intent(in) :: Tab1 !< the array that is writen |
---|
53 | real,dimension(nxx,nyy),intent(in) :: Tab2 !< the array that is writen |
---|
54 | real,dimension(nxx,nyy),intent(in) :: Tab3 !< the array that is writen |
---|
55 | |
---|
56 | integer :: i,j ! working integers |
---|
57 | integer :: lx,ly ! nxx, nyy read in the file |
---|
58 | |
---|
59 | |
---|
60 | open(22,file=trim(filename)) |
---|
61 | write(22,*) nxx,nyy !, xmin,xmax,ymin,ymax ? |
---|
62 | do j=1,nyy |
---|
63 | do i=1,nxx |
---|
64 | write(22,*) Tab1(i,j),Tab2(i,j),Tab3(i,j) |
---|
65 | end do |
---|
66 | end do |
---|
67 | |
---|
68 | |
---|
69 | close(22) |
---|
70 | return |
---|
71 | end subroutine write_datfile3 |
---|