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

Last change on this file since 1315 was 1310, checked in by raasch, 11 years ago

update of GPL copyright

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