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

Last change on this file since 2964 was 2718, checked in by maronga, 7 years ago

deleting of deprecated files; headers updated where needed

  • Property svn:keywords set to Id
File size: 4.7 KB
RevLine 
[1682]1!> @file data_log.f90
[2000]2!------------------------------------------------------------------------------!
[2696]3! This file is part of the PALM model system.
[1036]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!
[2718]17! Copyright 1997-2018 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 2718 2018-01-02 08:49:38Z Giersch $
[2716]27! Corrected "Former revisions" section
28!
29! 2696 2017-12-14 17:12:51Z kanani
30! Change in file header (GPL part)
[1321]31!
[2716]32! 2101 2017-01-05 16:42:31Z suehring
33!
[2001]34! 2000 2016-08-20 18:09:15Z knoop
35! Forced header and separation lines into 80 columns
36!
[1683]37! 1682 2015-10-07 23:56:08Z knoop
38! Code annotations made doxygen readable
39!
[1321]40! 1320 2014-03-20 08:40:49Z raasch
[1320]41! ONLY-attribute added to USE-statements,
42! kind-parameters added to all INTEGER and REAL declaration statements,
43! kinds are defined in new module kinds,
44! revision history before 2012 removed,
45! comment fields (!:) to be used for variable explanations added to
46! all variable declaration statements
[1]47!
[1037]48! 1036 2012-10-22 13:43:42Z raasch
49! code put under GPL (PALM 3.9)
50!
[3]51! RCS Log replace by Id keyword, revision history cleaned up
52!
[1]53! Revision 1.1  2006/02/23 10:09:29  raasch
54! Initial revision
55!
56!
57! Description:
58! ------------
[1682]59!> Complete logging of data
[1]60!------------------------------------------------------------------------------!
[1682]61 SUBROUTINE data_log( array, i1, i2, j1, j2, k1, k2 )
62 
[1]63#if defined( __logging )
64
[1320]65    USE control_parameters,                                                    &
66        ONLY:  log_message, simulated_time
67       
68    USE kinds
69       
[1]70    USE pegrid
71
72    IMPLICIT NONE
73
[1682]74    INTEGER(iwp) ::  i1  !<
75    INTEGER(iwp) ::  i2  !<
76    INTEGER(iwp) ::  j1  !<
77    INTEGER(iwp) ::  j2  !<
78    INTEGER(iwp) ::  k1  !<
79    INTEGER(iwp) ::  k2  !<
[1]80
[1682]81    REAL(wp), DIMENSION(i1:i2,j1:j2,k1:k2) ::  array  !<
[1]82
83
84!
85!-- Open the file for data logging
86    CALL check_open( 20 )
87
88!
89!-- Write the message string
90    WRITE ( 20 )  log_message
91
92!
93!-- Write the simulated time and the array indices
94    WRITE ( 20 )  simulated_time, i1, i2, j1, j2, k1, k2
95
96!
97!-- Write the array
98    WRITE ( 20 )  array
99
100#endif
101 END SUBROUTINE data_log
102
103
104
105!------------------------------------------------------------------------------!
106! Description:
107! ------------
[1682]108!> Complete logging of data for 2d arrays
[1]109!------------------------------------------------------------------------------!
[1682]110 
111 SUBROUTINE data_log_2d( array, i1, i2, j1, j2)
112
[1]113#if defined( __logging )
114
[1320]115    USE control_parameters,                                                    &
116        ONLY:  log_message, simulated_time
117
118    USE kinds
119           
[1]120    USE pegrid
121
122    IMPLICIT NONE
123
[1682]124    INTEGER(iwp) ::  i1  !<
125    INTEGER(iwp) ::  i2  !<
126    INTEGER(iwp) ::  j1  !<
127    INTEGER(iwp) ::  j2  !<
[1]128
[1682]129    REAL(wp), DIMENSION(i1:i2,j1:j2) ::  array  !<
[1]130
131
132!
133!-- Open the file for data logging
134    CALL check_open( 20 )
135
136!
137!-- Write the message string
138    WRITE ( 20 )  log_message
139
140!
141!-- Write the simulated time and the array indices
142    WRITE ( 20 )  simulated_time, i1, i2, j1, j2
143
144!
145!-- Write the array
146    WRITE ( 20 )  array
147
148#endif
149 END SUBROUTINE data_log_2d
150
151
152
153!------------------------------------------------------------------------------!
154! Description:
155! ------------
[1682]156!> Complete logging of data for 2d integer arrays
[1]157!------------------------------------------------------------------------------!
[1682]158 
159 SUBROUTINE data_log_2d_int( array, i1, i2, j1, j2)
160
[1]161#if defined( __logging )
162
[1320]163    USE control_parameters,                                                    &
164        ONLY:  log_message, simulated_time
165
166    USE kinds
167           
[1]168    USE pegrid
169
170    IMPLICIT NONE
171
[1682]172    INTEGER(iwp) ::  i1  !<
173    INTEGER(iwp) ::  i2  !<
174    INTEGER(iwp) ::  j1  !<
175    INTEGER(iwp) ::  j2  !<
[1]176
[1682]177    INTEGER(iwp), DIMENSION(i1:i2,j1:j2) ::  array  !<
[1]178
179
180!
181!-- Open the file for data logging
182    CALL check_open( 20 )
183
184!
185!-- Write the message string
186    WRITE ( 20 )  log_message
187
188!
189!-- Write the simulated time and the array indices
190    WRITE ( 20 )  simulated_time, i1, i2, j1, j2
191
192!
193!-- Write the array
194    WRITE ( 20 )  array
195
196#endif
197 END SUBROUTINE data_log_2d_int
Note: See TracBrowser for help on using the repository browser.