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

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

ONLY-attribute added to USE-statements,
kind-parameters added to all INTEGER and REAL declaration statements,
kinds are defined in new module kinds,
old module precision_kind is removed,
revision history before 2012 removed,
comment fields (!:) to be used for variable explanations added to all variable declaration statements

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