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

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

last commit documented

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