1 | SUBROUTINE user_check_data_output_pr( variable, var_count, unit ) |
---|
2 | |
---|
3 | !--------------------------------------------------------------------------------! |
---|
4 | ! This file is part of PALM. |
---|
5 | ! |
---|
6 | ! PALM is free software: you can redistribute it and/or modify it under the terms |
---|
7 | ! of the GNU General Public License as published by the Free Software Foundation, |
---|
8 | ! either version 3 of the License, or (at your option) any later 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-2014 Leibniz Universitaet Hannover |
---|
18 | !--------------------------------------------------------------------------------! |
---|
19 | ! |
---|
20 | ! Current revisions: |
---|
21 | ! ----------------- |
---|
22 | ! |
---|
23 | ! |
---|
24 | ! Former revisions: |
---|
25 | ! ----------------- |
---|
26 | ! $Id: user_check_data_output_pr.f90 1321 2014-03-20 09:40:40Z keck $ |
---|
27 | ! |
---|
28 | ! 1320 2014-03-20 08:40:49Z raasch |
---|
29 | ! kind-parameters added to all INTEGER and REAL declaration statements, |
---|
30 | ! kinds are defined in new module kinds, |
---|
31 | ! revision history before 2012 removed, |
---|
32 | ! comment fields (!:) to be used for variable explanations added to |
---|
33 | ! all variable declaration statements |
---|
34 | ! |
---|
35 | ! 1036 2012-10-22 13:43:42Z raasch |
---|
36 | ! code put under GPL (PALM 3.9) |
---|
37 | ! |
---|
38 | ! 211 2008-11-11 04:46:24Z raasch |
---|
39 | ! Former file user_interface.f90 split into one file per subroutine |
---|
40 | ! |
---|
41 | ! Description: |
---|
42 | ! ------------ |
---|
43 | ! Set the unit of user defined profile output quantities. For those variables |
---|
44 | ! not recognized by the user, the parameter unit is set to "illegal", which |
---|
45 | ! tells the calling routine that the output variable is not defined and leads |
---|
46 | ! to a program abort. |
---|
47 | !------------------------------------------------------------------------------! |
---|
48 | |
---|
49 | USE arrays_3d |
---|
50 | |
---|
51 | USE indices |
---|
52 | |
---|
53 | USE kinds |
---|
54 | |
---|
55 | USE netcdf_control |
---|
56 | |
---|
57 | USE profil_parameter |
---|
58 | |
---|
59 | USE statistics |
---|
60 | |
---|
61 | USE user |
---|
62 | |
---|
63 | IMPLICIT NONE |
---|
64 | |
---|
65 | CHARACTER (LEN=*) :: unit !: |
---|
66 | CHARACTER (LEN=*) :: variable !: |
---|
67 | |
---|
68 | INTEGER(iwp) :: user_pr_index !: |
---|
69 | INTEGER(iwp) :: var_count !: |
---|
70 | |
---|
71 | SELECT CASE ( TRIM( variable ) ) |
---|
72 | |
---|
73 | ! |
---|
74 | !-- Uncomment and extend the following lines, if necessary. |
---|
75 | !-- Add additional CASE statements depending on the number of quantities |
---|
76 | !-- for which profiles are to be calculated. The respective calculations |
---|
77 | !-- to be performed have to be added in routine user_statistics. |
---|
78 | !-- The quantities are (internally) identified by a user-profile-number |
---|
79 | !-- (see variable "user_pr_index" below). The first user-profile must be assigned |
---|
80 | !-- the number "pr_palm+1", the second one "pr_palm+2", etc. The respective |
---|
81 | !-- user-profile-numbers have also to be used in routine user_statistics! |
---|
82 | ! CASE ( 'u*v*' ) ! quantity string as given in |
---|
83 | ! ! data_output_pr_user |
---|
84 | ! user_pr_index = pr_palm + 1 |
---|
85 | ! dopr_index(var_count) = user_pr_index ! quantities' user-profile-number |
---|
86 | ! dopr_unit(var_count) = 'm2/s2' ! quantity unit |
---|
87 | ! hom(:,2,user_pr_index,:) = SPREAD( zu, 2, statistic_regions+1 ) |
---|
88 | ! ! grid on which the quantity is |
---|
89 | ! ! defined (use zu or zw) |
---|
90 | |
---|
91 | CASE DEFAULT |
---|
92 | unit = 'illegal' |
---|
93 | |
---|
94 | END SELECT |
---|
95 | |
---|
96 | |
---|
97 | END SUBROUTINE user_check_data_output_pr |
---|
98 | |
---|