Skip to content

Commit

Permalink
Merge pull request #552 from EPIC-model/fix-resetting-diagnostics
Browse files Browse the repository at this point in the history
Add missing stop_timer; fix resetting parcel split and merge diagnostics
  • Loading branch information
matt-frey authored Jan 24, 2024
2 parents a55654f + 0807d8e commit 5d953cd
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/3d/parcels/parcel_diagnostics_netcdf.f90
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,12 @@ subroutine write_netcdf_parcel_stats(t)

call start_timer(parcel_stats_io_timer)

! reset counters for parcel operations
n_parcel_splits = 0
n_parcel_merges = 0

if (world%rank /= world%root) then
call stop_timer(parcel_stats_io_timer)
return
endif

Expand Down Expand Up @@ -383,10 +388,6 @@ subroutine write_netcdf_parcel_stats(t)
! increment counter
n_writes = n_writes + 1

! reset counters for parcel operations
n_parcel_splits = 0
n_parcel_merges = 0

call close_netcdf_file(ncid, l_serial=.true.)

call stop_timer(parcel_stats_io_timer)
Expand Down

0 comments on commit 5d953cd

Please sign in to comment.