Skip to content

Add generic Norm object for oops - #203

Draft
DrTVockerodtMO wants to merge 6 commits into
developfrom
feature/jc_term_generic_norm
Draft

DrTVockerodtMO wants to merge 6 commits into
developfrom
feature/jc_term_generic_norm

Conversation

@DrTVockerodtMO

Copy link
Copy Markdown

Description

Adds required interface Norm object for https://github.com/JCSDA-internal/oops/pull/3413.

Dependencies

List the other PRs that this PR is dependent on:

@DrTVockerodtMO DrTVockerodtMO self-assigned this Oct 7, 2026
@DrTVockerodtMO
DrTVockerodtMO marked this pull request as ready for review October 9, 2026 03:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The registered norm cannot be instantiated or used because every operation throws unconditionally, and it lacks automated coverage.

1 open finding
What changed in this PR

Adds the ORCA model-specific Norm interface required by the dependent OOPS change.

Changes:

  • Registers Norm in OrcaModelTraits.
  • Adds the Norm class and method stubs.
  • Includes the new sources in the build.
File Description
src/​orca-jedi/​utilities/​OrcaModelTraits.h Exposes the ORCA norm type.
src/​orca-jedi/​norm/​Norm.h Declares the norm interface.
src/​orca-jedi/​norm/​Norm.cc Defines currently unimplemented operations.
src/​orca-jedi/​CMakeLists.txt Adds norm sources to the library.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/orca-jedi/norm/Norm.cc Outdated
Comment on lines +14 to +16
Norm::Norm(const oops::Variables &,
const eckit::Configuration &) {
throw eckit::NotImplemented(Here());

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Silly copilot that is literally the point of the change is to safely abort when the unimplemented norm is called!

@twsearle

Copy link
Copy Markdown
Collaborator

I think copilot is wrong here, but it does raise the question, when combined with the upstream OOPS change would we expect our 3DVar tests to start failing?

@twsearle Toby Searle (twsearle) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I added a comment above, but just to elaborate, orca-jedi CI doesn't have build-group syntax implemented yet. Have you ran our tests in a build including the upstream OOPS change?

@DrTVockerodtMO

Copy link
Copy Markdown
Author

I think copilot is wrong here, but it does raise the question, when combined with the upstream OOPS change would we expect our 3DVar tests to start failing?

I don't think so no, because currently the Norm object is only being used and created with specific configuration options when using the CostJcDFI cost function.

@DrTVockerodtMO

Copy link
Copy Markdown
Author

I added a comment above, but just to elaborate, orca-jedi CI doesn't have build-group syntax implemented yet. Have you ran our tests in a build including the upstream OOPS change?

Yes, I ran this with mo-bundle on cylc as it was necessary to get everything to compile. It seems that the orca-jedi tests have passed: https://cylchub/services/cylc-review/taskjobs/terence.vockerodt?&suite=mobbm-xyz-jc_term_generic_norm_2%2Frun1&no_fuzzy_time=0&tasks=ctest_orca_jedi__exab_gnu

@DrTVockerodtMO

Copy link
Copy Markdown
Author

N.B. because there are a lot of model interface changes required we may investigate a solution which doesn't require this change, I will keep you posted if/when that happens!

@twsearle

Copy link
Copy Markdown
Collaborator

N.B. because there are a lot of model interface changes required we may investigate a solution which doesn't require this change, I will keep you posted if/when that happens!

OK! I will stick it in draft for now so I don't merge by accident.

@twsearle
Toby Searle (twsearle) marked this pull request as draft October 15, 2026 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants