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

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

Bugfix in output of time-averaged plant-canopy quanities; Output of plant-canopy data only where tall canopy is defined; land-surface model: fix wrong location strings; tests: update urban test case; all source code files: copyright update

  • Property svn:keywords set to Id
File size: 2.9 KB
Line 
1!> @file user_flight.f90
2!------------------------------------------------------------------------------!
3! This file is part of the PALM model system.
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.
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-2020 Leibniz Universitaet Hannover
18!------------------------------------------------------------------------------!
19!
20! Current revisions:
21! ------------------
22!
23!
24! Former revisions:
25! -----------------
26! $Id: user_flight.f90 4360 2020-01-07 11:25:50Z suehring $
27! Corrected "Former revisions" section
28!
29! 3768 2019-02-27 14:35:58Z raasch
30! unused variables commented out + statement added to avoid compiler warnings
31!
32! 3684 2019-01-20 20:20:58Z knoop
33! Corrected "Former revisions" section
34!
35! 1957 2016-07-07 10:43:48Z suehring
36! Initial revision
37!
38! Description:
39! ------------
40!> Calculation of user-defined output quantity for flight measurements after
41!> each timestep.
42!------------------------------------------------------------------------------!
43 SUBROUTINE user_flight( var, id )
44
45    USE control_parameters
46   
47    USE grid_variables
48
49    USE indices
50
51    USE kinds
52
53    USE user
54
55    USE arrays_3d
56
57    IMPLICIT NONE
58
59!    INTEGER(iwp) ::  i  !< index along x
60!    INTEGER(iwp) ::  j  !< index along y
61!    INTEGER(iwp) ::  k  !< index along z
62    INTEGER(iwp) ::  id !< variable identifyer, according to the settings in user_init_flight
63       
64    REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ::  var !< treated variable
65
66!
67!-- Next line is to avoid compiler warning about unused variables. Please remove.
68    IF ( id == 0  .OR.  var(nzb,nysg,nxlg) == 0.0_wp )  CONTINUE
69
70!
71!-- Here, the respective variable is calculated. There is no call of
72!-- exchange_horiz necessary.
73!-- The variable identifyer (id) must be set according to the settings in
74!-- user_init_flight.
75!-- Please note, so far, variable must be located at the center of a grid box.
76!     var = 0.0_wp
77
78!     SELECT CASE ( id )
79!
80!        CASE ( 1 )
81!           DO i = nxl-1, nxr+1
82!              DO j = nys-1, nyn+1
83!                 DO k = nzb, nzt
84!                    var(k,j,i) = ABS( u(k,j,i )
85!                 ENDDO
86!              ENDDO
87!           ENDDO
88!           
89!        CASE ( 2 )
90!           DO i = nxl-1, nxr+1
91!              DO j = nys-1, nyn+1
92!                 DO k = nzb, nzt
93!                    var(k,j,i) = ABS( v(k,j,i) )
94!                 ENDDO
95!              ENDDO
96!           ENDDO
97!
98!     END SELECT
99
100
101 END SUBROUTINE user_flight
Note: See TracBrowser for help on using the repository browser.