source: branches/iLoveclim/SOURCES/write_datfile.f90 @ 244

Last change on this file since 244 was 77, checked in by dumas, 8 years ago

Merge branche iLOVECLIM sur rev 76

File size: 2.1 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
24
25open(22,file=trim(filename))
26write(22,*) nxx,nyy  !, xmin,xmax,ymin,ymax ?
27do j=1,nyy
28   do i=1,nxx
29      write(22,*) Tab1(i,j),Tab2(i,j)
30   end do
31end do
32
33
34close(22)
35return
36end 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   
44subroutine write_datfile3(nxx,nyy,Tab1,Tab2,Tab3,filename)
45
46implicit none
47integer,intent(in)  :: nxx                    !< dimension along x
48integer,intent(in)  :: nyy                    !< dimension along y
49character(len=80),intent(in) :: filename      !< name of the file
50real,dimension(nxx,nyy),intent(in) :: Tab1   !< the array that is writen
51real,dimension(nxx,nyy),intent(in) :: Tab2   !< the array that is writen
52real,dimension(nxx,nyy),intent(in) :: Tab3   !< the array that is writen
53
54integer  :: i,j                ! working integers
55
56open(22,file=trim(filename))
57write(22,*) nxx,nyy  !, xmin,xmax,ymin,ymax ?
58do j=1,nyy
59   do i=1,nxx
60      write(22,*) Tab1(i,j),Tab2(i,j),Tab3(i,j)
61   end do
62end do
63
64
65close(22)
66return
67end subroutine write_datfile3
Note: See TracBrowser for help on using the repository browser.