1 | !> @file user_init_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-2019 Leibniz Universitaet Hannover |
---|
18 | !------------------------------------------------------------------------------! |
---|
19 | ! |
---|
20 | ! Current revisions: |
---|
21 | ! ----------------- |
---|
22 | ! |
---|
23 | ! |
---|
24 | ! Former revisions: |
---|
25 | ! ----------------- |
---|
26 | ! $Id: user_init_flight.f90 3768 2019-02-27 14:35:58Z eckhard $ |
---|
27 | ! statements commented or added to avoid compiler warnings about unused variables |
---|
28 | ! |
---|
29 | ! 3655 2019-01-07 16:51:22Z knoop |
---|
30 | ! Corrected "Former revisions" section |
---|
31 | ! |
---|
32 | ! 2696 2017-12-14 17:12:51Z kanani |
---|
33 | ! Change in file header (GPL part) |
---|
34 | ! |
---|
35 | ! 2101 2017-01-05 16:42:31Z suehring |
---|
36 | ! |
---|
37 | ! 2000 2016-08-20 18:09:15Z knoop |
---|
38 | ! Forced header and separation lines into 80 columns |
---|
39 | ! |
---|
40 | ! 1957 2016-07-07 10:43:48Z suehring |
---|
41 | ! Initial revision |
---|
42 | ! |
---|
43 | ! Description: |
---|
44 | ! ------------ |
---|
45 | !> Execution of user-defined initialization for flight measurements. |
---|
46 | !------------------------------------------------------------------------------! |
---|
47 | SUBROUTINE user_init_flight( init, k, id, label_leg ) |
---|
48 | |
---|
49 | |
---|
50 | USE control_parameters |
---|
51 | |
---|
52 | USE indices |
---|
53 | |
---|
54 | USE kinds |
---|
55 | |
---|
56 | ! USE netcdf_interface, & |
---|
57 | ! ONLY: dofl_label, dofl_unit |
---|
58 | |
---|
59 | USE user |
---|
60 | |
---|
61 | IMPLICIT NONE |
---|
62 | |
---|
63 | CHARACTER(LEN=10), OPTIONAL :: label_leg !< label of the respective leg |
---|
64 | |
---|
65 | INTEGER(iwp), OPTIONAL :: id !< variable index |
---|
66 | INTEGER(iwp), OPTIONAL, INTENT(INOUT) :: k !< index for respective variable and leg |
---|
67 | |
---|
68 | LOGICAL :: init !< variable to recognize initial call |
---|
69 | |
---|
70 | ! |
---|
71 | !-- Following statements are added to avoid compiler warnings about unused variables. Please remove. |
---|
72 | IF ( PRESENT( id ) ) CONTINUE |
---|
73 | IF ( PRESENT( k ) ) CONTINUE |
---|
74 | IF ( PRESENT( label_leg ) ) CONTINUE |
---|
75 | |
---|
76 | ! |
---|
77 | !-- Sample for user-defined flight-time series. |
---|
78 | !-- For each quantity you have to give a label and a unit, which will be used |
---|
79 | !-- for the output into NetCDF file. They must not contain more than |
---|
80 | !-- twenty characters. |
---|
81 | |
---|
82 | |
---|
83 | IF ( init ) THEN |
---|
84 | ! |
---|
85 | !-- The number of user-defined quantity has to be increased appropriately. |
---|
86 | !-- In the following example, 2 user-defined quantities are added. |
---|
87 | ! num_var_fl_user = num_var_fl_user + 2 |
---|
88 | |
---|
89 | init = .FALSE. |
---|
90 | |
---|
91 | ELSE |
---|
92 | |
---|
93 | ! |
---|
94 | !-- Please add the respective number of new variables as following: |
---|
95 | |
---|
96 | ! SELECT CASE ( id ) |
---|
97 | ! |
---|
98 | ! CASE ( 1 ) |
---|
99 | ! dofl_label(k) = TRIM(label_leg) // '_' // 'abs_u' |
---|
100 | ! dofl_unit(k) = 'm/s' |
---|
101 | ! k = k + 1 |
---|
102 | ! |
---|
103 | ! CASE ( 2 ) |
---|
104 | ! |
---|
105 | ! dofl_label(k) = TRIM(label_leg) // '_' // 'abs_v' |
---|
106 | ! dofl_unit(k) = 'm/s' |
---|
107 | ! k = k + 1 |
---|
108 | ! |
---|
109 | ! END SELECT |
---|
110 | |
---|
111 | ENDIF |
---|
112 | |
---|
113 | END SUBROUTINE user_init_flight |
---|
114 | |
---|