source: palm/trunk/SOURCE/data_log.f90 @ 1727

Last change on this file since 1727 was 1683, checked in by knoop, 9 years ago

last commit documented

  • Property svn:keywords set to Id
File size: 4.4 KB
Line 
1!> @file data_log.f90
2!--------------------------------------------------------------------------------!
3! This file is part of PALM.
4!
5! PALM is free software: you can redistribute it and/or modify it under the terms
6! of the GNU General Public License as published by the Free Software Foundation,
7! either version 3 of the License, or (at your option) any later version.
8!
9! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
10! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
11! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
12!
13! You should have received a copy of the GNU General Public License along with
14! PALM. If not, see <http://www.gnu.org/licenses/>.
15!
16! Copyright 1997-2014 Leibniz Universitaet Hannover
17!--------------------------------------------------------------------------------!
18!
19! Current revisions:
20! -----------------
21!
22!
23! Former revisions:
24! -----------------
25! $Id: data_log.f90 1683 2015-10-07 23:57:51Z knoop $
26!
27! 1682 2015-10-07 23:56:08Z knoop
28! Code annotations made doxygen readable
29!
30! 1320 2014-03-20 08:40:49Z raasch
31! ONLY-attribute added to USE-statements,
32! kind-parameters added to all INTEGER and REAL declaration statements,
33! kinds are defined in new module kinds,
34! revision history before 2012 removed,
35! comment fields (!:) to be used for variable explanations added to
36! all variable declaration statements
37!
38! 1036 2012-10-22 13:43:42Z raasch
39! code put under GPL (PALM 3.9)
40!
41! RCS Log replace by Id keyword, revision history cleaned up
42!
43! Revision 1.1  2006/02/23 10:09:29  raasch
44! Initial revision
45!
46!
47! Description:
48! ------------
49!> Complete logging of data
50!------------------------------------------------------------------------------!
51 SUBROUTINE data_log( array, i1, i2, j1, j2, k1, k2 )
52 
53#if defined( __logging )
54
55    USE control_parameters,                                                    &
56        ONLY:  log_message, simulated_time
57       
58    USE kinds
59       
60    USE pegrid
61
62    IMPLICIT NONE
63
64    INTEGER(iwp) ::  i1  !<
65    INTEGER(iwp) ::  i2  !<
66    INTEGER(iwp) ::  j1  !<
67    INTEGER(iwp) ::  j2  !<
68    INTEGER(iwp) ::  k1  !<
69    INTEGER(iwp) ::  k2  !<
70
71    REAL(wp), DIMENSION(i1:i2,j1:j2,k1:k2) ::  array  !<
72
73
74!
75!-- Open the file for data logging
76    CALL check_open( 20 )
77
78!
79!-- Write the message string
80    WRITE ( 20 )  log_message
81
82!
83!-- Write the simulated time and the array indices
84    WRITE ( 20 )  simulated_time, i1, i2, j1, j2, k1, k2
85
86!
87!-- Write the array
88    WRITE ( 20 )  array
89
90#endif
91 END SUBROUTINE data_log
92
93
94
95!------------------------------------------------------------------------------!
96! Description:
97! ------------
98!> Complete logging of data for 2d arrays
99!------------------------------------------------------------------------------!
100 
101 SUBROUTINE data_log_2d( array, i1, i2, j1, j2)
102
103#if defined( __logging )
104
105    USE control_parameters,                                                    &
106        ONLY:  log_message, simulated_time
107
108    USE kinds
109           
110    USE pegrid
111
112    IMPLICIT NONE
113
114    INTEGER(iwp) ::  i1  !<
115    INTEGER(iwp) ::  i2  !<
116    INTEGER(iwp) ::  j1  !<
117    INTEGER(iwp) ::  j2  !<
118
119    REAL(wp), DIMENSION(i1:i2,j1:j2) ::  array  !<
120
121
122!
123!-- Open the file for data logging
124    CALL check_open( 20 )
125
126!
127!-- Write the message string
128    WRITE ( 20 )  log_message
129
130!
131!-- Write the simulated time and the array indices
132    WRITE ( 20 )  simulated_time, i1, i2, j1, j2
133
134!
135!-- Write the array
136    WRITE ( 20 )  array
137
138#endif
139 END SUBROUTINE data_log_2d
140
141
142
143!------------------------------------------------------------------------------!
144! Description:
145! ------------
146!> Complete logging of data for 2d integer arrays
147!------------------------------------------------------------------------------!
148 
149 SUBROUTINE data_log_2d_int( array, i1, i2, j1, j2)
150
151#if defined( __logging )
152
153    USE control_parameters,                                                    &
154        ONLY:  log_message, simulated_time
155
156    USE kinds
157           
158    USE pegrid
159
160    IMPLICIT NONE
161
162    INTEGER(iwp) ::  i1  !<
163    INTEGER(iwp) ::  i2  !<
164    INTEGER(iwp) ::  j1  !<
165    INTEGER(iwp) ::  j2  !<
166
167    INTEGER(iwp), DIMENSION(i1:i2,j1:j2) ::  array  !<
168
169
170!
171!-- Open the file for data logging
172    CALL check_open( 20 )
173
174!
175!-- Write the message string
176    WRITE ( 20 )  log_message
177
178!
179!-- Write the simulated time and the array indices
180    WRITE ( 20 )  simulated_time, i1, i2, j1, j2
181
182!
183!-- Write the array
184    WRITE ( 20 )  array
185
186#endif
187 END SUBROUTINE data_log_2d_int
Note: See TracBrowser for help on using the repository browser.