1 | SUBROUTINE data_log( array, i1, i2, j1, j2, k1, k2 ) |
---|
2 | |
---|
3 | !------------------------------------------------------------------------------! |
---|
4 | ! Actual revisions: |
---|
5 | ! ----------------- |
---|
6 | ! |
---|
7 | ! |
---|
8 | ! Former revisions: |
---|
9 | ! ----------------- |
---|
10 | ! $Log: data_log.f90,v $ |
---|
11 | ! Revision 1.1 2006/02/23 10:09:29 raasch |
---|
12 | ! Initial revision |
---|
13 | ! |
---|
14 | ! |
---|
15 | ! Description: |
---|
16 | ! ------------ |
---|
17 | ! Complete logging of data |
---|
18 | !------------------------------------------------------------------------------! |
---|
19 | #if defined( __logging ) |
---|
20 | |
---|
21 | USE control_parameters |
---|
22 | USE pegrid |
---|
23 | |
---|
24 | IMPLICIT NONE |
---|
25 | |
---|
26 | INTEGER :: i1, i2, j1, j2, k1, k2 |
---|
27 | |
---|
28 | REAL, DIMENSION(i1:i2,j1:j2,k1:k2) :: array |
---|
29 | |
---|
30 | |
---|
31 | ! |
---|
32 | !-- Open the file for data logging |
---|
33 | CALL check_open( 20 ) |
---|
34 | |
---|
35 | ! |
---|
36 | !-- Write the message string |
---|
37 | WRITE ( 20 ) log_message |
---|
38 | |
---|
39 | ! |
---|
40 | !-- Write the simulated time and the array indices |
---|
41 | WRITE ( 20 ) simulated_time, i1, i2, j1, j2, k1, k2 |
---|
42 | |
---|
43 | ! |
---|
44 | !-- Write the array |
---|
45 | WRITE ( 20 ) array |
---|
46 | |
---|
47 | #endif |
---|
48 | END SUBROUTINE data_log |
---|
49 | |
---|
50 | |
---|
51 | |
---|
52 | SUBROUTINE data_log_2d( array, i1, i2, j1, j2) |
---|
53 | |
---|
54 | !------------------------------------------------------------------------------! |
---|
55 | ! Description: |
---|
56 | ! ------------ |
---|
57 | ! Same as above, for 2d arrays |
---|
58 | !------------------------------------------------------------------------------! |
---|
59 | #if defined( __logging ) |
---|
60 | |
---|
61 | USE control_parameters |
---|
62 | USE pegrid |
---|
63 | |
---|
64 | IMPLICIT NONE |
---|
65 | |
---|
66 | INTEGER :: i1, i2, j1, j2 |
---|
67 | |
---|
68 | REAL, DIMENSION(i1:i2,j1:j2) :: array |
---|
69 | |
---|
70 | |
---|
71 | ! |
---|
72 | !-- Open the file for data logging |
---|
73 | CALL check_open( 20 ) |
---|
74 | |
---|
75 | ! |
---|
76 | !-- Write the message string |
---|
77 | WRITE ( 20 ) log_message |
---|
78 | |
---|
79 | ! |
---|
80 | !-- Write the simulated time and the array indices |
---|
81 | WRITE ( 20 ) simulated_time, i1, i2, j1, j2 |
---|
82 | |
---|
83 | ! |
---|
84 | !-- Write the array |
---|
85 | WRITE ( 20 ) array |
---|
86 | |
---|
87 | #endif |
---|
88 | END SUBROUTINE data_log_2d |
---|
89 | |
---|
90 | |
---|
91 | |
---|
92 | SUBROUTINE data_log_2d_int( array, i1, i2, j1, j2) |
---|
93 | |
---|
94 | !------------------------------------------------------------------------------! |
---|
95 | ! Description: |
---|
96 | ! ------------ |
---|
97 | ! Same as above, for 2d integer arrays |
---|
98 | !------------------------------------------------------------------------------! |
---|
99 | #if defined( __logging ) |
---|
100 | |
---|
101 | USE control_parameters |
---|
102 | USE pegrid |
---|
103 | |
---|
104 | IMPLICIT NONE |
---|
105 | |
---|
106 | INTEGER :: i1, i2, j1, j2 |
---|
107 | |
---|
108 | INTEGER, DIMENSION(i1:i2,j1:j2) :: array |
---|
109 | |
---|
110 | |
---|
111 | ! |
---|
112 | !-- Open the file for data logging |
---|
113 | CALL check_open( 20 ) |
---|
114 | |
---|
115 | ! |
---|
116 | !-- Write the message string |
---|
117 | WRITE ( 20 ) log_message |
---|
118 | |
---|
119 | ! |
---|
120 | !-- Write the simulated time and the array indices |
---|
121 | WRITE ( 20 ) simulated_time, i1, i2, j1, j2 |
---|
122 | |
---|
123 | ! |
---|
124 | !-- Write the array |
---|
125 | WRITE ( 20 ) array |
---|
126 | |
---|
127 | #endif |
---|
128 | END SUBROUTINE data_log_2d_int |
---|