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

Last change on this file since 2797 was 2718, checked in by maronga, 7 years ago

deleting of deprecated files; headers updated where needed

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