Skip to content

Commit

Permalink
Remove time_step_count from the buffer object. This is not actually n…
Browse files Browse the repository at this point in the history
…eeded
  • Loading branch information
uramirez8707 committed Aug 25, 2023
1 parent 2f984bd commit 51e5055
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
2 changes: 0 additions & 2 deletions diag_manager/fms_diag_object.F90
Original file line number Diff line number Diff line change
Expand Up @@ -891,8 +891,6 @@ function fms_diag_do_reduction(this, field_data, diag_field_id, oor_mask, weight
"Only none, min, max, sum, average, power, rms, and diurnal are supported."
end select

call buffer_ptr%increase_time_step_count()

if (field_ptr%is_static() .or. file_ptr%FMS_diag_file%is_done_writing_data()) then
call buffer_ptr%set_done_with_math()
endif
Expand Down
21 changes: 0 additions & 21 deletions diag_manager/fms_diag_output_buffer.F90
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ module fms_diag_output_buffer_mod
integer, allocatable :: axis_ids(:) !< Axis ids for the buffer
integer :: field_id !< The id of the field the buffer belongs to
integer :: yaml_id !< The id of the yaml id the buffer belongs to
integer :: time_step_count !< The number of times that have been sent in this time_period
type(time_type) :: time_period_end !< The time that the current math period ends
logical :: done_with_math !< .True. if done doing the math

Expand All @@ -70,8 +69,6 @@ module fms_diag_output_buffer_mod
procedure :: get_time_period_end
procedure :: is_done_with_math
procedure :: set_done_with_math
procedure :: get_time_step_count
procedure :: increase_time_step_count
procedure :: write_buffer
!! These are needed because otherwise the write_data calls will go into the wrong interface
procedure :: write_buffer_wrapper_netcdf
Expand Down Expand Up @@ -368,7 +365,6 @@ subroutine set_time_period_end(this, is_static, freq, freq_units, init_time)
this%time_period_end = diag_time_inc(local_time_init, freq, freq_units)
endif

this%time_step_count = 0
this%done_with_math = .false.
end subroutine

Expand Down Expand Up @@ -400,23 +396,6 @@ subroutine set_done_with_math(this)
this%done_with_math = .true.
end subroutine set_done_with_math

!> @brief Get the time_step_count
!! @return A copy of time_step_count
function get_time_step_count(this) &
result(res)
class(fmsDiagOutputBuffer_type), intent(in) :: this !< Buffer object
integer :: res

res = this%time_step_count
end function get_time_step_count

!> @brief Increate the time_step count by 1
subroutine increase_time_step_count(this)
class(fmsDiagOutputBuffer_type), intent(inout) :: this !< Buffer object

this%time_step_count = this%time_step_count + 1
end subroutine increase_time_step_count

!> @brief Get the yaml id of the buffer
!! @return the yaml id of the buffer
function get_yaml_id(this) &
Expand Down

0 comments on commit 51e5055

Please sign in to comment.