source: palm/tags/release-5.0/SOURCE/data_log.f90 @ 4418

Last change on this file since 4418 was 2696, checked in by kanani, 6 years ago

Merge of branch palm4u into trunk

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