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

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

last commit documented

  • 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! -----------------
[1329]21!
[1683]22!
[1321]23! Former revisions:
24! -----------------
25! $Id: data_output_tseries.f90 1683 2015-10-07 23:57:51Z raasch $
26!
[1683]27! 1682 2015-10-07 23:56:08Z knoop
28! Code annotations made doxygen readable
29!
[1525]30! 1524 2015-01-14 13:18:19Z keck
31! Bugfix: increment dots_time_count after the call of subroutine check_open
32!
[1329]33! 1327 2014-03-21 11:00:16Z raasch
34! -netcdf output queries
35!
[1321]36! 1320 2014-03-20 08:40:49Z raasch
[1320]37! ONLY-attribute added to USE-statements,
38! kind-parameters added to all INTEGER and REAL declaration statements,
39! kinds are defined in new module kinds,
40! revision history before 2012 removed,
41! comment fields (!:) to be used for variable explanations added to
42! all variable declaration statements
[1]43!
[1319]44! 1318 2014-03-17 13:35:16Z raasch
45! barrier argument removed from cpu_log.
46! module interfaces removed
47!
[1093]48! 1092 2013-02-02 11:24:22Z raasch
49! unused variables removed
50!
[1037]51! 1036 2012-10-22 13:43:42Z raasch
52! code put under GPL (PALM 3.9)
53!
[1]54! Revision 1.1  1998/03/03 08:00:13  raasch
55! Initial revision
56!
57!
58! Description:
59! ------------
[1682]60!> Time series output for PROFIL. Always all time series are stored. A selection
61!> can be applied via the PROFIL-parameters in close_file.
[1]62!------------------------------------------------------------------------------!
[1682]63 SUBROUTINE data_output_tseries
64 
[1]65
[1320]66    USE control_parameters,                                                    &
[1327]67        ONLY:  dots_time_count, time_since_reference_point
[1320]68
69    USE cpulog,                                                                &
70        ONLY:  cpu_log, log_point 
71
72    USE kinds
73
[1]74    USE netcdf_control
[1320]75
[1]76    USE pegrid
[1320]77
[1]78    USE profil_parameter
[1320]79   
80    USE statistics,                                                            &
81        ONLY:  flow_statistics_called, statistic_regions, ts_value
[1]82
83    IMPLICIT NONE
84
85
[1682]86    INTEGER(iwp) ::  i  !<
87    INTEGER(iwp) ::  sr !<
[1]88
89
90!
91!-- If required, compute statistics.
92    IF ( .NOT. flow_statistics_called )  CALL flow_statistics
93
94!
95!-- Flow_statistics has its own cpu-time measuring.
96    CALL cpu_log( log_point(21), 'data_output_tseries', 'start' )
97
98    IF ( myid == 0 )  THEN
99
100!
101!--    Open file for time series output in NetCDF format
[1524]102       CALL check_open( 105 )
103       
104!--    Increment the counter for number of output times
105!      CAUTION: The following line has to be after the call of the subroutine
106!               check_open, since check_open resets the counter dots_time_count
107!               to 0, if a new file is opened
[1327]108       dots_time_count = dots_time_count + 1
[1524]109       
[1]110#if defined( __netcdf )
111!
[1327]112!--    Update the time series time axis
113       nc_stat = NF90_PUT_VAR( id_set_ts, id_var_time_ts,        &
114                               (/ time_since_reference_point /), &
115                               start = (/ dots_time_count /),    &
116                               count = (/ 1 /) )
117       CALL handle_netcdf_error( 'data_output_tseries', 350 )
[1]118#endif
119
120!
121!--    Time series output for the total domain (and each subregion, if
122!--    applicable)
123       DO  sr = 0, statistic_regions
124
125#if defined( __netcdf )
[1327]126          DO  i = 1, dots_num
127             nc_stat = NF90_PUT_VAR( id_set_ts, id_var_dots(i,sr),  &
128                                     (/ ts_value(i,sr) /),          &
129                                     start = (/ dots_time_count /), &
130                                     count = (/ 1 /) )
131             CALL handle_netcdf_error( 'data_output_tseries', 351 )
132          ENDDO
[1]133#endif
134
[48]135       ENDDO
[1]136
137    ENDIF
138
139
[1318]140    CALL cpu_log( log_point(21), 'data_output_tseries', 'stop' )
[1]141
142!
143!-- formats
144500 FORMAT (23(E15.7,1X))
145
146 END SUBROUTINE data_output_tseries
Note: See TracBrowser for help on using the repository browser.