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

Last change on this file since 553 was 553, checked in by weinreis, 14 years ago

several parameters for masked output are replaced by arrays

  • Property svn:keywords set to Id
File size: 2.8 KB
Line 
1 SUBROUTINE user_parin
2
3!------------------------------------------------------------------------------!
4! Current revisions:
5! -----------------
6! data_output_mask_user_* replaced by array data_output_masks_user
7!
8! Former revisions:
9! -----------------
10! $Id: user_parin.f90 553 2010-09-01 14:09:06Z weinreis $
11!
12! 410 2009-12-04 17:05:40Z letzel
13! masked data output
14!
15! 274 2009-03-26 15:11:21Z heinze
16! Output of messages replaced by message handling routine.
17! topography_grid_convention moved to inipar
18!
19! 217 2008-12-09 18:00:48Z letzel
20! +topography_grid_convention
21! Former file user_interface.f90 split into one file per subroutine
22!
23! Description:
24! ------------
25! Interface to read user-defined namelist-parameters.
26!------------------------------------------------------------------------------!
27
28    USE control_parameters
29    USE pegrid
30    USE statistics
31    USE user
32
33    IMPLICIT NONE
34
35    CHARACTER (LEN=80) ::  zeile
36
37    INTEGER ::  i, j, max_pr_user_tmp
38
39
40    NAMELIST /userpar/  data_output_pr_user, data_output_user, region,  &
41                        data_output_masks_user
42
43!
44!-- Position the namelist-file at the beginning (it was already opened in
45!-- parin), search for user-defined namelist-group ("userpar", but any other
46!-- name can be choosed) and position the file at this line.
47    REWIND ( 11 )
48
49    zeile = ' '
50    DO   WHILE ( INDEX( zeile, '&userpar' ) == 0 )
51       READ ( 11, '(A)', END=100 )  zeile
52    ENDDO
53    BACKSPACE ( 11 )
54
55!
56!-- Read user-defined namelist
57    READ ( 11, userpar )
58    user_defined_namelist_found = .TRUE.
59
60!
61!-- Determine the number of user-defined profiles and append them to the
62!-- standard data output (data_output_pr)
63    max_pr_user_tmp = 0
64    IF ( data_output_pr_user(1) /= ' ' )  THEN
65       i = 1
66       DO  WHILE ( data_output_pr(i) /= ' '  .AND.  i <= 100 )
67          i = i + 1
68       ENDDO
69       j = 1
70       DO  WHILE ( data_output_pr_user(j) /= ' '  .AND.  j <= 100 )
71          data_output_pr(i) = data_output_pr_user(j)
72          max_pr_user_tmp   = max_pr_user_tmp + 1
73          i = i + 1
74          j = j + 1
75       ENDDO
76    ENDIF
77
78!
79!-- In case of a restart run, the number of user-defined profiles on the
80!-- restart file (already stored in max_pr_user) has to match the one given
81!-- for the current run
82    IF ( TRIM( initializing_actions ) == 'read_restart_data' )  THEN
83       IF ( max_pr_user /= max_pr_user_tmp )  THEN
84          WRITE( message_string, * ) 'the number of user-defined profiles ', &
85                     'given in &data_output_pr (', max_pr_user_tmp, ') doe', &
86                     'snot match the one ',                                  &
87                     '&found in the restart file (', max_pr_user,            &
88                                     ')'
89          CALL message( 'user_parin', 'UI0009', 1, 2, 0, 6, 0 )
90       ENDIF
91    ELSE
92       max_pr_user = max_pr_user_tmp
93    ENDIF
94
95100 RETURN
96
97 END SUBROUTINE user_parin
98
Note: See TracBrowser for help on using the repository browser.