Skip to content

Add monthly averages - #553

Merged
xylar merged 9 commits into
E3SM-Project:developfrom
brian-oneill:omega/analysis-monthly-avgs
Sep 29, 2026
Merged

xylar merged 9 commits into
E3SM-Project:developfrom
brian-oneill:omega/analysis-monthly-avgs

Conversation

@brian-oneill

@brian-oneill brian-oneill commented Sep 14, 2026 •

Copy link
Copy Markdown

Add MonthlyAverages to Omega's analysis framework that computes calendar-month time averages of requested fields and refactor the TimeMeanOp operator to use hierarchical parallelism bounded by the VertCoord active-layer arrays so only active vertical layers are averaged and inactive layers retain their fill values. Register the new MonthlyAverages analysis group, wire it into the analysis configuration and default config, and extend the operator unit test to verify active layers equal the analytic time mean. This adds a commonly requested diagnostic output and makes time averaging correct and efficient for column-structured mesh fields.


Summary

Add a MonthlyAverages analysis group to Omega and refactor TimeMeanOp to average only active vertical layers.

Changes

MonthlyAverages analysis group

  • Add the MonthlyAverages analysis group (header, implementation, registration in Groups.h and Analysis.cpp).
  • Add configuration entries to configs/Default.yml so the group can be enabled and configured.
  • Document the capability in doc/userGuide/Analysis.md.

TimeMeanOp refactor

  • Add initialize() override that detects the horizontal index space (cells, edges, or vertices) from the input field's dimension names and stores the appropriate VertCoord MinLayer/MaxLayer arrays for rank-2/3 mesh fields.
  • Rewrite compute() as a three-phase state machine delegating to accumInit, accumAdd, and finalize helpers.
  • Bound the accumulation to active layers [MinLayer, MaxLayer] using hierarchical parallelForOuter/parallelForInner, preserving FillValueReal in inactive layers; fall back to a flat parallel loop for scalars, rank-1, and non-mesh outputs.
  • Do not abort on an unrecognized index space, so TimeMean continues to work for non-mesh outputs such as spatial-reduction scalars and lat/depth arrays.

Checklist

  • Documentation:

  • Linting

  • Building

    • CMake build does not produce any new warnings from changes in this PR
  • Testing

    aurora, oneapi-ifx, mpich

    • CTests Pass
    • Polaris omega_pr Pass

    chrysalis, oneapi-ifx, openmpi

    • CTests Pass
    • Polaris omega_pr Pass

    frontier, craygnu, mpich

    • CTests Pass
    • Polaris omega_pr Pass

    frontier, craygnu-mphipcc, mpich

    • CTests Pass
    • Polaris omega_pr Pass

    pm-cpu, gnu, mpich

    • CTests Pass
    • Polaris omega_pr Pass

    pm-gpu, gnugpu, mpich

    • CTests Pass
    • Polaris omega_pr Pass
  • Provide relevant details in a comment to the PR titled Testing with the following:

    • Which machines CTest unit tests
      have been run on and indicate that are all passing.
    • The Polaris omega_pr test suite
      has passed, using the Polaris e3sm_submodules/Omega baseline
    • Document machine(s), compiler(s), and the build path(s) used for -p for both the baseline (Polaris e3sm_submodules/Omega) and the PR build
    • Indicate "All tests passed" or document failing tests
    • Document testing used to verify the changes including any tests that are added/modified/impacted.
  • Performance related PRs: Please include a relevant PACE experiment link documenting performance before and after.

  • New tests:

    • CTest unit tests for new features have been added per the approved design.
    • Polaris tests for new features have been added per the approved design (and included in a test suite)
  • Stealth Features

    • If any stealth features are included in the PR, please confirm that they have been documented.

@xylar xylar left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Read the diff and built the branch merged with #481 on Chrysalis (intel, openmpi); a one-year QU240 run with MonthlyAverages on is queued behind today's maintenance and I will follow up with what it wrote. Two things need changing before the output can be used as monthly means: the fields are not marked as time means, so their stream gets no time_bnds, and the active-layer loops skip the bottom interface of fields on NVertLayersP1. Both are inline. Copying Units and StdName into the time mean fixes #545 for TimeMean; the spatial operators still drop them, so that issue stays open. I could not check restart behavior yet.


Posted by Claude Code on @xylar's behalf. The testing, analysis and wording above are AI-authored; please check them accordingly.

