source: palm/trunk/SOURCE/user_flight.f90 @ 1957

Last change on this file since 1957 was 1957, checked in by suehring, 5 years ago

flight module added

  • Property svn:keywords set to Id
File size: 2.5 KB
Line 
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 1957 2016-07-07 10:43:48Z suehring $
26!
27! Description:
28! ------------
29!> Calculation of user-defined output quantity for flight measurements after
30!> each timestep.
31!------------------------------------------------------------------------------!
32 SUBROUTINE user_flight( var, id )
33
34    USE control_parameters
35   
36    USE grid_variables
37
38    USE indices
39
40    USE kinds
41
42    USE user
43
44    USE arrays_3d
45
46    IMPLICIT NONE
47
48    INTEGER(iwp) ::  i  !< index along x
49    INTEGER(iwp) ::  j  !< index along y
50    INTEGER(iwp) ::  k  !< index along z
51    INTEGER(iwp) ::  id !< variable identifyer, according to the settings in user_init_flight
52       
53    REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ::  var !< treated variable
54
55!
56!-- Here, the respective variable is calculated. There is no call of
57!-- exchange_horiz necessary.
58!-- The variable identifyer (id) must be set according to the settings in
59!-- user_init_flight.
60!-- Please note, so far, variable must be located at the center of a grid box.
61!     var = 0.0_wp
62
63!     SELECT CASE ( id )
64!
65!        CASE ( 1 )
66!           DO i = nxl-1, nxr+1
67!              DO j = nys-1, nyn+1
68!                 DO k = nzb, nzt
69!                    var(k,j,i) = ABS( u(k,j,i )
70!                 ENDDO
71!              ENDDO
72!           ENDDO
73!           
74!        CASE ( 2 )
75!           DO i = nxl-1, nxr+1
76!              DO j = nys-1, nyn+1
77!                 DO k = nzb, nzt
78!                    var(k,j,i) = ABS( v(k,j,i) )
79!                 ENDDO
80!              ENDDO
81!           ENDDO
82!
83!     END SELECT
84
85
86 END SUBROUTINE user_flight
Note: See TracBrowser for help on using the repository browser.