diff --git a/diag_manager/diag_manager.F90 b/diag_manager/diag_manager.F90 index 0714cfe59..d6078b653 100644 --- a/diag_manager/diag_manager.F90 +++ b/diag_manager/diag_manager.F90 @@ -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) @@ -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) diff --git a/diag_manager/fms_diag_object.F90 b/diag_manager/fms_diag_object.F90 index f4c892dec..7f8ad6d9a 100644 --- a/diag_manager/fms_diag_object.F90 +++ b/diag_manager/fms_diag_object.F90 @@ -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 @@ -681,8 +681,6 @@ logical function fms_diag_accept_data (this, diag_field_id, field_data, mask, rm !$omp end critical call this%FMS_diag_fields(diag_field_id)%set_data_buffer(field_data, oor_mask, field_weight, & is, js, ks, ie, je, ke) - fms_diag_accept_data = .TRUE. - return else !< At this point if we are no longer in an openmp region or running with 1 thread @@ -710,13 +708,10 @@ logical function fms_diag_accept_data (this, diag_field_id, field_data, mask, rm if(.not. this%FMS_diag_fields(diag_field_id)%has_mask_allocated()) & call this%FMS_diag_fields(diag_field_id)%allocate_mask(oor_mask) call this%FMS_diag_fields(diag_field_id)%set_mask(oor_mask, field_info) - return end if main_if !> Return false if nothing is done - fms_diag_accept_data = .FALSE. - return #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) diff --git a/test_fms/diag_manager/test_diag_manager2.sh b/test_fms/diag_manager/test_diag_manager2.sh index 7b280c885..3b4092108 100755 --- a/test_fms/diag_manager/test_diag_manager2.sh +++ b/test_fms/diag_manager/test_diag_manager2.sh @@ -786,7 +786,7 @@ diag_files: kind: r4 - module: atm_mod var_name: var7 - reduction: average + reduction: none kind: r4 - file_name: file4 freq: 6 hours @@ -1050,7 +1050,7 @@ diag_files: dimensions: time grid_index - module: atm_mod var_name: var7 - reduction: average + reduction: none kind: r4 output_name: long_name: diff --git a/test_fms/diag_manager/test_modern_diag.F90 b/test_fms/diag_manager/test_modern_diag.F90 index f32b5c5da..fe03645ce 100644 --- a/test_fms/diag_manager/test_modern_diag.F90 +++ b/test_fms/diag_manager/test_modern_diag.F90 @@ -199,6 +199,8 @@ program test_modern_diag call allocate_dummy_data(var_data, domain, Domain_cube_sph, land_domain, nz) Time_step = set_time (3600,0) !< 1 hour +call set_dummy_data(var_data, 666) +used = send_data(id_var8, var_data%var6, Time) do i=1,23 Time = Time + Time_step call set_dummy_data(var_data, i) @@ -210,9 +212,6 @@ program test_modern_diag used = send_data(id_var6, var_data%var6, Time) used = send_data(id_var7, var_data%var6, Time) - !TODO I don't know about this (scalar field) or how this is suppose to work #WUT - used = send_data(id_var8, var_data%var6, Time) - call diag_send_complete(Time_step) enddo call deallocate_dummy_data(var_data)