Skip to content

Commit

Permalink
make fms_diag_accept_data a subroutine instead of a function
Browse files Browse the repository at this point in the history
  • Loading branch information
uramirez8707 committed Nov 12, 2024
1 parent 4ca2638 commit c1062e7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions diag_manager/diag_manager.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1789,7 +1789,7 @@ LOGICAL FUNCTION diag_send_data(diag_field_id, field, time, is_in, js_in, ks_in,
allocate(mask_remap(1:size(mask,1), 1:size(mask,2), 1:size(mask,3), 1))
mask_remap(:,:,:,1) = mask
endif
diag_send_data = fms_diag_object%fms_diag_accept_data(diag_field_id, field_remap, mask_remap, rmask_remap, &
call fms_diag_object%fms_diag_accept_data(diag_field_id, field_remap, mask_remap, rmask_remap, &
time, is_in, js_in, ks_in, ie_in, je_in, ke_in, weight, &
err_msg)
deallocate (field_remap)
Expand Down Expand Up @@ -3518,7 +3518,7 @@ LOGICAL FUNCTION send_data_4d(diag_field_id, field, time, is_in, js_in, ks_in, &
if (present(mask)) mask_local = mask
if (present(rmask)) rmask_local = rmask

send_data_4d = fms_diag_object%fms_diag_accept_data(diag_field_id, field, mask_local, rmask_local, &
call fms_diag_object%fms_diag_accept_data(diag_field_id, field, mask_local, rmask_local, &
time, is_in, js_in, ks_in, ie_in, je_in, ke_in, weight, &
err_msg)

Expand Down
5 changes: 2 additions & 3 deletions diag_manager/fms_diag_object.F90
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ end function fms_diag_axis_init
!! multithreaded case.
!! \note If some of the diag manager is offloaded in the future, then it should be treated similarly
!! to the multi-threaded option for processing later
logical function fms_diag_accept_data (this, diag_field_id, field_data, mask, rmask, &
subroutine fms_diag_accept_data (this, diag_field_id, field_data, mask, rmask, &
time, is_in, js_in, ks_in, &
ie_in, je_in, ke_in, weight, err_msg)
class(fmsDiagObject_type),TARGET, INTENT(inout) :: this !< Diaj_obj to fill
Expand Down Expand Up @@ -710,9 +710,8 @@ logical function fms_diag_accept_data (this, diag_field_id, field_data, mask, rm
call this%FMS_diag_fields(diag_field_id)%set_mask(oor_mask, field_info)
end if main_if
!> Return false if nothing is done
fms_diag_accept_data = .TRUE.
#endif
end function fms_diag_accept_data
end subroutine fms_diag_accept_data

!< @brief Do the math for all the buffers
subroutine do_buffer_math(this)
Expand Down

0 comments on commit c1062e7

Please sign in to comment.