Changeset 3246 for palm/trunk/SOURCE/parin.f90
- Timestamp:
- Sep 13, 2018 3:14:50 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/parin.f90
r3240 r3246 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Added error handling for input namelist via parin_fail_message 28 ! 29 ! 3240 2018-09-12 12:04:40Z Giersch 27 30 ! A check that controls the number of user-defined profiles on the restart file 28 31 ! with the one given for the current run has been added. … … 783 786 !-- The namelist "inipar" must be provided in the NAMELIST-file. 784 787 READ ( 11, initialization_parameters, ERR=10, END=11 ) 785 786 GOTO 12 787 788 10 message_string = 'errors in initialization_parameters & or no ' // & 789 'initialization_parameters-namelist ' // & 790 'found (CRAY-machines only)' 791 CALL message( 'parin', 'PA0271', 1, 2, 0, 6, 0 ) 788 GOTO 14 789 790 10 BACKSPACE( 11 ) 791 READ( 11 ,fmt='(A)') line 792 CALL parin_fail_message ( 'initialization_parameters', line ) 792 793 793 794 11 REWIND ( 11 ) 794 READ ( 11, inipar, ERR=1 3, END=14)795 READ ( 11, inipar, ERR=12, END=13 ) 795 796 796 797 message_string = 'namelist inipar is deprecated and will be ' // & … … 799 800 CALL message( 'parin', 'PA0017', 0, 1, 0, 6, 0 ) 800 801 801 GOTO 1 2802 GOTO 14 802 803 803 1 3 message_string = 'errors in inipar & or no inipar-namelist ' // &804 'found (CRAY-machines only)'805 CALL message( 'parin', 'PA0271', 1, 2, 0, 6, 0)806 807 1 4message_string = 'no initialization_parameters-namelist found'804 12 BACKSPACE( 11 ) 805 READ( 11 ,fmt='(A)') line 806 CALL parin_fail_message ( 'inipar', line ) 807 808 13 message_string = 'no initialization_parameters-namelist found' 808 809 CALL message( 'parin', 'PA0272', 1, 2, 0, 6, 0 ) 809 810 … … 813 814 !-- can be omitted. In that case default values are used for the 814 815 !-- parameters. 815 1 2line = ' '816 14 line = ' ' 816 817 817 818 REWIND ( 11 ) 818 819 line = ' ' 819 820 DO WHILE ( INDEX( line, '&runtime_parameters' ) == 0 ) 820 READ ( 11, '(A)', END= 20) line821 READ ( 11, '(A)', END=16 ) line 821 822 ENDDO 822 823 BACKSPACE ( 11 ) … … 824 825 ! 825 826 !-- Read namelist 826 READ ( 11, runtime_parameters ) 827 828 GOTO 21 829 830 20 REWIND ( 11 ) 827 READ ( 11, runtime_parameters, ERR = 15 ) 828 GOTO 18 829 830 15 BACKSPACE( 11 ) 831 READ( 11 ,fmt='(A)') line 832 CALL parin_fail_message ( 'runtime_parameters', line ) 833 834 16 REWIND ( 11 ) 831 835 line = ' ' 832 836 DO WHILE ( INDEX( line, '&d3par' ) == 0 ) 833 READ ( 11, '(A)', END= 21) line837 READ ( 11, '(A)', END=18 ) line 834 838 ENDDO 835 839 BACKSPACE ( 11 ) 836 837 840 841 ! 838 842 !-- Read namelist 839 READ ( 11, d3par )840 843 READ ( 11, d3par, ERR = 17, END = 18 ) 844 841 845 message_string = 'namelist d3par is deprecated and will be ' // & 842 846 'removed in near future. &Please use namelist ' // & 843 847 'runtime_parameters instead' 844 848 CALL message( 'parin', 'PA0487', 0, 1, 0, 6, 0 ) 845 846 21 CONTINUE 849 850 GOTO 18 851 852 17 BACKSPACE( 11 ) 853 READ( 11 ,fmt='(A)') line 854 CALL parin_fail_message ( 'd3par', line ) 855 856 18 CONTINUE 847 857 848 858 !
Note: See TracChangeset
for help on using the changeset viewer.