added 'int f_nerr' for external routines. DLW