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

Last change on this file since 4765 was 4559, checked in by raasch, 4 years ago

files re-formatted to follow the PALM coding standard

  • Property svn:keywords set to Id
File size: 4.2 KB
RevLine 
[1682]1!> @file data_log.f90
[4559]2!--------------------------------------------------------------------------------------------------!
[2696]3! This file is part of the PALM model system.
[1036]4!
[4559]5! PALM is free software: you can redistribute it and/or modify it under the terms of the GNU General
6! Public License as published by the Free Software Foundation, either version 3 of the License, or
7! (at your option) any later version.
[1036]8!
[4559]9! PALM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
10! implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
11! Public License for more details.
[1036]12!
[4559]13! You should have received a copy of the GNU General Public License along with PALM. If not, see
14! <http://www.gnu.org/licenses/>.
[1036]15!
[4360]16! Copyright 1997-2020 Leibniz Universitaet Hannover
[4559]17!--------------------------------------------------------------------------------------------------!
[1036]18!
[484]19! Current revisions:
[1]20! -----------------
[1683]21!
[2001]22!
[1321]23! Former revisions:
24! -----------------
25! $Id: data_log.f90 4559 2020-06-11 08:51:48Z Giersch $
[4559]26! file re-formatted to follow the PALM coding standard
27!
28! 4360 2020-01-07 11:25:50Z suehring
[4182]29! Corrected "Former revisions" section
[4559]30!
[4182]31! 3725 2019-02-07 10:11:02Z raasch
[3725]32! preprocessor directives removed to avoid compiler warnings
[4559]33!
[3725]34! 3655 2019-01-07 16:51:22Z knoop
[2716]35! Corrected "Former revisions" section
[1321]36!
[4182]37! Revision 1.1  2006/02/23 10:09:29  raasch
38! Initial revision
39!
40!
[1]41! Description:
42! ------------
[1682]43!> Complete logging of data
[4559]44!--------------------------------------------------------------------------------------------------!
[1682]45 SUBROUTINE data_log( array, i1, i2, j1, j2, k1, k2 )
[4559]46
47    USE control_parameters,                                                                        &
[1320]48        ONLY:  log_message, simulated_time
[4559]49
[1320]50    USE kinds
[4559]51
[1]52    USE pegrid
53
54    IMPLICIT NONE
55
[4559]56    INTEGER(iwp) ::  i1  !<
57    INTEGER(iwp) ::  i2  !<
58    INTEGER(iwp) ::  j1  !<
59    INTEGER(iwp) ::  j2  !<
60    INTEGER(iwp) ::  k1  !<
61    INTEGER(iwp) ::  k2  !<
[1]62
[4559]63    REAL(wp), DIMENSION(i1:i2,j1:j2,k1:k2) ::  array  !<
[1]64
65
66!
67!-- Open the file for data logging
68    CALL check_open( 20 )
69
70!
71!-- Write the message string
72    WRITE ( 20 )  log_message
73
74!
75!-- Write the simulated time and the array indices
76    WRITE ( 20 )  simulated_time, i1, i2, j1, j2, k1, k2
77
78!
79!-- Write the array
80    WRITE ( 20 )  array
81
82 END SUBROUTINE data_log
83
84
85
[4559]86!--------------------------------------------------------------------------------------------------!
[1]87! Description:
88! ------------
[1682]89!> Complete logging of data for 2d arrays
[4559]90!--------------------------------------------------------------------------------------------------!
91
[1682]92 SUBROUTINE data_log_2d( array, i1, i2, j1, j2)
93
[4559]94    USE control_parameters,                                                                        &
[1320]95        ONLY:  log_message, simulated_time
96
97    USE kinds
[4559]98
[1]99    USE pegrid
100
101    IMPLICIT NONE
102
[4559]103    INTEGER(iwp) ::  i1  !<
104    INTEGER(iwp) ::  i2  !<
105    INTEGER(iwp) ::  j1  !<
106    INTEGER(iwp) ::  j2  !<
[1]107
[4559]108    REAL(wp), DIMENSION(i1:i2,j1:j2) ::  array  !<
[1]109
110
111!
112!-- Open the file for data logging
113    CALL check_open( 20 )
114
115!
116!-- Write the message string
117    WRITE ( 20 )  log_message
118
119!
120!-- Write the simulated time and the array indices
121    WRITE ( 20 )  simulated_time, i1, i2, j1, j2
122
123!
124!-- Write the array
125    WRITE ( 20 )  array
126
127 END SUBROUTINE data_log_2d
128
129
130
[4559]131!--------------------------------------------------------------------------------------------------!
[1]132! Description:
133! ------------
[1682]134!> Complete logging of data for 2d integer arrays
[4559]135!--------------------------------------------------------------------------------------------------!
136
[1682]137 SUBROUTINE data_log_2d_int( array, i1, i2, j1, j2)
138
[4559]139    USE control_parameters,                                                                        &
[1320]140        ONLY:  log_message, simulated_time
141
142    USE kinds
[4559]143
[1]144    USE pegrid
145
146    IMPLICIT NONE
147
[4559]148    INTEGER(iwp) ::  i1  !<
149    INTEGER(iwp) ::  i2  !<
150    INTEGER(iwp) ::  j1  !<
151    INTEGER(iwp) ::  j2  !<
[1]152
[4559]153    INTEGER(iwp), DIMENSION(i1:i2,j1:j2) ::  array  !<
[1]154
155
156!
157!-- Open the file for data logging
158    CALL check_open( 20 )
159
160!
161!-- Write the message string
162    WRITE ( 20 )  log_message
163
164!
165!-- Write the simulated time and the array indices
166    WRITE ( 20 )  simulated_time, i1, i2, j1, j2
167
168!
169!-- Write the array
170    WRITE ( 20 )  array
171
172 END SUBROUTINE data_log_2d_int
Note: See TracBrowser for help on using the repository browser.