source: palm/trunk/SOURCE/user_spectra.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.4 KB
RevLine 
[1682]1!> @file user_spectra.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!
[258]20! Current revisions:
[211]21! -----------------
[1683]22!
[3049]23!
[1321]24! Former revisions:
25! -----------------
26! $Id: user_spectra.f90 4180 2019-08-21 14:37:54Z scharf $
[3768]27! variables removed + statement added to avoid compiler warnings about unused variables
28!
29! 3655 2019-01-07 16:51:22Z knoop
[3421]30! Renamed output variables
31!
[1321]32!
[211]33! Description:
34! ------------
[1682]35!> Calculation of user-defined spectra.
36!> See section 3.5.4 on how to define, calculate, and output user defined
37!> quantities.
[211]38!------------------------------------------------------------------------------!
[1682]39 SUBROUTINE user_spectra( mode, m, pr )
40 
[211]41
42    USE arrays_3d
[1320]43   
[258]44    USE control_parameters
[1320]45   
[211]46    USE indices
[1320]47   
48    USE kinds
49   
[1833]50    USE spectra_mod
[1320]51   
[211]52    USE statistics
[1320]53   
[211]54    USE user
55
56    IMPLICIT NONE
57
58    CHARACTER (LEN=*) ::  mode
59
[1682]60    INTEGER(iwp) ::  m    !<
61    INTEGER(iwp) ::  pr   !<
[211]62
63
64!
[3768]65!-- Next line is to avoid compiler warning about unused variable. Please remove.
66    IF ( pr == 0 )  CONTINUE
67
68!
[211]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         
[3421]78          CASE ( 'u', 'v', 'w', 'theta', 'q', 's' )
[211]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
[1320]87             message_string = 'Spectra of ' //                                 &
[274]88                         TRIM( data_output_sp(m) ) // ' can not be calculated'
[3046]89             CALL message( 'user_spectra', 'UI0010', 0, 1, 0, 6, 0 )
[258]90           
[211]91       END SELECT
92
93    ELSEIF ( mode == 'data_output' )  THEN
94
95       SELECT CASE ( TRIM( data_output_sp(m) ) )
96
[3421]97          CASE ( 'u', 'v', 'w', 'theta', 'q', 's' )
[211]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
[1320]105             message_string = 'Spectra of ' //                                 &
[258]106                              TRIM( data_output_sp(m) ) // ' are not defined'
107             CALL message( 'user_spectra', 'UI0011', 0, 0, 0, 6, 0 )
108             
[211]109          END SELECT
110
111    ENDIF
112
113 END SUBROUTINE user_spectra
114
Note: See TracBrowser for help on using the repository browser.