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

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

former files/routines cpu_log and cpu_statistics combined to one module,
which also includes the former data module cpulog from the modules-file,
module interfaces removed

  • Property svn:keywords set to Id
File size: 3.7 KB
RevLine 
[1]1 SUBROUTINE data_output_tseries
2
[1036]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!
[1310]17! Copyright 1997-2014 Leibniz Universitaet Hannover
[1036]18!--------------------------------------------------------------------------------!
19!
[263]20! Current revisions:
[1]21! -----------------
[1318]22! barrier argument removed from cpu_log.
23! module interfaces removed
[1]24!
25! Former revisions:
26! -----------------
[3]27! $Id: data_output_tseries.f90 1318 2014-03-17 13:35:16Z raasch $
[77]28!
[1093]29! 1092 2013-02-02 11:24:22Z raasch
30! unused variables removed
31!
[1037]32! 1036 2012-10-22 13:43:42Z raasch
33! code put under GPL (PALM 3.9)
34!
[392]35! 291 2009-04-16 12:07:26Z raasch
36! simulated_time in NetCDF output replaced by time_since_reference_point.
37! Output of NetCDF messages with aid of message handling routine.
38!
[77]39! 48 2007-03-06 12:28:36Z raasch
40! Collection of time series quantities moved to routine flow_statistics,
41! output for "profil" removed
42!
[3]43! RCS Log replace by Id keyword, revision history cleaned up
44!
[1]45! Revision 1.13  2006/03/14 12:42:51  raasch
46! Error removed: NetCDF output only if switched on
47!
48! Revision 1.1  1998/03/03 08:00:13  raasch
49! Initial revision
50!
51!
52! Description:
53! ------------
54! Time series output for PROFIL. Always all time series are stored. A selection
55! can be applied via the PROFIL-parameters in close_file.
56!------------------------------------------------------------------------------!
57
58    USE control_parameters
59    USE cpulog
60    USE indices
61    USE netcdf_control
62    USE pegrid
63    USE profil_parameter
64    USE statistics
65
66    IMPLICIT NONE
67
68
[1092]69    INTEGER ::  i, sr
[1]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
[291]90          nc_stat = NF90_PUT_VAR( id_set_ts, id_var_time_ts,        &
91                                  (/ time_since_reference_point /), &
92                                  start = (/ dots_time_count /),    &
[1]93                                  count = (/ 1 /) )
[263]94          CALL handle_netcdf_error( 'data_output_tseries', 350 )
[1]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),  &
[48]107                                        (/ ts_value(i,sr) /),          &
[1]108                                        start = (/ dots_time_count /), &
109                                        count = (/ 1 /) )
[263]110                CALL handle_netcdf_error( 'data_output_tseries', 351 )
[1]111             ENDDO
112          ENDIF
113#endif
114
[48]115       ENDDO
[1]116
117    ENDIF
118
119
[1318]120    CALL cpu_log( log_point(21), 'data_output_tseries', 'stop' )
[1]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.