Comment on lines 94 to 103
auto OutputField =
Field::create(OutputNames[0],
"Time average of " + InputNames[0], // Description
"", // Units
"", // Standard name
-std::numeric_limits<Real>::max(), // Min valid value
std::numeric_limits<Real>::max(), // Max valid value
NDims, // Rank
DimNames // Dimension names
"Time average of " + InputDescr, // Description
InputUnits, // Units
InputStdName, // Standard name
-std::numeric_limits<Real>::max(), // Min valid value
std::numeric_limits<Real>::max(), // Max valid value
NDims, // Rank
DimNames // Dimension names
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The output field is created without cell_methods = "time: mean", so nothing marks it as a time mean and its stream gets no time_bnds (#549). #481 adds the stamp right here, OutputField->addMetadata("cell_methods", std::string("time: mean")), and has IOStream write time_bnds for any stream whose fields carry it. If #481 merges first, a rebase brings both; otherwise this PR needs them, since a monthly mean without its bounds is not usable as one.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

After the latest updates, there's a conflict in AnalysisOperatorTest.cpp. Let's merge #481 in first, and then I'll do a rebase to fix everything.

Comment thread components/omega/src/analysis/operators/TimeMeanOp.h
Comment thread components/omega/src/analysis/analysisGroups/MonthlyAverages.cpp Outdated
Comment thread components/omega/doc/userGuide/Analysis.md Outdated
Comment thread components/omega/src/analysis/operators/TimeMeanOp.h
@xylar

xylar commented Sep 15, 2026 •

Copy link
Copy Markdown

Testing

I ran one simulated year at QU240 with MonthlyAverages on (nine fields, 1Month), from this branch at 247ad78 merged locally with #481 at d31f221, on Chrysalis with Intel and OpenMPI:

/lcrc/group/e3sm/ac.xylar/polaris_1.1/chrysalis/test_20260914/qu240-monthly-avgs/ocean/analysis_test/QU240/forward

The run completed and wrote the twelve monthly_means_1MonthTimeStats.*.nc files with Units, StdName and cell_methods on every field and, from #481, time_bnds. Inactive layers are _FillValue and active layers are finite; the means are smoother than the monthly snapshots written beside them. The one problem is the bottom interface of GeomZInterface, in the thread above. cfchecks reports only what #544 already covers. Polaris's analysis of the means is at https://web.lcrc.anl.gov/public/e3sm/diagnostic_output/xasaydavis/omega_analysis_qu240_real_means_20260915/. The maps at -100 m, -500 m and -2000 m there are blank: the interpolation masks a column by its bottom interface, which is _FillValue in the time mean (the thread on TimeMeanOp.h). The maps at the top, the bottom and by layer index are unaffected. A continuation from the run's 0001-03-01 restart for two months reproduces the monthly means bit for bit (/lcrc/group/e3sm/ac.xylar/polaris_1.1/chrysalis/test_20260915/qu240-restart-from-0001-03-01), with the caveat about develop's alarms on restart described on #481.


Posted by Claude Code on @xylar's behalf. The testing, analysis and wording above are AI-authored; please check them accordingly.

xylar added a commit to xylar/polaris that referenced this pull request Sep 15, 2026
The design expected the monthly means to arrive in a stream of their
own rather than in History, where the mock-up had them, and
E3SM-Project/Omega#553 gives them one: the MonthlyAverages analysis
group.  Its stream is found the way the global statistics' is.

Omega names a monthly mean for the instant it was finalized, the start
of the following month (E3SM-Project/Omega#554), so the file named
0001-02 holds January of year 1.  expand_template takes a month offset
and every time-mean stream with a month in its template is expanded
with an offset of one; the year and month a SimFile carries are still
the ones it covers.

Each field of a time mean is named for the field and the period,
Temperature_TimeMean1Month; time_mean_suffix says what to strip.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@mark-petersen

Copy link
Copy Markdown
Collaborator

@brian-oneill, I am testing this branch in combination with a new mixing diagnostic (DVD) written by Cage Mitchell. The variables he added are:

DVD_T, DVD_S, DVD_T2, DVD_S2

and I added those to the Monthly Average. I get the error

[critical] [Analysis.cpp:247] Analysis: Error trying to parse DVD_T_TimeMean1Month. No Field or Operator named DVD

so it looks like underscores in the variable name cause this problem, since we are normally using CamelCase. Do you agree? You are using the underscore to parse the _TimeMean1Month correct?

@brian-oneill

Copy link
Copy Markdown
Author

@mark-petersen Yes, the analysis parser uses underscores as a delimiter, breaking the chains into the names of either fields or operators. Since we are using PascalCase for variable names, I would suggest the new variables use names like DvdT2.

@mark-petersen

Copy link
Copy Markdown
Collaborator

Thanks! That was a simple change and it all works now.

@mark-petersen
mark-petersen self-requested a review September 24, 2026 16:46

@mark-petersen mark-petersen 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 tested on perlmutter-cpu with gnu using the SOMA test case and this works great! I added numerous variables, ran for a year, and visualized the last month. Analysis was with Cage Mitchell. Thanks!

Image

@xylar

xylar commented Sep 28, 2026

Copy link
Copy Markdown

@brian-oneill, now that #481 is merged, this is ready for a rebase. Thanks for all this hard work!!

@xylar

xylar commented Sep 29, 2026

Copy link
Copy Markdown

I will test this soon and hopefully get it merged. I'm doing some Polaris updating first.

@xylar

xylar commented Sep 29, 2026

Copy link
Copy Markdown

Testing: chrysalis, oneapi-ifx, openmpi (Polaris intel)

CTests: 50 of 50 passed. omega_pr: 28 of 28 tasks passed.

Tested the merge of #553 (54456ecaed) into develop (39689a97b8) as 7665aab2dd, against Polaris' Omega submodule (39689a97b8).

Polaris omega_pr suite

  • Baseline workdir: /lcrc/group/e3sm/ac.xylar/polaris_1.1/chrysalis/test_20260929/omega_pr_test/baselines/chrysalis_intel_polaris-3664146_omega-39689a9/omega_pr
  • Baseline build: /lcrc/group/e3sm/ac.xylar/polaris_1.1/chrysalis/test_20260929/omega_pr_test/baselines/chrysalis_intel_polaris-3664146_omega-39689a9/build
  • PR build: /lcrc/group/e3sm/ac.xylar/polaris_1.1/chrysalis/test_20260929/omega_pr_test/pr553-54456ec/chrysalis_intel/build
  • PR workdir: /lcrc/group/e3sm/ac.xylar/polaris_1.1/chrysalis/test_20260929/omega_pr_test/pr553-54456ec/chrysalis_intel/omega_pr
  • Polaris: 36641468a0048f053377232cd1249599970f582a (1.0.0-856-g36641468a)
  • Baseline Omega: 39689a97b8a746bce7619c759ef9126424c703d2 (bp_maint3.2-2846-g39689a97b8)
  • PR Omega: 7665aab2dda4deaa91ad885a6221baaae27b7a7d (bp_maint3.2-2855-g7665aab2dd)
  • Machine: chrysalis
  • Partition: debug
  • Compiler: intel
  • Build type: Release
  • Log: /lcrc/group/e3sm/ac.xylar/polaris_1.1/chrysalis/test_20260929/omega_pr_test/pr553-54456ec/chrysalis_intel/omega_pr/polaris_omega_pr.o1298224
  • Result: All tests passed
Recent commits

Polaris:

36641468a Document the Omega PR testing utility
1b76ce37e Add tests for the Omega PR testing report and status commands
da8b76bf6 Add the report and status commands to the Omega PR testing utility
e226ec468 Add tests for the build warnings comparison
c06a18ecb Add a comparison of build warnings to the Omega PR testing utility

Baseline Omega:

39689a97b8 Merge pull request #574 from grnydawn/ykim/omega/duplicate-gptl-link
36b1cd5533 Merge pull request #481 from brian-oneill/omega/analysis-moc-streamfunction
c1aacdc2d7 Merge pull request #552 from xylar/omega/fix-analysis-area-weighting
272e03d983 Merge pull request #547 from xylar/omega/earth-radius
f4e3167ba4 Merge pull request #507 from E3SM-Project/andrewdnolan/omega/g-case-coupling

PR Omega:

7665aab2dd Test merge of E3SM-Project/Omega#553 (54456ecaed) into develop (39689a97b8)
39689a97b8 Merge pull request #574 from grnydawn/ykim/omega/duplicate-gptl-link
36b1cd5533 Merge pull request #481 from brian-oneill/omega/analysis-moc-streamfunction
c1aacdc2d7 Merge pull request #552 from xylar/omega/fix-analysis-area-weighting
272e03d983 Merge pull request #547 from xylar/omega/earth-radius

CTest unit tests:

  • Machine: chrysalis
  • Compiler: intel
  • Build type: Release
  • Build: /lcrc/group/e3sm/ac.xylar/polaris_1.1/chrysalis/test_20260929/omega_pr_test/pr553-54456ec/chrysalis_intel/build
  • Omega: 7665aab2dda4deaa91ad885a6221baaae27b7a7d (bp_maint3.2-2855-g7665aab2dd)
  • Result: All tests passed
  • Log: /lcrc/group/e3sm/ac.xylar/polaris_1.1/chrysalis/test_20260929/omega_pr_test/pr553-54456ec/chrysalis_intel/build/ctests.log

Build warnings

No new warnings (39 in the PR build, 39 in the baseline build).

  • Baseline build log: /lcrc/group/e3sm/ac.xylar/polaris_1.1/chrysalis/test_20260929/omega_pr_test/baselines/chrysalis_intel_polaris-3664146_omega-39689a9/build/build_omega.log
  • PR build log: /lcrc/group/e3sm/ac.xylar/polaris_1.1/chrysalis/test_20260929/omega_pr_test/pr553-54456ec/chrysalis_intel/build/build_omega.log

Notes

ocean/column/vmix_unstable has failing energy and salt conservation property checks, with identical errors in the baseline and PR runs, so they predate this PR. Property checks do not fail a task.


Posted by Claude Code on @xylar's behalf. The testing, analysis and wording above are AI-authored; please check them accordingly.

@xylar

xylar commented Sep 29, 2026

Copy link
Copy Markdown

Testing: lint and docs

Omega CI's lint and test docs job on the PR head 54456ecaed finished with success.

  • pre-commit on the files the PR changes: passed (CI)
  • Documentation build (make html-strict): passed (CI)

Posted by Claude Code on @xylar's behalf. The testing, analysis and wording above are AI-authored; please check them accordingly.

@xylar

xylar commented Sep 29, 2026

Copy link
Copy Markdown

Testing: pm-gpu, gnugpu, mpich

CTests: 50 of 50 passed. omega_pr: 28 of 28 tasks passed.

Tested the merge of #553 (54456ecaed) into develop (39689a97b8) as 7665aab2dd, against Polaris' Omega submodule (39689a97b8).

Polaris omega_pr suite

  • Baseline workdir: /pscratch/sd/x/xylar/polaris_1.1/omega_pr_test/baselines/pm-gpu_gnugpu_polaris-3664146_omega-39689a9/omega_pr
  • Baseline build: /pscratch/sd/x/xylar/polaris_1.1/omega_pr_test/baselines/pm-gpu_gnugpu_polaris-3664146_omega-39689a9/build
  • PR build: /pscratch/sd/x/xylar/polaris_1.1/omega_pr_test/pr553-54456ec/pm-gpu_gnugpu/build
  • PR workdir: /pscratch/sd/x/xylar/polaris_1.1/omega_pr_test/pr553-54456ec/pm-gpu_gnugpu/omega_pr
  • Polaris: 36641468a0048f053377232cd1249599970f582a (1.0.0-856-g36641468a)
  • Baseline Omega: 39689a97b8a746bce7619c759ef9126424c703d2 (bp_maint3.2-2846-g39689a97b8)
  • PR Omega: 7665aab2dda4deaa91ad885a6221baaae27b7a7d (bp_maint3.2-2855-g7665aab2dd)
  • Machine: pm-gpu
  • Compiler: gnugpu
  • Build type: Release
  • Log: /pscratch/sd/x/xylar/polaris_1.1/omega_pr_test/pr553-54456ec/pm-gpu_gnugpu/omega_pr/polaris_omega_pr.o59083037
  • Result: All tests passed
Recent commits

Polaris:

36641468a Document the Omega PR testing utility
1b76ce37e Add tests for the Omega PR testing report and status commands
da8b76bf6 Add the report and status commands to the Omega PR testing utility
e226ec468 Add tests for the build warnings comparison
c06a18ecb Add a comparison of build warnings to the Omega PR testing utility

Baseline Omega:

39689a97b8 Merge pull request #574 from grnydawn/ykim/omega/duplicate-gptl-link
36b1cd5533 Merge pull request #481 from brian-oneill/omega/analysis-moc-streamfunction
c1aacdc2d7 Merge pull request #552 from xylar/omega/fix-analysis-area-weighting
272e03d983 Merge pull request #547 from xylar/omega/earth-radius
f4e3167ba4 Merge pull request #507 from E3SM-Project/andrewdnolan/omega/g-case-coupling

PR Omega:

7665aab2dd Test merge of E3SM-Project/Omega#553 (54456ecaed) into develop (39689a97b8)
39689a97b8 Merge pull request #574 from grnydawn/ykim/omega/duplicate-gptl-link
36b1cd5533 Merge pull request #481 from brian-oneill/omega/analysis-moc-streamfunction
c1aacdc2d7 Merge pull request #552 from xylar/omega/fix-analysis-area-weighting
272e03d983 Merge pull request #547 from xylar/omega/earth-radius

CTest unit tests:

  • Machine: pm-gpu
  • Compiler: gnugpu
  • Build type: Release
  • Build: /pscratch/sd/x/xylar/polaris_1.1/omega_pr_test/pr553-54456ec/pm-gpu_gnugpu/build
  • Omega: 7665aab2dda4deaa91ad885a6221baaae27b7a7d (bp_maint3.2-2855-g7665aab2dd)
  • Result: All tests passed
  • Log: /pscratch/sd/x/xylar/polaris_1.1/omega_pr_test/pr553-54456ec/pm-gpu_gnugpu/build/ctests.log

Build warnings

2 new warnings, 0 in files this PR changes (1493 in the PR build, 1485 in the baseline build). Those in files the PR changes are marked *.

New warnings
  components/omega/external/spdlog/include/spdlog/fmt/bundled/base.h: [#128-D] loop is not reachable (334 -> 338)
  components/omega/external/spdlog/include/spdlog/fmt/bundled/format.h: [#2417-D] constexpr constructor calls non-constexpr function "fmt::v12::basic_memory_buffer<T, SIZE, Allocator>::basic_memory_buffer(const Allocator &) [with T=fmt::v12::detail::bigint::bigit, SIZE=32UL, Allocator=fmt::v12::detail::allocator<fmt::v12::detail::bigint::bigit>]" (334 -> 338)
  • Baseline build log: /pscratch/sd/x/xylar/polaris_1.1/omega_pr_test/baselines/pm-gpu_gnugpu_polaris-3664146_omega-39689a9/build/build_omega.log
  • PR build log: /pscratch/sd/x/xylar/polaris_1.1/omega_pr_test/pr553-54456ec/pm-gpu_gnugpu/build/build_omega.log

Notes

The 2 new warnings are not new diagnostics: they are the existing #128-D and #2417-D warnings from the bundled spdlog/fmt headers, which appear 4 more times each (334 -> 338). This PR adds a new source file, MonthlyAverages.cpp, which is compiled into both OmegaLib and OmegaLib_SP, and nvcc reports each of these header warnings twice per file, which accounts for the 4 extra copies. Nothing to fix in this PR.


Posted by Claude Code on @xylar's behalf. The testing, analysis and wording above are AI-authored; please check them accordingly.

@xylar

xylar commented Sep 29, 2026

Copy link
Copy Markdown

Testing: pm-cpu, gnu, mpich

CTests: 50 of 50 passed. omega_pr: 28 of 28 tasks passed.

Tested the merge of #553 (54456ecaed) into develop (39689a97b8) as 7665aab2dd, against Polaris' Omega submodule (39689a97b8).

Polaris omega_pr suite

  • Baseline workdir: /pscratch/sd/x/xylar/polaris_1.1/omega_pr_test/baselines/pm-cpu_gnu_polaris-3664146_omega-39689a9/omega_pr
  • Baseline build: /pscratch/sd/x/xylar/polaris_1.1/omega_pr_test/baselines/pm-cpu_gnu_polaris-3664146_omega-39689a9/build
  • PR build: /pscratch/sd/x/xylar/polaris_1.1/omega_pr_test/pr553-54456ec/pm-cpu_gnu/build
  • PR workdir: /pscratch/sd/x/xylar/polaris_1.1/omega_pr_test/pr553-54456ec/pm-cpu_gnu/omega_pr
  • Polaris: 36641468a0048f053377232cd1249599970f582a (1.0.0-856-g36641468a)
  • Baseline Omega: 39689a97b8a746bce7619c759ef9126424c703d2 (bp_maint3.2-2846-g39689a97b8)
  • PR Omega: 7665aab2dda4deaa91ad885a6221baaae27b7a7d (bp_maint3.2-2855-g7665aab2dd)
  • Machine: pm-cpu
  • Compiler: gnu
  • Build type: Release
  • Log: /pscratch/sd/x/xylar/polaris_1.1/omega_pr_test/pr553-54456ec/pm-cpu_gnu/omega_pr/polaris_omega_pr.o59081323
  • Result: All tests passed
Recent commits

Polaris:

36641468a Document the Omega PR testing utility
1b76ce37e Add tests for the Omega PR testing report and status commands
da8b76bf6 Add the report and status commands to the Omega PR testing utility
e226ec468 Add tests for the build warnings comparison
c06a18ecb Add a comparison of build warnings to the Omega PR testing utility

Baseline Omega:

39689a97b8 Merge pull request #574 from grnydawn/ykim/omega/duplicate-gptl-link
36b1cd5533 Merge pull request #481 from brian-oneill/omega/analysis-moc-streamfunction
c1aacdc2d7 Merge pull request #552 from xylar/omega/fix-analysis-area-weighting
272e03d983 Merge pull request #547 from xylar/omega/earth-radius
f4e3167ba4 Merge pull request #507 from E3SM-Project/andrewdnolan/omega/g-case-coupling

PR Omega:

7665aab2dd Test merge of E3SM-Project/Omega#553 (54456ecaed) into develop (39689a97b8)
39689a97b8 Merge pull request #574 from grnydawn/ykim/omega/duplicate-gptl-link
36b1cd5533 Merge pull request #481 from brian-oneill/omega/analysis-moc-streamfunction
c1aacdc2d7 Merge pull request #552 from xylar/omega/fix-analysis-area-weighting
272e03d983 Merge pull request #547 from xylar/omega/earth-radius

CTest unit tests:

  • Machine: pm-cpu
  • Compiler: gnu
  • Build type: Release
  • Build: /pscratch/sd/x/xylar/polaris_1.1/omega_pr_test/pr553-54456ec/pm-cpu_gnu/build
  • Omega: 7665aab2dda4deaa91ad885a6221baaae27b7a7d (bp_maint3.2-2855-g7665aab2dd)
  • Result: All tests passed
  • Log: /pscratch/sd/x/xylar/polaris_1.1/omega_pr_test/pr553-54456ec/pm-cpu_gnu/build/ctests.log

Build warnings

No new warnings (4 in the PR build, 4 in the baseline build).

  • Baseline build log: /pscratch/sd/x/xylar/polaris_1.1/omega_pr_test/baselines/pm-cpu_gnu_polaris-3664146_omega-39689a9/build/build_omega.log
  • PR build log: /pscratch/sd/x/xylar/polaris_1.1/omega_pr_test/pr553-54456ec/pm-cpu_gnu/build/build_omega.log

Posted by Claude Code on @xylar's behalf. The testing, analysis and wording above are AI-authored; please check them accordingly.

InputField->getMetadata("Description", InputDescr);
InputField->getMetadata("Units", InputUnits);
InputField->getMetadata("StdName", InputStdName);
InputField->getMetadata("ValidMin", InputValidMin);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

With KineticEnergyCell in MonthlyAverages: Fields, Omega aborts at init with std::bad_any_cast here. That field registers ValidMin as the int literal 0 (src/ocn/auxiliaryVars/KineticAuxVars.cpp:44), so reading it as double throws. Changing that literal to 0.0 looks like enough, but I haven't tested it. A clearer error here for a mismatched type might be worth adding too.


Posted by Claude Code on @xylar's behalf. The testing, analysis and wording above are AI-authored; please check them accordingly.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I'm testing the simple fix now.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@brian-oneill, I'm hoping you won't mind me pushing the fix if it works.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Done in 5b3fa88

The int literal 0 was stored as an int, so TimeMeanOp's read of ValidMin
as a Real threw std::bad_any_cast when KineticEnergyCell was averaged.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@xylar

xylar commented Sep 29, 2026

Copy link
Copy Markdown

Testing: frontier, craygnu-mphipcc, mpich

CTests: 50 of 50 passed. omega_pr: 28 of 28 tasks passed.

Tested the merge of #553 (54456ecaed) into develop (39689a97b8) as 7665aab2dd, against Polaris' Omega submodule (39689a97b8).

Polaris omega_pr suite

  • Baseline workdir: /lustre/orion/cli115/scratch/xylar/polaris_1.1/frontier/omega_pr_test/baselines/frontier_craygnu-mphipcc_polaris-1ef66de_omega-39689a9/omega_pr
  • Baseline build: /lustre/orion/cli115/scratch/xylar/polaris_1.1/frontier/omega_pr_test/baselines/frontier_craygnu-mphipcc_polaris-1ef66de_omega-39689a9/build
  • PR build: /lustre/orion/cli115/scratch/xylar/polaris_1.1/frontier/omega_pr_test/pr553-54456ec/frontier_craygnu-mphipcc/build
  • PR workdir: /lustre/orion/cli115/scratch/xylar/polaris_1.1/frontier/omega_pr_test/pr553-54456ec/frontier_craygnu-mphipcc/omega_pr
  • Polaris: 1ef66dee8ff8dbef3c268501149e7c601fbeb42a (1.0.0-859-g1ef66dee8)
  • Baseline Omega: 39689a97b8a746bce7619c759ef9126424c703d2 (bp_maint3.2-2846-g39689a97b8)
  • PR Omega: 7665aab2dda4deaa91ad885a6221baaae27b7a7d (bp_maint3.2-2855-g7665aab2dd)
  • Machine: frontier
  • Partition: batch
  • Compiler: craygnu-mphipcc
  • Build type: Release
  • Log: /lustre/orion/cli115/scratch/xylar/polaris_1.1/frontier/omega_pr_test/pr553-54456ec/frontier_craygnu-mphipcc/omega_pr/polaris_omega_pr.o5567139
  • Result: All tests passed
Recent commits

Polaris:

1ef66dee8 Add a QOS setting for the Omega PR testing suite jobs
b1fc477db Correct how long an Omega build takes in the agent instructions
665161d90 Say that the Omega PR testing work base should not change
36641468a Document the Omega PR testing utility
1b76ce37e Add tests for the Omega PR testing report and status commands

Baseline Omega:

39689a97b8 Merge pull request #574 from grnydawn/ykim/omega/duplicate-gptl-link
36b1cd5533 Merge pull request #481 from brian-oneill/omega/analysis-moc-streamfunction
c1aacdc2d7 Merge pull request #552 from xylar/omega/fix-analysis-area-weighting
272e03d983 Merge pull request #547 from xylar/omega/earth-radius
f4e3167ba4 Merge pull request #507 from E3SM-Project/andrewdnolan/omega/g-case-coupling

PR Omega:

7665aab2dd Test merge of E3SM-Project/Omega#553 (54456ecaed) into develop (39689a97b8)
39689a97b8 Merge pull request #574 from grnydawn/ykim/omega/duplicate-gptl-link
36b1cd5533 Merge pull request #481 from brian-oneill/omega/analysis-moc-streamfunction
c1aacdc2d7 Merge pull request #552 from xylar/omega/fix-analysis-area-weighting
272e03d983 Merge pull request #547 from xylar/omega/earth-radius

CTest unit tests:

  • Machine: frontier
  • Compiler: craygnu-mphipcc
  • Build type: Release
  • Build: /lustre/orion/cli115/scratch/xylar/polaris_1.1/frontier/omega_pr_test/pr553-54456ec/frontier_craygnu-mphipcc/build
  • Omega: 7665aab2dda4deaa91ad885a6221baaae27b7a7d (bp_maint3.2-2855-g7665aab2dd)
  • Result: All tests passed
  • Log: /lustre/orion/cli115/scratch/xylar/polaris_1.1/frontier/omega_pr_test/pr553-54456ec/frontier_craygnu-mphipcc/build/ctests.log

Build warnings

No new warnings (10 in the PR build, 10 in the baseline build).

  • Baseline build log: /lustre/orion/cli115/scratch/xylar/polaris_1.1/frontier/omega_pr_test/baselines/frontier_craygnu-mphipcc_polaris-1ef66de_omega-39689a9/build/build_omega.log
  • PR build log: /lustre/orion/cli115/scratch/xylar/polaris_1.1/frontier/omega_pr_test/pr553-54456ec/frontier_craygnu-mphipcc/build/build_omega.log

Notes

The Polaris commit 1ef66dee8 is the manifest's b1fc477db plus a local, unpushed change to the testing utility that sends the suite jobs to the normal QOS (Frontier's debug QOS allows only one queued job per user). It does not change the tasks or their comparison with the baseline.


Posted by Claude Code on @xylar's behalf. The testing, analysis and wording above are AI-authored; please check them accordingly.

@xylar

xylar commented Sep 29, 2026

Copy link
Copy Markdown

Testing: frontier, craygnu, mpich

CTests: 50 of 50 passed. omega_pr: 28 of 28 tasks passed.

Tested the merge of #553 (54456ecaed) into develop (39689a97b8) as 7665aab2dd, against Polaris' Omega submodule (39689a97b8).

Polaris omega_pr suite

  • Baseline workdir: /lustre/orion/cli115/scratch/xylar/polaris_1.1/frontier/omega_pr_test/baselines/frontier_craygnu_polaris-1ef66de_omega-39689a9/omega_pr
  • Baseline build: /lustre/orion/cli115/scratch/xylar/polaris_1.1/frontier/omega_pr_test/baselines/frontier_craygnu_polaris-1ef66de_omega-39689a9/build
  • PR build: /lustre/orion/cli115/scratch/xylar/polaris_1.1/frontier/omega_pr_test/pr553-54456ec/frontier_craygnu/build
  • PR workdir: /lustre/orion/cli115/scratch/xylar/polaris_1.1/frontier/omega_pr_test/pr553-54456ec/frontier_craygnu/omega_pr
  • Polaris: 1ef66dee8ff8dbef3c268501149e7c601fbeb42a (1.0.0-859-g1ef66dee8)
  • Baseline Omega: 39689a97b8a746bce7619c759ef9126424c703d2 (bp_maint3.2-2846-g39689a97b8)
  • PR Omega: 7665aab2dda4deaa91ad885a6221baaae27b7a7d (bp_maint3.2-2855-g7665aab2dd)
  • Machine: frontier
  • Partition: batch
  • Compiler: craygnu
  • Build type: Release
  • Log: /lustre/orion/cli115/scratch/xylar/polaris_1.1/frontier/omega_pr_test/pr553-54456ec/frontier_craygnu/omega_pr/polaris_omega_pr.o5567191
  • Result: All tests passed
Recent commits

Polaris:

1ef66dee8 Add a QOS setting for the Omega PR testing suite jobs
b1fc477db Correct how long an Omega build takes in the agent instructions
665161d90 Say that the Omega PR testing work base should not change
36641468a Document the Omega PR testing utility
1b76ce37e Add tests for the Omega PR testing report and status commands

Baseline Omega:

39689a97b8 Merge pull request #574 from grnydawn/ykim/omega/duplicate-gptl-link
36b1cd5533 Merge pull request #481 from brian-oneill/omega/analysis-moc-streamfunction
c1aacdc2d7 Merge pull request #552 from xylar/omega/fix-analysis-area-weighting
272e03d983 Merge pull request #547 from xylar/omega/earth-radius
f4e3167ba4 Merge pull request #507 from E3SM-Project/andrewdnolan/omega/g-case-coupling

PR Omega:

7665aab2dd Test merge of E3SM-Project/Omega#553 (54456ecaed) into develop (39689a97b8)
39689a97b8 Merge pull request #574 from grnydawn/ykim/omega/duplicate-gptl-link
36b1cd5533 Merge pull request #481 from brian-oneill/omega/analysis-moc-streamfunction
c1aacdc2d7 Merge pull request #552 from xylar/omega/fix-analysis-area-weighting
272e03d983 Merge pull request #547 from xylar/omega/earth-radius

CTest unit tests:

  • Machine: frontier
  • Compiler: craygnu
  • Build type: Release
  • Build: /lustre/orion/cli115/scratch/xylar/polaris_1.1/frontier/omega_pr_test/pr553-54456ec/frontier_craygnu/build
  • Omega: 7665aab2dda4deaa91ad885a6221baaae27b7a7d (bp_maint3.2-2855-g7665aab2dd)
  • Result: All tests passed
  • Log: /lustre/orion/cli115/scratch/xylar/polaris_1.1/frontier/omega_pr_test/pr553-54456ec/frontier_craygnu/build/ctests.log

Build warnings

No new warnings (5 in the PR build, 5 in the baseline build).

  • Baseline build log: /lustre/orion/cli115/scratch/xylar/polaris_1.1/frontier/omega_pr_test/baselines/frontier_craygnu_polaris-1ef66de_omega-39689a9/build/build_omega.log
  • PR build log: /lustre/orion/cli115/scratch/xylar/polaris_1.1/frontier/omega_pr_test/pr553-54456ec/frontier_craygnu/build/build_omega.log

Notes

The Polaris commit 1ef66dee8 is the manifest's b1fc477db plus a local, unpushed change to the testing utility that sends the suite jobs to the normal QOS (Frontier's debug QOS allows only one queued job per user). It does not change the tasks or their comparison with the baseline.

The first PR build on the login node failed when the system assembler (binutils 2.45) hit internal assertion failures and then hung; this looked like a toolchain problem rather than the PR, and a clean rebuild of the same commit succeeded.


Posted by Claude Code on @xylar's behalf. The testing, analysis and wording above are AI-authored; please check them accordingly.

@xylar

xylar commented Sep 29, 2026 •

Copy link
Copy Markdown

Analysis Testing

I ran the one-year QU240 omega_analysis_test suite from E3SM-Project/polaris#787 on Chrysalis with Intel and OpenMPI, with split-explicit time stepping, at 5b3fa880f7:

/lcrc/group/e3sm/ac.xylar/polaris_1.1/chrysalis/test_20260929/qu240-analysis-test-553-kefix

It passed and wrote all 12 MonthlyAverages files, with time_bnds and the time-mean fields for 9 fields including NormalVelocity, GeomZInterface and KineticEnergyCell. At 54456ecaed Omega aborted at startup averaging KineticEnergyCell (see my inline comment); I pushed 5b3fa880f7 to this branch to fix that.


Posted by Claude Code on @xylar's behalf. The testing, analysis and wording above are AI-authored; please check them accordingly.

xylar added a commit to xylar/polaris that referenced this pull request Sep 29, 2026
The design expected the monthly means to arrive in a stream of their
own rather than in History, where the mock-up had them, and
E3SM-Project/Omega#553 gives them one: the MonthlyAverages analysis
group.  Its stream is found the way the global statistics' is.

Omega names a monthly mean for the instant it was finalized, the start
of the following month (E3SM-Project/Omega#554), so the file named
0001-02 holds January of year 1.  expand_template takes a month offset
and every time-mean stream with a month in its template is expanded
with an offset of one; the year and month a SimFile carries are still
the ones it covers.

Each field of a time mean is named for the field and the period,
Temperature_TimeMean1Month; time_mean_suffix says what to strip.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@xylar

xylar commented Sep 29, 2026

Copy link
Copy Markdown

Testing: aurora, oneapi-ifx, mpich

CTests: 50 of 50 passed. omega_pr: 28 of 28 tasks passed.

Tested the merge of #553 (54456ecaed) into develop (39689a97b8) as 7665aab2dd, against Polaris' Omega submodule (39689a97b8).

Polaris omega_pr suite

  • Baseline workdir: /lus/flare/projects/E3SM_Dec/xylar/polaris_1.1/aurora/omega_pr_test/baselines/aurora_oneapi-ifx_polaris-ea30a87_omega-39689a9/omega_pr
  • Baseline build: /lus/flare/projects/E3SM_Dec/xylar/polaris_1.1/aurora/omega_pr_test/baselines/aurora_oneapi-ifx_polaris-ea30a87_omega-39689a9/build
  • PR build: /lus/flare/projects/E3SM_Dec/xylar/polaris_1.1/aurora/omega_pr_test/pr553-54456ec/aurora_oneapi-ifx/build
  • PR workdir: /lus/flare/projects/E3SM_Dec/xylar/polaris_1.1/aurora/omega_pr_test/pr553-54456ec/aurora_oneapi-ifx/omega_pr
  • Polaris: ea30a87f6995890a93c7a5ed4f8d5e0883a31d98 (1.0.0-874-gea30a87f6)
  • Baseline Omega: 39689a97b8a746bce7619c759ef9126424c703d2 (bp_maint3.2-2846-g39689a97b8)
  • PR Omega: 7665aab2dda4deaa91ad885a6221baaae27b7a7d (bp_maint3.2-2855-g7665aab2dd)
  • Machine: aurora
  • Compiler: oneapi-ifx
  • Build type: Release
  • Log: not found
  • Result: All tests passed
Recent commits

Polaris:

ea30a87f6 Tell Omega PR testers not to choose another queue themselves
e87b96c0c Test that Omega PR testing uses Aurora's capacity queue
dc81b1ee5 Submit Omega PR testing jobs to Aurora's capacity queue
a3ec0e584 Note that Omega#582 fixes the build race in the PR testing instructions
ebff1b26e Tell Omega PR testers what to do when a job is refused

Baseline Omega:

39689a97b8 Merge pull request #574 from grnydawn/ykim/omega/duplicate-gptl-link
36b1cd5533 Merge pull request #481 from brian-oneill/omega/analysis-moc-streamfunction
c1aacdc2d7 Merge pull request #552 from xylar/omega/fix-analysis-area-weighting
272e03d983 Merge pull request #547 from xylar/omega/earth-radius
f4e3167ba4 Merge pull request #507 from E3SM-Project/andrewdnolan/omega/g-case-coupling

PR Omega:

7665aab2dd Test merge of E3SM-Project/Omega#553 (54456ecaed) into develop (39689a97b8)
39689a97b8 Merge pull request #574 from grnydawn/ykim/omega/duplicate-gptl-link
36b1cd5533 Merge pull request #481 from brian-oneill/omega/analysis-moc-streamfunction
c1aacdc2d7 Merge pull request #552 from xylar/omega/fix-analysis-area-weighting
272e03d983 Merge pull request #547 from xylar/omega/earth-radius

CTest unit tests:

  • Machine: aurora
  • Compiler: oneapi-ifx
  • Build type: Release
  • Build: /lus/flare/projects/E3SM_Dec/xylar/polaris_1.1/aurora/omega_pr_test/pr553-54456ec/aurora_oneapi-ifx/build
  • Omega: 7665aab2dda4deaa91ad885a6221baaae27b7a7d (bp_maint3.2-2855-g7665aab2dd)
  • Result: All tests passed
  • Log: /lus/flare/projects/E3SM_Dec/xylar/polaris_1.1/aurora/omega_pr_test/pr553-54456ec/aurora_oneapi-ifx/build/ctests.log

Build warnings

No new warnings (10 in the PR build, 10 in the baseline build).

  • Baseline build log: /lus/flare/projects/E3SM_Dec/xylar/polaris_1.1/aurora/omega_pr_test/baselines/aurora_oneapi-ifx_polaris-ea30a87_omega-39689a9/build/build_omega.log
  • PR build log: /lus/flare/projects/E3SM_Dec/xylar/polaris_1.1/aurora/omega_pr_test/pr553-54456ec/aurora_oneapi-ifx/build/build_omega.log

Posted by Claude Code on @xylar's behalf. The testing, analysis and wording above are AI-authored; please check them accordingly.

@xylar xylar left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I've tested the heck out of this branch both in the Polaris analysis run using E3SM-Project/polaris#787 and with the omega_pr suite and CTests. Everything looks good to me.

Thanks so much @brian-oneill!

@xylar
xylar merged commit 0cbdff8 into E3SM-Project:develop Sep 29, 2026
8 checks passed
xylar added a commit to xylar/polaris that referenced this pull request Oct 14, 2026
The design expected the monthly means to arrive in a stream of their
own rather than in History, where the mock-up had them, and
E3SM-Project/Omega#553 gives them one: the MonthlyAverages analysis
group.  Its stream is found the way the global statistics' is.

Omega names a monthly mean for the instant it was finalized, the start
of the following month (E3SM-Project/Omega#554), so the file named
0001-02 holds January of year 1.  expand_template takes a month offset
and every time-mean stream with a month in its template is expanded
with an offset of one; the year and month a SimFile carries are still
the ones it covers.

Each field of a time mean is named for the field and the period,
Temperature_TimeMean1Month; time_mean_suffix says what to strip.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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