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

Add options to shr_abort_abort for reporting errors to ESMF logging #61

Closed
ekluzek opened this issue Jan 22, 2025 · 0 comments · Fixed by #62
Closed

Add options to shr_abort_abort for reporting errors to ESMF logging #61

ekluzek opened this issue Jan 22, 2025 · 0 comments · Fixed by #62
Labels
enhancement New feature or request

Comments

@ekluzek
Copy link

ekluzek commented Jan 22, 2025

Suggest adding the following optional arguments to shr_abort_abort: esmf_log_write, line, and file. line and file allow sending down the line and file for the originating error and would be used with errmsg in shr_log_mod. emsf_log_write would add a call to ESMF_LogWrite, that would look something like this...

logical :: esmf_log

if ( present(esmf_log_write) )then
   esmf_log = esmf_log_write
else
   esmf_log = .false.
end if
if ( esmf_log ) then
    rc = ESMF_FAILURE
    call ESMF_LogWrite(trim(string), &
                         ESMF_LOGMSG_ERROR, line=line, file=file)
end if

This means error checking would require that if esmf_log_write is .true. that line and file are also present. And we should probably require that BOTH file and line are sent as well in order to use errMsg. So they either need to all three be present, or both line and file be present.

This discussion started in ESCOMP/CMEPS#527 (comment)

@ekluzek ekluzek added the enhancement New feature or request label Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant