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