[4] | 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 | |
---|
| 25 | open(22,file=trim(filename)) |
---|
| 26 | write(22,*) nxx,nyy !, xmin,xmax,ymin,ymax ? |
---|
| 27 | do j=1,nyy |
---|
| 28 | do i=1,nxx |
---|
| 29 | write(22,*) Tab1(i,j),Tab2(i,j) |
---|
| 30 | end do |
---|
| 31 | end do |
---|
| 32 | |
---|
| 33 | |
---|
| 34 | close(22) |
---|
| 35 | return |
---|
| 36 | end subroutine write_datfile2 |
---|
| 37 | !> SUBROUTINE: write_datfile3 |
---|
| 38 | !! ecriture of a ZBL file (starting from bottom left) |
---|
| 39 | !! @param nxx dimension along x |
---|
| 40 | !! @param nyy dimension along y |
---|
| 41 | !! @param numcol column number |
---|
| 42 | !! @param filename |
---|
| 43 | !! @return Tab |
---|
| 44 | subroutine write_datfile3(nxx,nyy,Tab1,Tab2,Tab3,filename) |
---|
| 45 | |
---|
| 46 | implicit none |
---|
| 47 | integer,intent(in) :: nxx !< dimension along x |
---|
| 48 | integer,intent(in) :: nyy !< dimension along y |
---|
| 49 | character(len=80),intent(in) :: filename !< name of the file |
---|
| 50 | real,dimension(nxx,nyy),intent(in) :: Tab1 !< the array that is writen |
---|
| 51 | real,dimension(nxx,nyy),intent(in) :: Tab2 !< the array that is writen |
---|
| 52 | real,dimension(nxx,nyy),intent(in) :: Tab3 !< the array that is writen |
---|
| 53 | |
---|
| 54 | integer :: i,j ! working integers |
---|
| 55 | |
---|
| 56 | open(22,file=trim(filename)) |
---|
| 57 | write(22,*) nxx,nyy !, xmin,xmax,ymin,ymax ? |
---|
| 58 | do j=1,nyy |
---|
| 59 | do i=1,nxx |
---|
| 60 | write(22,*) Tab1(i,j),Tab2(i,j),Tab3(i,j) |
---|
| 61 | end do |
---|
| 62 | end do |
---|
| 63 | |
---|
| 64 | |
---|
| 65 | close(22) |
---|
| 66 | return |
---|
| 67 | end subroutine write_datfile3 |
---|