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

Last change on this file since 1682 was 1682, checked in by knoop, 9 years ago

Code annotations made doxygen readable

  • Property svn:keywords set to Id
File size: 4.4 KB
RevLine 
[1682]1!> @file data_output_tseries.f90
[1036]2!--------------------------------------------------------------------------------!
3! This file is part of PALM.
4!
5! PALM is free software: you can redistribute it and/or modify it under the terms
6! of the GNU General Public License as published by the Free Software Foundation,
7! either version 3 of the License, or (at your option) any later version.
8!
9! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
10! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
11! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
12!
13! You should have received a copy of the GNU General Public License along with
14! PALM. If not, see <http://www.gnu.org/licenses/>.
15!
[1310]16! Copyright 1997-2014 Leibniz Universitaet Hannover
[1036]17!--------------------------------------------------------------------------------!
18!
[263]19! Current revisions:
[1]20! -----------------
[1682]21! Code annotations made doxygen readable
[1329]22!
[1321]23! Former revisions:
24! -----------------
25! $Id: data_output_tseries.f90 1682 2015-10-07 23:56:08Z knoop $
26!
[1525]27! 1524 2015-01-14 13:18:19Z keck
28! Bugfix: increment dots_time_count after the call of subroutine check_open
29!
[1329]30! 1327 2014-03-21 11:00:16Z raasch
31! -netcdf output queries
32!
[1321]33! 1320 2014-03-20 08:40:49Z raasch
[1320]34! ONLY-attribute added to USE-statements,
35! kind-parameters added to all INTEGER and REAL declaration statements,
36! kinds are defined in new module kinds,
37! revision history before 2012 removed,
38! comment fields (!:) to be used for variable explanations added to
39! all variable declaration statements
[1]40!
[1319]41! 1318 2014-03-17 13:35:16Z raasch
42! barrier argument removed from cpu_log.
43! module interfaces removed
44!
[1093]45! 1092 2013-02-02 11:24:22Z raasch
46! unused variables removed
47!
[1037]48! 1036 2012-10-22 13:43:42Z raasch
49! code put under GPL (PALM 3.9)
50!
[1]51! Revision 1.1  1998/03/03 08:00:13  raasch
52! Initial revision
53!
54!
55! Description:
56! ------------
[1682]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.
[1]59!------------------------------------------------------------------------------!
[1682]60 SUBROUTINE data_output_tseries
61 
[1]62
[1320]63    USE control_parameters,                                                    &
[1327]64        ONLY:  dots_time_count, time_since_reference_point
[1320]65
66    USE cpulog,                                                                &
67        ONLY:  cpu_log, log_point 
68
69    USE kinds
70
[1]71    USE netcdf_control
[1320]72
[1]73    USE pegrid
[1320]74
[1]75    USE profil_parameter
[1320]76   
77    USE statistics,                                                            &
78        ONLY:  flow_statistics_called, statistic_regions, ts_value
[1]79
80    IMPLICIT NONE
81
82
[1682]83    INTEGER(iwp) ::  i  !<
84    INTEGER(iwp) ::  sr !<
[1]85
86
87!
88!-- If required, compute statistics.
89    IF ( .NOT. flow_statistics_called )  CALL flow_statistics
90
91!
92!-- Flow_statistics has its own cpu-time measuring.
93    CALL cpu_log( log_point(21), 'data_output_tseries', 'start' )
94
95    IF ( myid == 0 )  THEN
96
97!
98!--    Open file for time series output in NetCDF format
[1524]99       CALL check_open( 105 )
100       
101!--    Increment the counter for number of output times
102!      CAUTION: The following line has to be after the call of the subroutine
103!               check_open, since check_open resets the counter dots_time_count
104!               to 0, if a new file is opened
[1327]105       dots_time_count = dots_time_count + 1
[1524]106       
[1]107#if defined( __netcdf )
108!
[1327]109!--    Update the time series time axis
110       nc_stat = NF90_PUT_VAR( id_set_ts, id_var_time_ts,        &
111                               (/ time_since_reference_point /), &
112                               start = (/ dots_time_count /),    &
113                               count = (/ 1 /) )
114       CALL handle_netcdf_error( 'data_output_tseries', 350 )
[1]115#endif
116
117!
118!--    Time series output for the total domain (and each subregion, if
119!--    applicable)
120       DO  sr = 0, statistic_regions
121
122#if defined( __netcdf )
[1327]123          DO  i = 1, dots_num
124             nc_stat = NF90_PUT_VAR( id_set_ts, id_var_dots(i,sr),  &
125                                     (/ ts_value(i,sr) /),          &
126                                     start = (/ dots_time_count /), &
127                                     count = (/ 1 /) )
128             CALL handle_netcdf_error( 'data_output_tseries', 351 )
129          ENDDO
[1]130#endif
131
[48]132       ENDDO
[1]133
134    ENDIF
135
136
[1318]137    CALL cpu_log( log_point(21), 'data_output_tseries', 'stop' )
[1]138
139!
140!-- formats
141500 FORMAT (23(E15.7,1X))
142
143 END SUBROUTINE data_output_tseries
Note: See TracBrowser for help on using the repository browser.