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

Last change on this file since 1036 was 1036, checked in by raasch, 9 years ago

code has been put under the GNU General Public License (v3)

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