Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modern diag_manager:: diag_send_complete_instant has not been implemented #1528

Open
uramirez8707 opened this issue May 17, 2024 · 2 comments
Labels
enhancement Issue/PR for a modification that increases performance, improves syntax, or adds functionality.

Comments

@uramirez8707
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Diag_send_complete_instant has not been implemented in the modern diag_manager, so it will do nothing and cause failures

!> @brief The subroutine 'diag_send_complete_instant' allows the user to
!! save diagnostic data on variable intervals (user defined in code logic)
!! to the same file. The argument (time_type) will be written to the
!! time axis correspondingly.
!!
!> The user is responsible for any averaging of accumulated data
!! as this routine is not designed for instantaneous values. This routine
!! works only for send_data calls within OpenMP regions as they are buffered
!! until the complete signal is given.
SUBROUTINE diag_send_complete_instant(time)
TYPE (time_type), INTENT(in) :: time
!--- local variables
integer :: file, j, freq, in_num, file_num, out_num
DO file = 1, num_files
freq = files(file)%output_freq
IF (freq == 0) then
DO j = 1, files(file)%num_fields
out_num = files(file)%fields(j)
in_num = output_fields(out_num)%input_field
IF ( (input_fields(in_num)%numthreads == 1) .AND.&
& (input_fields(in_num)%active_omp_level.LE.1) ) CYCLE
file_num = output_fields(out_num)%output_file
CALL diag_data_out(file_num, out_num, &
& output_fields(out_num)%buffer, time)
END DO
END IF
END DO
END SUBROUTINE diag_send_complete_instant

Describe the solution you'd like
Diag_send_complete_instant needs to be implemented as it is used in SHiELD
https://github.com/NOAA-GFDL/atmos_drivers/blob/113a25fe6fea86bb5dce8fee064740b4b96237b9/SHiELD/atmos_model.F90#L738

Describe alternatives you've considered
N/A

Additional context
N/A

@uramirez8707 uramirez8707 added the enhancement Issue/PR for a modification that increases performance, improves syntax, or adds functionality. label May 17, 2024
@uramirez8707
Copy link
Contributor Author

@laurenchilutti I think this is the cause of the full SHiELD test

FATAL from PE    17: atmos_4xdaily: diag_manager_mod: You skipped a time_step. Be sure that diag_send_complete is called at every time_step needed by the file.

fyi @bensonr

@bensonr
Copy link
Contributor

bensonr commented May 17, 2024

@uramirez8707 - do you think there is a way to set the variables in the diag_table[.yaml] to get around having to implement this function?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issue/PR for a modification that increases performance, improves syntax, or adds functionality.
Projects
None yet
Development

No branches or pull requests

2 participants