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

Last change on this file since 2384 was 2101, checked in by suehring, 8 years ago

last commit documented

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