1 | SUBROUTINE data_output_tseries |
---|
2 | |
---|
3 | !------------------------------------------------------------------------------! |
---|
4 | ! Current revisions: |
---|
5 | ! ----------------- |
---|
6 | ! Output of NetCDF messages with aid of message handling routine. |
---|
7 | ! |
---|
8 | ! |
---|
9 | ! Former revisions: |
---|
10 | ! ----------------- |
---|
11 | ! $Id: data_output_tseries.f90 263 2009-03-18 12:26:04Z weinreis $ |
---|
12 | ! |
---|
13 | ! 48 2007-03-06 12:28:36Z raasch |
---|
14 | ! Collection of time series quantities moved to routine flow_statistics, |
---|
15 | ! output for "profil" removed |
---|
16 | ! |
---|
17 | ! RCS Log replace by Id keyword, revision history cleaned up |
---|
18 | ! |
---|
19 | ! Revision 1.13 2006/03/14 12:42:51 raasch |
---|
20 | ! Error removed: NetCDF output only if switched on |
---|
21 | ! |
---|
22 | ! Revision 1.1 1998/03/03 08:00:13 raasch |
---|
23 | ! Initial revision |
---|
24 | ! |
---|
25 | ! |
---|
26 | ! Description: |
---|
27 | ! ------------ |
---|
28 | ! Time series output for PROFIL. Always all time series are stored. A selection |
---|
29 | ! can be applied via the PROFIL-parameters in close_file. |
---|
30 | !------------------------------------------------------------------------------! |
---|
31 | |
---|
32 | USE control_parameters |
---|
33 | USE cpulog |
---|
34 | USE indices |
---|
35 | USE interfaces |
---|
36 | USE netcdf_control |
---|
37 | USE pegrid |
---|
38 | USE profil_parameter |
---|
39 | USE statistics |
---|
40 | |
---|
41 | IMPLICIT NONE |
---|
42 | |
---|
43 | |
---|
44 | INTEGER :: file_id, i, j, sr |
---|
45 | |
---|
46 | |
---|
47 | ! |
---|
48 | !-- If required, compute statistics. |
---|
49 | IF ( .NOT. flow_statistics_called ) CALL flow_statistics |
---|
50 | |
---|
51 | ! |
---|
52 | !-- Flow_statistics has its own cpu-time measuring. |
---|
53 | CALL cpu_log( log_point(21), 'data_output_tseries', 'start' ) |
---|
54 | |
---|
55 | IF ( myid == 0 ) THEN |
---|
56 | |
---|
57 | ! |
---|
58 | !-- Open file for time series output in NetCDF format |
---|
59 | IF ( netcdf_output ) THEN |
---|
60 | dots_time_count = dots_time_count + 1 |
---|
61 | CALL check_open( 105 ) |
---|
62 | #if defined( __netcdf ) |
---|
63 | ! |
---|
64 | !-- Update the time series time axis |
---|
65 | nc_stat = NF90_PUT_VAR( id_set_ts, id_var_time_ts, & |
---|
66 | (/ simulated_time /), & |
---|
67 | start = (/ dots_time_count /), & |
---|
68 | count = (/ 1 /) ) |
---|
69 | CALL handle_netcdf_error( 'data_output_tseries', 350 ) |
---|
70 | #endif |
---|
71 | ENDIF |
---|
72 | |
---|
73 | ! |
---|
74 | !-- Time series output for the total domain (and each subregion, if |
---|
75 | !-- applicable) |
---|
76 | DO sr = 0, statistic_regions |
---|
77 | |
---|
78 | #if defined( __netcdf ) |
---|
79 | IF ( netcdf_output ) THEN |
---|
80 | DO i = 1, dots_num |
---|
81 | nc_stat = NF90_PUT_VAR( id_set_ts, id_var_dots(i,sr), & |
---|
82 | (/ ts_value(i,sr) /), & |
---|
83 | start = (/ dots_time_count /), & |
---|
84 | count = (/ 1 /) ) |
---|
85 | CALL handle_netcdf_error( 'data_output_tseries', 351 ) |
---|
86 | ENDDO |
---|
87 | ENDIF |
---|
88 | #endif |
---|
89 | |
---|
90 | ENDDO |
---|
91 | |
---|
92 | ENDIF |
---|
93 | |
---|
94 | |
---|
95 | CALL cpu_log( log_point(21), 'data_output_tseries','stop', 'nobarrier' ) |
---|
96 | |
---|
97 | ! |
---|
98 | !-- formats |
---|
99 | 500 FORMAT (23(E15.7,1X)) |
---|
100 | |
---|
101 | END SUBROUTINE data_output_tseries |
---|