Ignore:
Timestamp:
Sep 13, 2018 3:14:50 PM (3 years ago)
Author:
sward
Message:

Added error handling for wrong input parameters

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/synthetic_turbulence_generator_mod.f90

    r3241 r3246  
    2525! -----------------
    2626! $Id$
     27! Added error handling for input namelist via parin_fail_message
     28!
     29! 3241 2018-09-12 15:02:00Z raasch
    2730! unused variables removed
    2831!
     
    967970    line = ' '
    968971    DO WHILE ( INDEX( line, '&stg_par' ) == 0 )
    969        READ ( 11, '(A)', END=10 )  line
     972       READ ( 11, '(A)', END=20 )  line
    970973    ENDDO
    971974    BACKSPACE ( 11 )
     
    973976!
    974977!-- Read namelist
    975     READ ( 11, stg_par )
     978    READ ( 11, stg_par, ERR = 10, END = 20 )
    976979
    977980!
     
    979982!-- on
    980983    syn_turb_gen = .TRUE.
    981 
    982 
    983  10 CONTINUE
     984    GOTO 20
     985
     986 10 BACKSPACE( 11 )
     987    READ( 11 ,fmt='(A)') line
     988    CALL parin_fail_message ( 'stg_par', line )
     989
     990 20 CONTINUE
    984991
    985992 END SUBROUTINE stg_parin
Note: See TracChangeset for help on using the changeset viewer.