source: palm/trunk/SOURCE/user_parin.f90 @ 2350

Last change on this file since 2350 was 2298, checked in by raasch, 7 years ago

write_binary is of type LOGICAL now, MPI2-related code removed, obsolete variables removed, sendrecv_in_background related parts removed, missing variable descriptions added

  • Property svn:keywords set to Id
File size: 5.0 KB
Line 
1!> @file user_parin.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
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-2017 Leibniz Universitaet Hannover
18!------------------------------------------------------------------------------!
19!
20! Current revisions:
21! -----------------
22!
23!
24! Former revisions:
25! -----------------
26! $Id: user_parin.f90 2298 2017-06-29 09:28:18Z kanani $
27! user interface current revision updated
28!
29! 2101 2017-01-05 16:42:31Z suehring
30!
31! 2000 2016-08-20 18:09:15Z knoop
32! Forced header and separation lines into 80 columns
33!
34! 1833 2016-04-07 14:23:03Z raasch
35! required interface revision changed
36!
37! 1783 2016-03-06 18:36:17Z raasch
38! required interface revision changed
39!
40! 1682 2015-10-07 23:56:08Z knoop
41! Code annotations made doxygen readable
42!
43! 1668 2015-09-23 13:45:36Z raasch
44! current interface revision number number set to r1663
45!
46! 1666 2015-09-23 07:31:10Z raasch
47! interface revision number is set to blank
48!
49! 1320 2014-03-20 08:40:49Z raasch
50! kind-parameters added to all INTEGER and REAL declaration statements,
51! kinds are defined in new module kinds,
52! old module precision_kind is removed,
53! revision history before 2012 removed,
54! comment fields (!:) to be used for variable explanations added to
55! all variable declaration statements
56!
57! 1036 2012-10-22 13:43:42Z raasch
58! code put under GPL (PALM 3.9)
59!
60! 931 2012-06-08 15:09:28Z maronga
61! Re-enabled check for max_pr_user
62!
63! 841 2012-02-28 12:29:49Z maronga
64! Bugfix: disable max_pr_user check during prior namelist file check
65!
66! 217 2008-12-09 18:00:48Z letzel
67! +topography_grid_convention
68! Former file user_interface.f90 split into one file per subroutine
69!
70! Description:
71! ------------
72!> Interface to read user-defined namelist-parameters.
73!------------------------------------------------------------------------------!
74 SUBROUTINE user_parin
75 
76
77    USE control_parameters
78   
79    USE kinds
80   
81    USE pegrid
82   
83    USE statistics
84   
85    USE user
86
87    IMPLICIT NONE
88
89    CHARACTER (LEN=80) ::  zeile   !<
90
91    INTEGER(iwp) ::  i                 !<
92    INTEGER(iwp) ::  j                 !<
93    INTEGER(iwp) ::  max_pr_user_tmp   !<
94
95
96    NAMELIST /userpar/  data_output_pr_user, data_output_user, region,         &
97                        data_output_masks_user
98
99!
100!-- Set revision number of this default interface version. It will be checked within
101!-- the main program (palm). Please change the revision number in case that the
102!-- current revision does not match with previous revisions (e.g. if routines
103!-- have been added/deleted or if parameter lists in subroutines have been changed).
104    user_interface_current_revision = 'r2297'
105
106!
107!-- Position the namelist-file at the beginning (it was already opened in
108!-- parin), search for user-defined namelist-group ("userpar", but any other
109!-- name can be choosed) and position the file at this line.
110    REWIND ( 11 )
111
112    zeile = ' '
113    DO   WHILE ( INDEX( zeile, '&userpar' ) == 0 )
114       READ ( 11, '(A)', END=100 )  zeile
115    ENDDO
116    BACKSPACE ( 11 )
117
118!
119!-- Read user-defined namelist
120    READ ( 11, userpar )
121    user_defined_namelist_found = .TRUE.
122
123!
124!-- Determine the number of user-defined profiles and append them to the
125!-- standard data output (data_output_pr)
126    max_pr_user_tmp = 0
127    IF ( data_output_pr_user(1) /= ' ' )  THEN
128       i = 1
129       DO  WHILE ( data_output_pr(i) /= ' '  .AND.  i <= 100 )
130          i = i + 1
131       ENDDO
132       j = 1
133       DO  WHILE ( data_output_pr_user(j) /= ' '  .AND.  j <= 100 )
134          data_output_pr(i) = data_output_pr_user(j)
135          max_pr_user_tmp   = max_pr_user_tmp + 1
136          i = i + 1
137          j = j + 1
138       ENDDO
139    ENDIF
140
141!
142!-- In case of a restart run, the number of user-defined profiles on the
143!-- restart file (already stored in max_pr_user) has to match the one given
144!-- for the current run
145    IF ( TRIM( initializing_actions ) == 'read_restart_data' )  THEN
146       IF ( max_pr_user /= max_pr_user_tmp )  THEN
147          WRITE( message_string, * ) 'the number of user-defined profiles ',   &
148                     'given in &data_output_pr (', max_pr_user_tmp, ') doe',   &
149                     'snot match the one ',                                    &
150                     '&found in the restart file (', max_pr_user,              &
151                                     ')'
152          CALL message( 'user_parin', 'UI0009', 1, 2, 0, 6, 0 )
153       ENDIF
154    ELSE
155       max_pr_user = max_pr_user_tmp
156    ENDIF
157
158100 RETURN
159
160 END SUBROUTINE user_parin
161
Note: See TracBrowser for help on using the repository browser.