1 | include(dom.inc)
2 |
3 | SUBROUTINE outprocessing
4 |
5 | ! ================================================================!
6 | ! !
7 | ! outprocessing.F : Creates output files. !
8 | ! !
9 | ! out : !
10 | ! !
11 | ! author : J. AMAYA (october 2007) !
12 | ! !
13 | ! ================================================================!
14 |
15 | USE mod_inout
16 | USE mod_prissma
17 |
18 | IMPLICIT NONE
19 |
20 | include 'dom_constants.h'
21 |
22 | ! IN
23 |
24 | ! LOCAL
25 | DOM_REAL :: Qw, Qwmax, Qwmin
26 | DOM_INT :: i, j, l, k, iface
27 |
28 | CHARACTER*80 :: GFile, SrFile, HFile, QwFile, QrFile
29 |
30 | ! ---------------------------------------------------------!
31 | ! Version 2.04 output files with data in the cell's center !
32 | ! ---------------------------------------------------------!
33 |
34 | GFile = trim(outpath)//'/G.out'
35 | SrFile = trim(outpath)//'/Sr.out'
36 | HFile = trim(outpath)//'/H.out'
37 | QwFile = trim(outpath)//'/Qw.out'
38 | QrFile = trim(outpath)//'/Qr.out'
39 |
40 | OPEN(FILE_G ,FILE=Gfile ,FORM='UNFORMATTED')
41 | OPEN(FILE_Sr,FILE=SrFile,FORM='UNFORMATTED')
42 | OPEN(FILE_H ,FILE=HFile ,FORM='UNFORMATTED')
43 | OPEN(FILE_Qw,FILE=QwFile,FORM='UNFORMATTED')
44 | OPEN(FILE_Qr,FILE=QrFile,FORM='UNFORMATTED')
45 |
46 | Qwmax = 1.0d-10
47 | Qwmin = 1.0d10
48 |
49 | DO j=1,i_dom_ncells
50 |
51 | WRITE(FILE_G ) j,Gtot(j)
52 | WRITE(FILE_Sr) j,Srtot(j)
53 | WRITE(FILE_Qr) j,(Q_rtot(i,j),i=1,3)
54 |
55 | DO i=1,nfcelt(i)
56 |
57 | IF (epsil(i,j).ne.-1.) THEN
58 |
59 | WRITE(FILE_H ) i,j,Htot(i,j)
60 |
61 | ! Qw = epsil(i,j)*Htot(i,j)-pi*Lotot(i,j)
62 | Qw = Q_rtot(1,j)*norm(1,i,j) + &
63 | & Q_rtot(2,j)*norm(2,i,j) + &
64 | & Q_rtot(3,j)*norm(3,i,j)
65 | WRITE(FILE_Qw) i,j,Qw
66 | IF (Qw.lt.Qwmin) Qwmin = Qw
67 | IF (Qw.gt.Qwmax) Qwmax = Qw
68 |
69 | ENDIF
70 |
71 | ENDDO
72 |
73 | ENDDO
74 |
75 | CLOSE(FILE_G )
76 | CLOSE(FILE_Sr)
77 | CLOSE(FILE_H )
78 | CLOSE(FILE_Qw)
79 | CLOSE(FILE_Qr)
80 |
81 | WRITE(*,*) " -------------"
82 | WRITE(*,*) " *-> H max = ", MAXVAL(Htot)
83 | WRITE(*,*) " *-> H min = ", MINVAL(Htot)
84 | WRITE(*,*) " -------------"
85 | WRITE(*,*) " *-> Qw max = ", Qwmax
86 | WRITE(*,*) " *-> Qw min = ", Qwmin
87 | WRITE(*,*) " -------------"
88 | WRITE(*,*) " *-> Sr max = ", MAXVAL(Srtot)
89 | WRITE(*,*) " *-> Sr min = ", MINVAL(Srtot)
90 | WRITE(*,*) " -------------"
91 |
92 | END SUBROUTINE outprocessing
outprocessing.F could be called by: