Skip to content

Commit

Permalink
Update src/data/write_init_files.py
Browse files Browse the repository at this point in the history
Updating not equal comparison to match current code style.  Adding line number and file name to error message.

Co-authored-by: Jesse Nusbaumer <[email protected]>
  • Loading branch information
mwaxmonsky and nusbaume committed Aug 1, 2023
1 parent 3f400ec commit 839047a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/data/write_init_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -966,8 +966,8 @@ def write_phys_read_subroutine(outfile, host_dict, host_vars, host_imports,
outfile.write("const_props => cam_model_const_properties()", 7)
outfile.write("constituent_has_default = .false.", 7)
outfile.write("call const_props(constituent_idx)%has_default(constituent_has_default, constituent_errflg, constituent_errmsg)", 7)
outfile.write("if (constituent_errflg .ne. 0) then", 7)
outfile.write("call endrun(constituent_errmsg)", 8)
outfile.write("if (constituent_errflg /= 0) then", 7)
outfile.write("call endrun(constituent_errmsg, file=__FILE__, line=__LINE__)", 8)
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)
Expand Down

0 comments on commit 839047a

Please sign in to comment.