1 | !> @file user_actions.f90 |
---|
2 | !--------------------------------------------------------------------------------! |
---|
3 | ! This file is part of PALM. |
---|
4 | ! |
---|
5 | ! PALM is free software: you can redistribute it and/or modify it under the terms |
---|
6 | ! of the GNU General Public License as published by the Free Software Foundation, |
---|
7 | ! either version 3 of the License, or (at your option) any later version. |
---|
8 | ! |
---|
9 | ! PALM is distributed in the hope that it will be useful, but WITHOUT ANY |
---|
10 | ! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR |
---|
11 | ! A PARTICULAR PURPOSE. See the GNU General Public License for more details. |
---|
12 | ! |
---|
13 | ! You should have received a copy of the GNU General Public License along with |
---|
14 | ! PALM. If not, see <http://www.gnu.org/licenses/>. |
---|
15 | ! |
---|
16 | ! Copyright 1997-2016 Leibniz Universitaet Hannover |
---|
17 | !--------------------------------------------------------------------------------! |
---|
18 | ! |
---|
19 | ! Current revisions: |
---|
20 | ! ------------------ |
---|
21 | ! |
---|
22 | ! |
---|
23 | ! Former revisions: |
---|
24 | ! ----------------- |
---|
25 | ! $Id: user_flight.f90 1958 2016-07-07 10:51:40Z suehring $ |
---|
26 | ! |
---|
27 | ! 1957 2016-07-07 10:43:48Z suehring |
---|
28 | ! Initial revision |
---|
29 | ! |
---|
30 | ! Description: |
---|
31 | ! ------------ |
---|
32 | !> Calculation of user-defined output quantity for flight measurements after |
---|
33 | !> each timestep. |
---|
34 | !------------------------------------------------------------------------------! |
---|
35 | SUBROUTINE user_flight( var, id ) |
---|
36 | |
---|
37 | USE control_parameters |
---|
38 | |
---|
39 | USE grid_variables |
---|
40 | |
---|
41 | USE indices |
---|
42 | |
---|
43 | USE kinds |
---|
44 | |
---|
45 | USE user |
---|
46 | |
---|
47 | USE arrays_3d |
---|
48 | |
---|
49 | IMPLICIT NONE |
---|
50 | |
---|
51 | INTEGER(iwp) :: i !< index along x |
---|
52 | INTEGER(iwp) :: j !< index along y |
---|
53 | INTEGER(iwp) :: k !< index along z |
---|
54 | INTEGER(iwp) :: id !< variable identifyer, according to the settings in user_init_flight |
---|
55 | |
---|
56 | REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) :: var !< treated variable |
---|
57 | |
---|
58 | ! |
---|
59 | !-- Here, the respective variable is calculated. There is no call of |
---|
60 | !-- exchange_horiz necessary. |
---|
61 | !-- The variable identifyer (id) must be set according to the settings in |
---|
62 | !-- user_init_flight. |
---|
63 | !-- Please note, so far, variable must be located at the center of a grid box. |
---|
64 | ! var = 0.0_wp |
---|
65 | |
---|
66 | ! SELECT CASE ( id ) |
---|
67 | ! |
---|
68 | ! CASE ( 1 ) |
---|
69 | ! DO i = nxl-1, nxr+1 |
---|
70 | ! DO j = nys-1, nyn+1 |
---|
71 | ! DO k = nzb, nzt |
---|
72 | ! var(k,j,i) = ABS( u(k,j,i ) |
---|
73 | ! ENDDO |
---|
74 | ! ENDDO |
---|
75 | ! ENDDO |
---|
76 | ! |
---|
77 | ! CASE ( 2 ) |
---|
78 | ! DO i = nxl-1, nxr+1 |
---|
79 | ! DO j = nys-1, nyn+1 |
---|
80 | ! DO k = nzb, nzt |
---|
81 | ! var(k,j,i) = ABS( v(k,j,i) ) |
---|
82 | ! ENDDO |
---|
83 | ! ENDDO |
---|
84 | ! ENDDO |
---|
85 | ! |
---|
86 | ! END SELECT |
---|
87 | |
---|
88 | |
---|
89 | END SUBROUTINE user_flight |
---|