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

Last change on this file since 236 was 226, checked in by raasch, 16 years ago

preparations for the next release

  • Property svn:keywords set to Id
File size: 2.1 KB
RevLine 
[211]1 SUBROUTINE user_spectra( mode, m, pr )
2
3!------------------------------------------------------------------------------!
4! Actual revisions:
5! -----------------
[226]6!
[211]7!
8! Former revisions:
9! -----------------
10! $Id: user_spectra.f90 226 2009-02-02 07:39:34Z letzel $
11!
[226]12! 211 2008-11-11 04:46:24Z raasch
13! Former file user_interface.f90 split into one file per subroutine
14!
[211]15! Description:
16! ------------
17! Calculation of user-defined spectra.
18! See section 3.5.4 on how to define, calculate, and output user defined
19! quantities.
20!------------------------------------------------------------------------------!
21
22    USE arrays_3d
23    USE indices
24    USE spectrum
25    USE statistics
26    USE user
27
28    IMPLICIT NONE
29
30    CHARACTER (LEN=*) ::  mode
31
32    INTEGER ::  i, j, k, m, pr
33
34
35!
36!-- Sample on how to calculate spectra of user-defined quantities.
37!-- Each quantity is identified by the corresponding user profile index
38!-- "pr_palm+#" where "#" is an integer starting from 1. These
39!-- user-profile-numbers must also be assigned to the respective strings
40!-- given by data_output_pr_user in routine user_check_data_output_pr.
41    IF ( mode == 'preprocess' )  THEN
42
43       SELECT CASE ( TRIM( data_output_sp(m) ) )
44         
45          CASE ( 'u', 'v', 'w', 'pt', 'q' )
46!--          Not allowed here since these are the standard quantities used in
47!--          preprocess_spectra.
48       
49!          CASE ( 'u*v*' )
50!             pr = pr_palm+1
51!             d(nzb+1:nzt,nys:nyn,nxl:nxr) = ustvst(nzb+1:nzt,nys:nyn,nxl:nxr)
52       
53          CASE DEFAULT
54             PRINT*, '+++ user_spectra/preprocess: Spectra of ', &
55                  TRIM( data_output_sp(m) ), ' can not be calculated'
56         
57       END SELECT
58
59    ELSEIF ( mode == 'data_output' )  THEN
60
61       SELECT CASE ( TRIM( data_output_sp(m) ) )
62
63          CASE ( 'u', 'v', 'w', 'pt', 'q' )
64!--          Not allowed here since these are the standard quantities used in
65!--          data_output_spectra.
66
67!          CASE ( 'u*v*' )
68!             pr = 6
69
70          CASE DEFAULT
71             PRINT*, '+++ user_spectra/data_output: Spectra of ', &
72                          TRIM( data_output_sp(m) ), ' are not defined'
73
74          END SELECT
75
76    ENDIF
77
78 END SUBROUTINE user_spectra
79
Note: See TracBrowser for help on using the repository browser.