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

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