Skip to content

Commit

Permalink
Corrected terminal message for creating trajectory file
Browse files Browse the repository at this point in the history
- Message used to say "creating" even when appending.
- No answer changes.
  • Loading branch information
adcroft committed Jul 16, 2015
1 parent cea2074 commit 6af1a80
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion icebergs_io.F90
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,6 @@ subroutine write_trajectory(trajectory)
write(filename,'(A,".",I6.6)') trim(filename), mpp_pe()
endif
endif
if (verbose) write(*,'(2a)') 'diamonds, write_trajectory: creating ',filename

io_is_in_append_mode = .false.
iret = nf_create(filename, NF_NOCLOBBER, ncid)
Expand All @@ -919,6 +918,13 @@ subroutine write_trajectory(trajectory)
io_is_in_append_mode = .true.
if (iret .ne. NF_NOERR) write(stderrunit,*) 'diamonds, write_trajectory: nf_open failed'
endif
if (verbose) then
if (io_is_in_append_mode) then
write(*,'(2a)') 'diamonds, write_trajectory: appending to ',filename
else
write(*,'(2a)') 'diamonds, write_trajectory: creating ',filename
endif
endif

if (io_is_in_append_mode) then
iret = nf_inq_dimid(ncid, 'i', i_dim)
Expand Down

0 comments on commit 6af1a80

Please sign in to comment.