diff --git a/src/data/write_init_files.py b/src/data/write_init_files.py index 4e90de17..1918a994 100644 --- a/src/data/write_init_files.py +++ b/src/data/write_init_files.py @@ -971,8 +971,8 @@ def write_phys_read_subroutine(outfile, host_dict, host_vars, host_imports, outfile.write("end if", 7) outfile.write("if (constituent_has_default) then", 7) outfile.write("call const_props(constituent_idx)%default_value(constituent_default_value, constituent_errflg, constituent_errmsg)", 8) - outfile.write("if (constituent_errflg .ne. 0) then", 8) - outfile.write("call endrun(constituent_errmsg)", 9) + outfile.write("if (constituent_errflg /= 0) then", 8) + outfile.write("call endrun(constituent_errmsg, file=__FILE__, line=__LINE__)", 9) outfile.write("end if", 8) outfile.write("field_data_ptr(:,:,constituent_idx) = constituent_default_value", 8) outfile.write("if (masterproc) then", 8)