Changeset 3247 for palm/trunk/SOURCE/message.f90
- Timestamp:
- Sep 14, 2018 7:06:30 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/message.f90
r3246 r3247 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Subroutine description updated and parin_fail_message now also outputs 28 ! the line number in which namelist reading failed 29 ! 30 ! 3246 2018-09-13 15:14:50Z sward 27 31 ! Added SUBROUTINE parin_fail_message for error handling of input namelists 28 32 ! … … 296 300 ! Description: 297 301 ! ------------ 298 !> Prints out the given location on stdout302 !> Abort routine for failures durin reading of namelists 299 303 !------------------------------------------------------------------------------! 300 304 … … 304 308 ONLY: message_string 305 309 310 USE kinds 311 306 312 IMPLICIT NONE 307 313 … … 309 315 CHARACTER(LEN=*) :: line 310 316 311 message_string = 'Error(s) in NAMELIST '// TRIM(location) // & 312 '&Reading fails at& '// line 317 CHARACTER(LEN=80) :: line_dum 318 319 INTEGER(iwp) :: line_counter 320 321 line_dum = ' ' 322 line_counter = 0 323 324 REWIND( 11 ) 325 DO WHILE ( INDEX( line_dum, TRIM(line) ) == 0 ) 326 READ ( 11, '(A)', END=20 ) line_dum 327 line_counter = line_counter + 1 328 ENDDO 329 330 20 WRITE( message_string, '(A,I3,A)' ) & 331 'Error(s) in NAMELIST '// TRIM(location) // & 332 '&Reading fails on line ', line_counter, & 333 ' at&' // line 313 334 CALL message( 'parin', 'PA0271', 1, 2, 0, 6, 0 ) 314 335
Note: See TracChangeset
for help on using the changeset viewer.