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

Last change on this file since 255 was 226, checked in by raasch, 16 years ago

preparations for the next release

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