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

Last change on this file since 2566 was 2512, checked in by raasch, 7 years ago

upper bounds of cross section and 3d output changed from nx+1,ny+1 to nx,ny; no output if redundant ghost layer data to NetCDF files

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