source: palm/trunk/SOURCE/data_output_tseries.f90 @ 1319

Last change on this file since 1319 was 1319, checked in by raasch, 10 years ago

last commit documented

  • Property svn:keywords set to Id
File size: 3.7 KB
Line 
1 SUBROUTINE data_output_tseries
2
3!--------------------------------------------------------------------------------!
4! This file is part of PALM.
5!
6! PALM is free software: you can redistribute it and/or modify it under the terms
7! of the GNU General Public License as published by the Free Software Foundation,
8! either version 3 of the License, or (at your option) any later 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-2014 Leibniz Universitaet Hannover
18!--------------------------------------------------------------------------------!
19!
20! Current revisions:
21! -----------------
22!
23!
24! Former revisions:
25! -----------------
26! $Id: data_output_tseries.f90 1319 2014-03-17 15:08:44Z raasch $
27!
28! 1318 2014-03-17 13:35:16Z raasch
29! barrier argument removed from cpu_log.
30! module interfaces removed
31!
32! 1092 2013-02-02 11:24:22Z raasch
33! unused variables removed
34!
35! 1036 2012-10-22 13:43:42Z raasch
36! code put under GPL (PALM 3.9)
37!
38! 291 2009-04-16 12:07:26Z raasch
39! simulated_time in NetCDF output replaced by time_since_reference_point.
40! Output of NetCDF messages with aid of message handling routine.
41!
42! 48 2007-03-06 12:28:36Z raasch
43! Collection of time series quantities moved to routine flow_statistics,
44! output for "profil" removed
45!
46! RCS Log replace by Id keyword, revision history cleaned up
47!
48! Revision 1.13  2006/03/14 12:42:51  raasch
49! Error removed: NetCDF output only if switched on
50!
51! Revision 1.1  1998/03/03 08:00:13  raasch
52! Initial revision
53!
54!
55! Description:
56! ------------
57! Time series output for PROFIL. Always all time series are stored. A selection
58! can be applied via the PROFIL-parameters in close_file.
59!------------------------------------------------------------------------------!
60
61    USE control_parameters
62    USE cpulog
63    USE indices
64    USE netcdf_control
65    USE pegrid
66    USE profil_parameter
67    USE statistics
68
69    IMPLICIT NONE
70
71
72    INTEGER ::  i, sr
73
74
75!
76!-- If required, compute statistics.
77    IF ( .NOT. flow_statistics_called )  CALL flow_statistics
78
79!
80!-- Flow_statistics has its own cpu-time measuring.
81    CALL cpu_log( log_point(21), 'data_output_tseries', 'start' )
82
83    IF ( myid == 0 )  THEN
84
85!
86!--    Open file for time series output in NetCDF format
87       IF ( netcdf_output )  THEN
88          dots_time_count = dots_time_count + 1
89          CALL check_open( 105 )
90#if defined( __netcdf )
91!
92!--       Update the time series time axis
93          nc_stat = NF90_PUT_VAR( id_set_ts, id_var_time_ts,        &
94                                  (/ time_since_reference_point /), &
95                                  start = (/ dots_time_count /),    &
96                                  count = (/ 1 /) )
97          CALL handle_netcdf_error( 'data_output_tseries', 350 )
98#endif
99       ENDIF
100
101!
102!--    Time series output for the total domain (and each subregion, if
103!--    applicable)
104       DO  sr = 0, statistic_regions
105
106#if defined( __netcdf )
107          IF ( netcdf_output )  THEN
108             DO  i = 1, dots_num
109                nc_stat = NF90_PUT_VAR( id_set_ts, id_var_dots(i,sr),  &
110                                        (/ ts_value(i,sr) /),          &
111                                        start = (/ dots_time_count /), &
112                                        count = (/ 1 /) )
113                CALL handle_netcdf_error( 'data_output_tseries', 351 )
114             ENDDO
115          ENDIF
116#endif
117
118       ENDDO
119
120    ENDIF
121
122
123    CALL cpu_log( log_point(21), 'data_output_tseries', 'stop' )
124
125!
126!-- formats
127500 FORMAT (23(E15.7,1X))
128
129 END SUBROUTINE data_output_tseries
Note: See TracBrowser for help on using the repository browser.