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

Last change on this file since 4141 was 3725, checked in by raasch, 6 years ago

modifications to avoid compiler warnings about unused variables, temperton-fft: GOTO statements replaced, file re-formatted corresponding to coding standards, ssh-calls for compilations on remote systems modified to avoid output of login messages on specific systems changed again (palmbuild, reverted as before r3549), error messages for failed restarts extended (palmrun)

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