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

Last change on this file since 4180 was 4180, checked in by scharf, 5 years ago

removed comments in 'Former revisions' section that are older than 01.01.2019

  • Property svn:keywords set to Id
File size: 3.9 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-2019 Leibniz Universitaet Hannover
18!------------------------------------------------------------------------------!
19!
20! Current revisions:
21! -----------------
22!
23!
24! Former revisions:
25! -----------------
26! $Id: data_log.f90 4180 2019-08-21 14:37:54Z scharf $
27! preprocessor directives removed to avoid compiler warnings
28!
29! 3655 2019-01-07 16:51:22Z knoop
30! Corrected "Former revisions" section
31!
32!
33! Description:
34! ------------
35!> Complete logging of data
36!------------------------------------------------------------------------------!
37 SUBROUTINE data_log( array, i1, i2, j1, j2, k1, k2 )
38 
39    USE control_parameters,                                                    &
40        ONLY:  log_message, simulated_time
41       
42    USE kinds
43       
44    USE pegrid
45
46    IMPLICIT NONE
47
48    INTEGER(iwp) ::  i1  !<
49    INTEGER(iwp) ::  i2  !<
50    INTEGER(iwp) ::  j1  !<
51    INTEGER(iwp) ::  j2  !<
52    INTEGER(iwp) ::  k1  !<
53    INTEGER(iwp) ::  k2  !<
54
55    REAL(wp), DIMENSION(i1:i2,j1:j2,k1:k2) ::  array  !<
56
57
58!
59!-- Open the file for data logging
60    CALL check_open( 20 )
61
62!
63!-- Write the message string
64    WRITE ( 20 )  log_message
65
66!
67!-- Write the simulated time and the array indices
68    WRITE ( 20 )  simulated_time, i1, i2, j1, j2, k1, k2
69
70!
71!-- Write the array
72    WRITE ( 20 )  array
73
74 END SUBROUTINE data_log
75
76
77
78!------------------------------------------------------------------------------!
79! Description:
80! ------------
81!> Complete logging of data for 2d arrays
82!------------------------------------------------------------------------------!
83 
84 SUBROUTINE data_log_2d( array, i1, i2, j1, j2)
85
86    USE control_parameters,                                                    &
87        ONLY:  log_message, simulated_time
88
89    USE kinds
90           
91    USE pegrid
92
93    IMPLICIT NONE
94
95    INTEGER(iwp) ::  i1  !<
96    INTEGER(iwp) ::  i2  !<
97    INTEGER(iwp) ::  j1  !<
98    INTEGER(iwp) ::  j2  !<
99
100    REAL(wp), DIMENSION(i1:i2,j1:j2) ::  array  !<
101
102
103!
104!-- Open the file for data logging
105    CALL check_open( 20 )
106
107!
108!-- Write the message string
109    WRITE ( 20 )  log_message
110
111!
112!-- Write the simulated time and the array indices
113    WRITE ( 20 )  simulated_time, i1, i2, j1, j2
114
115!
116!-- Write the array
117    WRITE ( 20 )  array
118
119 END SUBROUTINE data_log_2d
120
121
122
123!------------------------------------------------------------------------------!
124! Description:
125! ------------
126!> Complete logging of data for 2d integer arrays
127!------------------------------------------------------------------------------!
128 
129 SUBROUTINE data_log_2d_int( array, i1, i2, j1, j2)
130
131    USE control_parameters,                                                    &
132        ONLY:  log_message, simulated_time
133
134    USE kinds
135           
136    USE pegrid
137
138    IMPLICIT NONE
139
140    INTEGER(iwp) ::  i1  !<
141    INTEGER(iwp) ::  i2  !<
142    INTEGER(iwp) ::  j1  !<
143    INTEGER(iwp) ::  j2  !<
144
145    INTEGER(iwp), DIMENSION(i1:i2,j1:j2) ::  array  !<
146
147
148!
149!-- Open the file for data logging
150    CALL check_open( 20 )
151
152!
153!-- Write the message string
154    WRITE ( 20 )  log_message
155
156!
157!-- Write the simulated time and the array indices
158    WRITE ( 20 )  simulated_time, i1, i2, j1, j2
159
160!
161!-- Write the array
162    WRITE ( 20 )  array
163
164 END SUBROUTINE data_log_2d_int
Note: See TracBrowser for help on using the repository browser.