Skip to content

Conversation

@jedwards4b
Copy link
Contributor

Description of changes

replace shr_sys_abort with shr_log_error and return up the call tree with an error code.

Specific notes

After discussion we decided to implement the write to both logs, but also return up the call tree rather than abort with a stack. However some routines do not have a return code variable and will need further work to comply.
CDEPS Issues Fixed (include github issue #):

Are there dependencies on other component PRs (if so list):

Are changes expected to change answers (bfb, different to roundoff, more substantial):

Any User Interface Changes (namelist or namelist defaults changes):

Testing performed (e.g. aux_cdeps, CESM prealpha, etc):

Hashes used for testing:

@jedwards4b jedwards4b requested a review from billsacks January 31, 2025 15:29
@jedwards4b jedwards4b self-assigned this Jan 31, 2025
@jedwards4b jedwards4b changed the title WIP: shr_log_error shr_log_error and return up stack Jan 31, 2025
@DeniseWorthen
Copy link
Collaborator

I needed to add

diff --git a/streams/dshr_stream_mod.F90 b/streams/dshr_stream_mod.F90
index 691722e1..4dfff9ef 100644
--- a/streams/dshr_stream_mod.F90
+++ b/streams/dshr_stream_mod.F90
@@ -26,6 +26,7 @@ module dshr_stream_mod
   use shr_cal_mod      , only : shr_cal_advDate
   use shr_cal_mod      , only : shr_cal_advdateint
   use shr_cal_mod      , only : shr_cal_leapyear
+  use shr_sys_mod      , only : shr_sys_abort
   use dshr_methods_mod , only : chkerr
   use pio              , only : pio_noerr, pio_seterrorhandling, pio_inq_att, pio_openfile, pio_closefile
   use pio              , only : file_desc_t, pio_inq_varid, iosystem_desc_t, pio_file_is_open

to compile CDEPS when paired w/ the shr_log PR in CMEPS.

@jedwards4b
Copy link
Contributor Author

Fixed, thank you @DeniseWorthen

@DeniseWorthen
Copy link
Collaborator

I got some strange failures for the subset of tests I ran. I'll look into it more tomorrow.

Copy link
Member

@billsacks billsacks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much for making these changes, @jedwards4b ! This mostly looks good to me. I have a few notes below about a few places where I think minor changes are needed, but other places look good to me.

@jedwards4b jedwards4b requested a review from billsacks February 10, 2025 15:26
Copy link
Member

@billsacks billsacks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good now - thank you!!

@jedwards4b jedwards4b merged commit ec0a0c8 into ESCOMP:main Feb 12, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants