Changeset 4842 for palm/trunk/SOURCE/indoor_model_mod.f90
- Timestamp:
- Jan 14, 2021 10:42:28 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/indoor_model_mod.f90
r4828 r4842 25 25 ! ----------------- 26 26 ! $Id$ 27 ! reading of namelist file and actions in case of namelist errors revised so that statement labels 28 ! and goto statements are not required any more 29 ! 30 ! 4828 2021-01-05 11:21:41Z Giersch 27 31 ! Change parameters for summer_pars and winter_pars (responsible: S. Rissmann) 28 32 ! … … 1903 1907 CASE ( 'im_t_indoor_wall_win' ) 1904 1908 unit = 'K' 1905 1909 1906 1910 CASE ( 'im_t_indoor_wall' ) 1907 1911 unit = 'K' … … 2123 2127 2124 2128 2125 CHARACTER (LEN=80) :: line !< string containing current line of file PARIN 2129 CHARACTER(LEN=100) :: line !< string containing current line of file PARIN 2130 2131 INTEGER(iwp) :: io_status !< status after reading the namelist file 2132 2126 2133 2127 2134 NAMELIST /indoor_parameters/ indoor_during_spinup, & 2128 2135 initial_indoor_temperature 2129 2136 2130 2131 ! 2132 !-- Try to find indoor model package 2133 REWIND ( 11 ) 2134 line = ' ' 2135 DO WHILE ( INDEX( line, '&indoor_parameters' ) == 0 ) 2136 READ ( 11, '(A)', END=10 ) line 2137 ENDDO 2138 BACKSPACE ( 11 ) 2139 2140 ! 2141 !-- Read user-defined namelist 2142 READ ( 11, indoor_parameters ) 2143 ! 2144 !-- Set flag that indicates that the indoor model is switched on 2145 indoor_model = .TRUE. 2137 ! 2138 !-- Move to the beginning of the namelist file and try to find and read the namelist. 2139 REWIND( 11 ) 2140 READ( 11, indoor_parameters, IOSTAT=io_status ) 2141 2142 ! 2143 !-- Action depending on the READ status 2144 IF ( io_status == 0 ) THEN 2145 ! 2146 !-- indoor_parameters namelist was found and read correctly. Set flag that indicates that the 2147 !-- indoor model is switched on. 2148 indoor_model = .TRUE. 2149 2150 ELSEIF ( io_status > 0 ) THEN 2151 ! 2152 !-- indoor_parameters namelist was found, but contained errors. Print an error message including 2153 !-- the line that caused the problem. 2154 BACKSPACE( 11 ) 2155 READ( 11 , '(A)' ) line 2156 CALL parin_fail_message( 'indoor_parameters', line ) 2157 2158 ENDIF 2146 2159 2147 2160 ! … … 2156 2169 ! ENDIF 2157 2170 2158 10 CONTINUE2159 2160 2171 END SUBROUTINE im_parin 2161 2172
Note: See TracChangeset
for help on using the changeset viewer.