[3684] | 1 | !> @file user_flight.f90 |
---|
[2000] | 2 | !------------------------------------------------------------------------------! |
---|
[2696] | 3 | ! This file is part of the PALM model system. |
---|
[1957] | 4 | ! |
---|
[2000] | 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. |
---|
[1957] | 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 | ! |
---|
[4360] | 17 | ! Copyright 1997-2020 Leibniz Universitaet Hannover |
---|
[2000] | 18 | !------------------------------------------------------------------------------! |
---|
[1957] | 19 | ! |
---|
| 20 | ! Current revisions: |
---|
| 21 | ! ------------------ |
---|
| 22 | ! |
---|
[2001] | 23 | ! |
---|
[1957] | 24 | ! Former revisions: |
---|
| 25 | ! ----------------- |
---|
| 26 | ! $Id: user_flight.f90 4360 2020-01-07 11:25:50Z oliver.maas $ |
---|
[4182] | 27 | ! Corrected "Former revisions" section |
---|
| 28 | ! |
---|
| 29 | ! 3768 2019-02-27 14:35:58Z raasch |
---|
[3768] | 30 | ! unused variables commented out + statement added to avoid compiler warnings |
---|
| 31 | ! |
---|
| 32 | ! 3684 2019-01-20 20:20:58Z knoop |
---|
[2716] | 33 | ! Corrected "Former revisions" section |
---|
| 34 | ! |
---|
[4182] | 35 | ! 1957 2016-07-07 10:43:48Z suehring |
---|
| 36 | ! Initial revision |
---|
[1957] | 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 | |
---|
[3768] | 59 | ! INTEGER(iwp) :: i !< index along x |
---|
| 60 | ! INTEGER(iwp) :: j !< index along y |
---|
| 61 | ! INTEGER(iwp) :: k !< index along z |
---|
[1957] | 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 | ! |
---|
[3768] | 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 | ! |
---|
[1957] | 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 |
---|