c subroutine nlerr(luinp) character*72 char72 character*8 char8 integer unlink c c There was a problem with namelist inputs. Namelist (nlr) output is c in file connected to luinp (fort.luinp). c Type is either "sut" (single-ut inputs) or "mut" (multi-ut inputs). c Read luinp file to end and print last line to stdout as hint as to c what went wrong. c write(6,"(/72('>'))") write(6,"('AN ERROR HAS OCCURRED READING NAMELIST INPUT ', + 'PARAMETERS FOR A POST-MODEL PROCESSOR')") if (luinp.le.9) then write(char8,"('fort.',i1)") luinp else write(char8,"('fort.',i2)") luinp endif c c Read namelist output file, save last line: c close(luinp) ! flush buffer open(luinp,file=char8,status="OLD") 100 read(luinp,"(a)",end=200) char72 goto 100 200 continue c c Remove namelist output file: c close(luinp) i = unlink(char8) c c Report to stdout and quit: c write(6,"('namelist apparently aborted at the following ', + 'input line:')") write(6,"(/a/)") char72 write(6,"('Common namelist problems:')") write(6,"(' 1. Invalid input parameter.')") write(6,"(' 2. Trailing comma at end of line.')") write(6,"(' 3. Wrong data type.')") write(6,"(' 4. Unquoted literal strings.')") write(6,"(72('<')/)") stop 'input' end