[211] | 1 | SUBROUTINE user_check_data_output_pr( variable, var_count, unit ) |
---|
| 2 | |
---|
[1036] | 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 | ! |
---|
[1310] | 17 | ! Copyright 1997-2014 Leibniz Universitaet Hannover |
---|
[1036] | 18 | !--------------------------------------------------------------------------------! |
---|
| 19 | ! |
---|
[484] | 20 | ! Current revisions: |
---|
[211] | 21 | ! ----------------- |
---|
[1321] | 22 | ! |
---|
| 23 | ! |
---|
| 24 | ! Former revisions: |
---|
| 25 | ! ----------------- |
---|
| 26 | ! $Id: user_check_data_output_pr.f90 1321 2014-03-20 09:40:40Z knoop $ |
---|
| 27 | ! |
---|
| 28 | ! 1320 2014-03-20 08:40:49Z raasch |
---|
[1320] | 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 |
---|
[211] | 34 | ! |
---|
[1037] | 35 | ! 1036 2012-10-22 13:43:42Z raasch |
---|
| 36 | ! code put under GPL (PALM 3.9) |
---|
| 37 | ! |
---|
[226] | 38 | ! 211 2008-11-11 04:46:24Z raasch |
---|
| 39 | ! Former file user_interface.f90 split into one file per subroutine |
---|
| 40 | ! |
---|
[211] | 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 |
---|
[1320] | 50 | |
---|
[211] | 51 | USE indices |
---|
[1320] | 52 | |
---|
| 53 | USE kinds |
---|
| 54 | |
---|
[211] | 55 | USE netcdf_control |
---|
[1320] | 56 | |
---|
[211] | 57 | USE profil_parameter |
---|
[1320] | 58 | |
---|
[211] | 59 | USE statistics |
---|
[1320] | 60 | |
---|
[211] | 61 | USE user |
---|
| 62 | |
---|
| 63 | IMPLICIT NONE |
---|
| 64 | |
---|
[1320] | 65 | CHARACTER (LEN=*) :: unit !: |
---|
| 66 | CHARACTER (LEN=*) :: variable !: |
---|
[211] | 67 | |
---|
[1320] | 68 | INTEGER(iwp) :: user_pr_index !: |
---|
| 69 | INTEGER(iwp) :: var_count !: |
---|
[211] | 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 |
---|
[1320] | 79 | !-- (see variable "user_pr_index" below). The first user-profile must be assigned |
---|
[211] | 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 |
---|
[1320] | 84 | ! user_pr_index = pr_palm + 1 |
---|
| 85 | ! dopr_index(var_count) = user_pr_index ! quantities' user-profile-number |
---|
[211] | 86 | ! dopr_unit(var_count) = 'm2/s2' ! quantity unit |
---|
[1320] | 87 | ! hom(:,2,user_pr_index,:) = SPREAD( zu, 2, statistic_regions+1 ) |
---|
[211] | 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 | |
---|