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

Last change on this file since 2000 was 2000, checked in by knoop, 5 years ago

Forced header and separation lines into 80 columns

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