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 rmsByLevel function #18

Merged
merged 4 commits into from
Sep 22, 2022

Conversation

mo-joshuacolclough
Copy link
Collaborator

@mo-joshuacolclough mo-joshuacolclough commented Sep 13, 2022

Description

Adds rmsByLevel function in Increments.h. Required by OOPS PR JCSDA-internal/oops/pull/1893. Note: It seems this does not affect any of the test YAMLs.

Issue(s) addressed

Acceptance Criteria (Definition of Done)

SPICE intel builds are failing but I don't think it is due to these changes.

Dependencies

  • waiting on JCSDA-internal/oops/pull/1901 (Old: JCSDA-internal/oops/pull/1893)

Copy link
Collaborator

@twsearle twsearle left a comment

Choose a reason for hiding this comment

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

I am curious what are the merits of using oops abort as opposed to throwing an exception? Elsewhere I have been throwing exceptions, but perhaps this is contrary to the jedi style?

@mo-joshuacolclough
Copy link
Collaborator Author

I am curious what are the merits of using oops abort as opposed to throwing an exception? Elsewhere I have been throwing exceptions, but perhaps this is contrary to the jedi style?

Hmm, I don't know the details but perhaps @tf17270 can answer more fully? By looking at the code for the ABORT function (JCSDA-internal/oops/blob/develop/src/oops/util/abor1_cpp.cc), it looks like it's ensuring that any other MPI processes also abort with oops::mpi::world().abort(EXIT_FAILURE);.

@tf17270
Copy link

tf17270 commented Sep 13, 2022

I am curious what are the merits of using oops abort as opposed to throwing an exception? Elsewhere I have been throwing exceptions, but perhaps this is contrary to the jedi style?

Hmm, I don't know the details but perhaps @tf17270 can answer more fully? By looking at the code for the ABORT function (JCSDA-internal/oops/blob/develop/src/oops/util/abor1_cpp.cc), it looks like it's ensuring that any other MPI processes also abort with oops::mpi::world().abort(EXIT_FAILURE);.

Let me preface this by saying its just by looking and extrapolating from the fact I was asked to use abort. I have seen within oops that abort is the preference for where functionality doesn't exist but and except (often wrapped up in oops::EXPECT statements) are used in cases where there are yaml validation failures or other errors associated with values not being what they were meant to be

@twsearle
Copy link
Collaborator

Thanks very much @tf17270 and @mo-joshuacolclough that makes sense! I will add that little bit of refactoring to my list!

@mo-joshuacolclough mo-joshuacolclough merged commit f19e265 into develop Sep 22, 2022
@mo-joshuacolclough mo-joshuacolclough deleted the feature/add_rms_by_level_qg_increments branch September 22, 2022 13:06
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.

Add rmsByLevel method to Increment
4 participants