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

Last change on this file since 4180 was 4180, checked in by scharf, 5 years ago

removed comments in 'Former revisions' section that are older than 01.01.2019

  • Property svn:keywords set to Id
File size: 3.7 KB
RevLine 
[1682]1!> @file data_output_tseries.f90
[2000]2!------------------------------------------------------------------------------!
[2696]3! This file is part of the PALM model system.
[1036]4!
[2000]5! PALM is free software: you can redistribute it and/or modify it under the
6! terms of the GNU General Public License as published by the Free Software
7! Foundation, either version 3 of the License, or (at your option) any later
8! version.
[1036]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!
[3655]17! Copyright 1997-2019 Leibniz Universitaet Hannover
[2000]18!------------------------------------------------------------------------------!
[1036]19!
[263]20! Current revisions:
[1]21! -----------------
[2001]22!
23!
[1321]24! Former revisions:
25! -----------------
26! $Id: data_output_tseries.f90 4180 2019-08-21 14:37:54Z scharf $
[3241]27! unused format removed
28!
[1321]29!
[1]30! Description:
31! ------------
[1682]32!> Time series output for PROFIL. Always all time series are stored. A selection
33!> can be applied via the PROFIL-parameters in close_file.
[1]34!------------------------------------------------------------------------------!
[1682]35 SUBROUTINE data_output_tseries
36 
[1]37
[1320]38    USE control_parameters,                                                    &
[1327]39        ONLY:  dots_time_count, time_since_reference_point
[1320]40
41    USE cpulog,                                                                &
42        ONLY:  cpu_log, log_point 
43
44    USE kinds
45
[1783]46#if defined( __netcdf )
47    USE NETCDF
48#endif
49    USE netcdf_interface,                                                      &
50        ONLY:  dots_num, id_set_ts, id_var_dots, id_var_time_ts, nc_stat,      &
51               netcdf_handle_error
[1320]52
[1]53    USE pegrid
[1320]54
[1]55    USE profil_parameter
[1320]56   
57    USE statistics,                                                            &
58        ONLY:  flow_statistics_called, statistic_regions, ts_value
[1]59
60    IMPLICIT NONE
61
62
[1682]63    INTEGER(iwp) ::  i  !<
64    INTEGER(iwp) ::  sr !<
[1]65
66
67!
68!-- If required, compute statistics.
69    IF ( .NOT. flow_statistics_called )  CALL flow_statistics
70
71!
72!-- Flow_statistics has its own cpu-time measuring.
73    CALL cpu_log( log_point(21), 'data_output_tseries', 'start' )
74
75    IF ( myid == 0 )  THEN
76
77!
78!--    Open file for time series output in NetCDF format
[1524]79       CALL check_open( 105 )
80       
81!--    Increment the counter for number of output times
82!      CAUTION: The following line has to be after the call of the subroutine
83!               check_open, since check_open resets the counter dots_time_count
84!               to 0, if a new file is opened
[1327]85       dots_time_count = dots_time_count + 1
[1524]86       
[1]87#if defined( __netcdf )
88!
[1327]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 /) )
[1783]94       CALL netcdf_handle_error( 'data_output_tseries', 350 )
[1]95#endif
96
97!
98!--    Time series output for the total domain (and each subregion, if
99!--    applicable)
100       DO  sr = 0, statistic_regions
101
102#if defined( __netcdf )
[1327]103          DO  i = 1, dots_num
104             nc_stat = NF90_PUT_VAR( id_set_ts, id_var_dots(i,sr),  &
105                                     (/ ts_value(i,sr) /),          &
106                                     start = (/ dots_time_count /), &
107                                     count = (/ 1 /) )
[1783]108             CALL netcdf_handle_error( 'data_output_tseries', 351 )
[1327]109          ENDDO
[1]110#endif
111
[48]112       ENDDO
[1]113
114    ENDIF
115
116
[1318]117    CALL cpu_log( log_point(21), 'data_output_tseries', 'stop' )
[1]118
119 END SUBROUTINE data_output_tseries
Note: See TracBrowser for help on using the repository browser.