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

Last change on this file since 4180 was 4180, checked in by scharf, 22 months ago

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

  • Property svn:keywords set to Id
File size: 3.4 KB
Line 
1!> @file user_spectra.f90
2!------------------------------------------------------------------------------!
3! This file is part of the PALM model system.
4!
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.
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!
17! Copyright 1997-2019 Leibniz Universitaet Hannover
18!------------------------------------------------------------------------------!
19!
20! Current revisions:
21! -----------------
22!
23!
24! Former revisions:
25! -----------------
26! $Id: user_spectra.f90 4180 2019-08-21 14:37:54Z scharf $
27! variables removed + statement added to avoid compiler warnings about unused variables
28!
29! 3655 2019-01-07 16:51:22Z knoop
30! Renamed output variables
31!
32!
33! Description:
34! ------------
35!> Calculation of user-defined spectra.
36!> See section 3.5.4 on how to define, calculate, and output user defined
37!> quantities.
38!------------------------------------------------------------------------------!
39 SUBROUTINE user_spectra( mode, m, pr )
40 
41
42    USE arrays_3d
43   
44    USE control_parameters
45   
46    USE indices
47   
48    USE kinds
49   
50    USE spectra_mod
51   
52    USE statistics
53   
54    USE user
55
56    IMPLICIT NONE
57
58    CHARACTER (LEN=*) ::  mode
59
60    INTEGER(iwp) ::  m    !<
61    INTEGER(iwp) ::  pr   !<
62
63
64!
65!-- Next line is to avoid compiler warning about unused variable. Please remove.
66    IF ( pr == 0 )  CONTINUE
67
68!
69!-- Sample on how to calculate spectra of user-defined quantities.
70!-- Each quantity is identified by the corresponding user profile index
71!-- "pr_palm+#" where "#" is an integer starting from 1. These
72!-- user-profile-numbers must also be assigned to the respective strings
73!-- given by data_output_pr_user in routine user_check_data_output_pr.
74    IF ( mode == 'preprocess' )  THEN
75
76       SELECT CASE ( TRIM( data_output_sp(m) ) )
77         
78          CASE ( 'u', 'v', 'w', 'theta', 'q', 's' )
79!--          Not allowed here since these are the standard quantities used in
80!--          preprocess_spectra.
81       
82!          CASE ( 'u*v*' )
83!             pr = pr_palm+1
84!             d(nzb+1:nzt,nys:nyn,nxl:nxr) = ustvst(nzb+1:nzt,nys:nyn,nxl:nxr)
85       
86          CASE DEFAULT
87             message_string = 'Spectra of ' //                                 &
88                         TRIM( data_output_sp(m) ) // ' can not be calculated'
89             CALL message( 'user_spectra', 'UI0010', 0, 1, 0, 6, 0 )
90           
91       END SELECT
92
93    ELSEIF ( mode == 'data_output' )  THEN
94
95       SELECT CASE ( TRIM( data_output_sp(m) ) )
96
97          CASE ( 'u', 'v', 'w', 'theta', 'q', 's' )
98!--          Not allowed here since these are the standard quantities used in
99!--          data_output_spectra.
100
101!          CASE ( 'u*v*' )
102!             pr = 6
103
104          CASE DEFAULT
105             message_string = 'Spectra of ' //                                 &
106                              TRIM( data_output_sp(m) ) // ' are not defined'
107             CALL message( 'user_spectra', 'UI0011', 0, 0, 0, 6, 0 )
108             
109          END SELECT
110
111    ENDIF
112
113 END SUBROUTINE user_spectra
114
Note: See TracBrowser for help on using the repository browser.