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

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

last commit documented

  • Property svn:keywords set to Id
File size: 4.4 KB
RevLine 
[1682]1!> @file data_log.f90
[1036]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!
[1310]16! Copyright 1997-2014 Leibniz Universitaet Hannover
[1036]17!--------------------------------------------------------------------------------!
18!
[484]19! Current revisions:
[1]20! -----------------
[1683]21!
22!
[1321]23! Former revisions:
24! -----------------
25! $Id: data_log.f90 1683 2015-10-07 23:57:51Z raasch $
26!
[1683]27! 1682 2015-10-07 23:56:08Z knoop
28! Code annotations made doxygen readable
29!
[1321]30! 1320 2014-03-20 08:40:49Z raasch
[1320]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
[1]37!
[1037]38! 1036 2012-10-22 13:43:42Z raasch
39! code put under GPL (PALM 3.9)
40!
[3]41! RCS Log replace by Id keyword, revision history cleaned up
42!
[1]43! Revision 1.1  2006/02/23 10:09:29  raasch
44! Initial revision
45!
46!
47! Description:
48! ------------
[1682]49!> Complete logging of data
[1]50!------------------------------------------------------------------------------!
[1682]51 SUBROUTINE data_log( array, i1, i2, j1, j2, k1, k2 )
52 
[1]53#if defined( __logging )
54
[1320]55    USE control_parameters,                                                    &
56        ONLY:  log_message, simulated_time
57       
58    USE kinds
59       
[1]60    USE pegrid
61
62    IMPLICIT NONE
63
[1682]64    INTEGER(iwp) ::  i1  !<
65    INTEGER(iwp) ::  i2  !<
66    INTEGER(iwp) ::  j1  !<
67    INTEGER(iwp) ::  j2  !<
68    INTEGER(iwp) ::  k1  !<
69    INTEGER(iwp) ::  k2  !<
[1]70
[1682]71    REAL(wp), DIMENSION(i1:i2,j1:j2,k1:k2) ::  array  !<
[1]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! ------------
[1682]98!> Complete logging of data for 2d arrays
[1]99!------------------------------------------------------------------------------!
[1682]100 
101 SUBROUTINE data_log_2d( array, i1, i2, j1, j2)
102
[1]103#if defined( __logging )
104
[1320]105    USE control_parameters,                                                    &
106        ONLY:  log_message, simulated_time
107
108    USE kinds
109           
[1]110    USE pegrid
111
112    IMPLICIT NONE
113
[1682]114    INTEGER(iwp) ::  i1  !<
115    INTEGER(iwp) ::  i2  !<
116    INTEGER(iwp) ::  j1  !<
117    INTEGER(iwp) ::  j2  !<
[1]118
[1682]119    REAL(wp), DIMENSION(i1:i2,j1:j2) ::  array  !<
[1]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! ------------
[1682]146!> Complete logging of data for 2d integer arrays
[1]147!------------------------------------------------------------------------------!
[1682]148 
149 SUBROUTINE data_log_2d_int( array, i1, i2, j1, j2)
150
[1]151#if defined( __logging )
152
[1320]153    USE control_parameters,                                                    &
154        ONLY:  log_message, simulated_time
155
156    USE kinds
157           
[1]158    USE pegrid
159
160    IMPLICIT NONE
161
[1682]162    INTEGER(iwp) ::  i1  !<
163    INTEGER(iwp) ::  i2  !<
164    INTEGER(iwp) ::  j1  !<
165    INTEGER(iwp) ::  j2  !<
[1]166
[1682]167    INTEGER(iwp), DIMENSION(i1:i2,j1:j2) ::  array  !<
[1]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.