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

Added error handling for wrong input parameters

File:
1 edited

Legend:

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

    r3241 r3246  
    2727! -----------------
    2828! $Id$
     29! Added error handling for input namelist via parin_fail_message
     30!
     31! 3241 2018-09-12 15:02:00Z raasch
    2932! +nest_chemistry
    3033!
     
    867870      line = ' '
    868871      DO   WHILE ( INDEX( line, '&chemistry_parameters' ) == 0 )
    869          READ ( 11, '(A)', END=10 )  line
     872         READ ( 11, '(A)', END=20 )  line
    870873      ENDDO
    871874      BACKSPACE ( 11 )
    872875!
    873876!--   Read chemistry namelist
    874       READ ( 11, chemistry_parameters )                         
     877      READ ( 11, chemistry_parameters, ERR = 10, END = 20 )
    875878!
    876879!--   Enable chemistry model
    877       air_chemistry = .TRUE.                   
    878 
    879      
    880  10   CONTINUE
     880      air_chemistry = .TRUE.
     881      GOTO 20
     882
     883 10   BACKSPACE( 11 )
     884      READ( 11 ,fmt='(A)') line
     885      CALL parin_fail_message ( 'chemistry_parameters', line )
     886
     887 20   CONTINUE
    881888
    882889      t_steps = my_steps          !(todo: Why not directly make t_steps a
Note: See TracChangeset for help on using the changeset viewer.