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

Inline harmonic analysis #744

Merged
merged 3 commits into from
Dec 9, 2024

Conversation

c2xu
Copy link

@c2xu c2xu commented Oct 25, 2024

Important bug fix:
1) The Cholesky decomposition was operating on entries below the main diagonal of FtF, whereas in the accumulator of FtF, only entries along and above the main diagonal were calculated. In this revision, I modified HA_accum_FtF so that entries below the main diagonal are accumulated instead.
2) In the accumulator of FtSSH, the first entry for the mean (zero frequency) is moved out of the loop over different tidal constituents, so that it is not accumulated multiple times within a single time step.

@c2xu
Copy link
Author

c2xu commented Oct 25, 2024

I also renamed a few variables in HA_solver to improve the readability, though there is no bug in this subroutine.

@c2xu c2xu requested a review from marshallward December 6, 2024 11:16
Copy link
Member

@Hallberg-NOAA Hallberg-NOAA left a comment

Choose a reason for hiding this comment

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

I see how this code could correct a bug in the original implementation, and upon inspection I am not seeing anything that seems problematic. Although we do not have a test case that exercises this code, this is a contribution from the same person who contributed the original version of this diagnostic code, and I trust that the developer has verified that this does correct problems with the original version of this diagnostic. I am therefore approving this change.

c2xu added 3 commits December 9, 2024 13:55
Important bug fix:
    1) The Cholesky decomposition was operating on entries below
the main diagonal of FtF, whereas in the accumulator of FtF, only
entries along and above the main diagonal were calculated. In this
revision, I modified HA_accum_FtF so that entries below the main
diagonal are accumulated instead.
    2) In the accumulator of FtSSH, the first entry for the mean
(zero frequency) is moved out of the loop over different tidal
constituents, so that it is not accumulated multiple times within
a single time step.
Another bug fix: initial state added back to the mean state.
Minor update to HA_solver
@Hallberg-NOAA Hallberg-NOAA force-pushed the c2xu/harmonic_analysis branch from d399982 to 1c32e40 Compare December 9, 2024 18:55
@Hallberg-NOAA Hallberg-NOAA merged commit f920c1a into NOAA-GFDL:dev/gfdl Dec 9, 2024
10 checks passed
kshedstrom pushed a commit to ESMG/MOM6 that referenced this pull request Dec 10, 2024
* Inline harmonic analysis

Important bug fix:
    1) The Cholesky decomposition was operating on entries below
the main diagonal of FtF, whereas in the accumulator of FtF, only
entries along and above the main diagonal were calculated. In this
revision, I modified HA_accum_FtF so that entries below the main
diagonal are accumulated instead.
    2) In the accumulator of FtSSH, the first entry for the mean
(zero frequency) is moved out of the loop over different tidal
constituents, so that it is not accumulated multiple times within
a single time step.

* Inline harmonic analysis

Another bug fix: initial state added back to the mean state.

* Inline harmonic analysis

Minor update to HA_solver
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