Changeset 4497 for palm/trunk/SOURCE/user_spectra.f90
- Timestamp:
- Apr 15, 2020 10:20:51 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/user_spectra.f90
r4360 r4497 1 1 !> @file user_spectra.f90 2 !------------------------------------------------------------------------------ !2 !--------------------------------------------------------------------------------------------------! 3 3 ! This file is part of the PALM model system. 4 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. 5 ! PALM is free software: you can redistribute it and/or modify it under the terms of the GNU General 6 ! Public License as published by the Free Software Foundation, either version 3 of the License, or 7 ! (at your option) any later version. 9 8 ! 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 FOR12 ! A PARTICULAR PURPOSE. See the GNU GeneralPublic License for more details.9 ! PALM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the 10 ! implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 11 ! Public License for more details. 13 12 ! 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/>.13 ! You should have received a copy of the GNU General Public License along with PALM. If not, see 14 ! <http://www.gnu.org/licenses/>. 16 15 ! 17 16 ! Copyright 1997-2020 Leibniz Universitaet Hannover 18 !------------------------------------------------------------------------------! 17 !--------------------------------------------------------------------------------------------------! 18 ! 19 19 ! 20 20 ! Current revisions: … … 25 25 ! ----------------- 26 26 ! $Id$ 27 ! file re-formatted to follow the PALM coding standard 28 ! 29 ! 4360 2020-01-07 11:25:50Z suehring 27 30 ! Corrected "Former revisions" section 28 ! 31 ! 29 32 ! 3768 2019-02-27 14:35:58Z raasch 30 33 ! variables removed + statement added to avoid compiler warnings about unused variables 31 ! 34 ! 32 35 ! 3655 2019-01-07 16:51:22Z knoop 33 36 ! Renamed output variables … … 39 42 ! ------------ 40 43 !> Calculation of user-defined spectra. 41 !> See section 3.5.4 on how to define, calculate, and output user defined 42 !> quantities. 43 !------------------------------------------------------------------------------! 44 !> See section 3.5.4 on how to define, calculate, and output user defined quantities. 45 !--------------------------------------------------------------------------------------------------! 44 46 SUBROUTINE user_spectra( mode, m, pr ) 45 47 46 48 47 49 USE arrays_3d 48 50 49 51 USE control_parameters 50 52 51 53 USE indices 52 54 53 55 USE kinds 54 56 55 57 USE spectra_mod 56 58 57 59 USE statistics 58 60 59 61 USE user 60 62 61 63 IMPLICIT NONE 62 64 63 CHARACTER (LEN=*) :: mode65 CHARACTER(LEN=*) :: mode !< 64 66 65 INTEGER(iwp) :: m !<66 INTEGER(iwp) :: pr !<67 INTEGER(iwp) :: m !< 68 INTEGER(iwp) :: pr !< 67 69 68 70 … … 72 74 73 75 ! 74 !-- Sample on how to calculate spectra of user-defined quantities. 75 !-- Each quantity is identified by the corresponding user profile index 76 !-- "pr_palm+#" where "#" is an integer starting from 1. These 77 !-- user-profile-numbers must also be assigned to the respective strings 78 !-- given by data_output_pr_user in routine user_check_data_output_pr. 76 !-- Sample on how to calculate spectra of user-defined quantities. Each quantity is identified by 77 !-- the corresponding user profile index "pr_palm+#" where "#" is an integer starting from 1. These 78 !-- user-profile-numbers must also be assigned to the respective strings given by 79 !-- data_output_pr_user in routine user_check_data_output_pr. 79 80 IF ( mode == 'preprocess' ) THEN 80 81 81 82 SELECT CASE ( TRIM( data_output_sp(m) ) ) 82 83 83 84 CASE ( 'u', 'v', 'w', 'theta', 'q', 's' ) 84 !-- Not allowed here since these are the standard quantities used in 85 !-- preprocess_spectra. 86 85 !-- Not allowed here since these are the standard quantities used in preprocess_spectra. 86 87 87 ! CASE ( 'u*v*' ) 88 88 ! pr = pr_palm+1 89 89 ! d(nzb+1:nzt,nys:nyn,nxl:nxr) = ustvst(nzb+1:nzt,nys:nyn,nxl:nxr) 90 90 91 91 CASE DEFAULT 92 message_string = 'Spectra of ' // & 93 TRIM( data_output_sp(m) ) // ' can not be calculated' 92 message_string = 'Spectra of ' // TRIM( data_output_sp(m) ) // ' can not be calculated' 94 93 CALL message( 'user_spectra', 'UI0010', 0, 1, 0, 6, 0 ) 95 94 96 95 END SELECT 97 96 … … 101 100 102 101 CASE ( 'u', 'v', 'w', 'theta', 'q', 's' ) 103 !-- Not allowed here since these are the standard quantities used in 104 !-- data_output_spectra. 102 !-- Not allowed here since these are the standard quantities used in data_output_spectra. 105 103 106 104 ! CASE ( 'u*v*' ) … … 108 106 109 107 CASE DEFAULT 110 message_string = 'Spectra of ' // & 111 TRIM( data_output_sp(m) ) // ' are not defined' 108 message_string = 'Spectra of ' // TRIM( data_output_sp(m) ) // ' are not defined' 112 109 CALL message( 'user_spectra', 'UI0011', 0, 0, 0, 6, 0 ) 113 110 114 111 END SELECT 115 112
Note: See TracChangeset
for help on using the changeset viewer.