Skip to content

Conversation

ray-chew
Copy link
Owner

@ray-chew ray-chew commented Jun 7, 2025

Refactored the structure of the modules and subpackages, and rethought the data containers.

Tests, coverage, CI, and profiling have been set up to avoid breakage as we enter the refactoring of the flow solver proper.

Finally, pyBELLA has been updated to work with modern Python and its dependencies.

…tructure

there are still a lot of broken imports and references, so the code does not run yet.
…_main__.py

still untested as I have to move the analysis steps to the DA subpackage before this will run
also created a placeholder for the parallel integrator tests planned
the restructuring continues
DA and blending are not covered in the tests, will look into them after refactoring the flow solver
since I removed all initial conditions except this
this is with the new ensemble data structure; the flow solver runs; yet to be tested.
…rrays at the end of the flow solver's looping

this is because the tests were failing with a discrepancy.
validation step will be moved to dataclass structure
more cleaning up is due for the diagnostics modules, but at least now the tests are no longer hardcoded. the blending has potential problems with failing tests, will look into this next.
I was not updating mem attributes in the time update while loop. This means that everytime the blending scheme sees mem, it resets the solution fields to the beginning of the assimilation window.
I have not yet checked if the initial blending results are correct; will do this via the diagnostics module, but it does not work yet, as I have not yet generalised the target generation features.
…compare

nothing really works yet, because there seems to be a discrepancy between the target saved and the test values computed and compared against the target values. This has something to do with how the time steps are counted. Will need to carry on debugging.
ray-chew added 27 commits June 4, 2025 23:32
so the initial 30 time steps or so are very close to the 0.4.0 release, but the solutions diverge after about 50 time steps due to build up in this difference and the sensitivity of the instabilities. However, the amplitudes are slightly larger in our current run and 0.4.0 slightly underestimated the instability growth rate. So we might actually be on the better side of things here. Nevertheless, may be worth looking into this in the future.
now that we have the unstable lamb wave, the actual lamb wave test is now a long 800-time-step run. The internal long wave and travelling vortex use the integrated hydrostatic module, and the rest of the test cases use the analytical hydrostatic state (exponentially decaying pressure). These four flow solver tests took me a minute to run on my laptop, and they produce pretty large output files, especially for the long lamb wave run. Possibly have to improve this in the future.
…round

the former was the default and works for most cases, while the latter is necessary for well-balanced numerical tests.
I am excluding the data assimilation module for now.
I can think of a better approach in the future
I hope the GitHub Actions work now
…e lamb test

unstable lamb test is failing on CI as the numerical instability is architecture dependent. So maybe if we relax the checks, we can ensure that the instability develops similarly but also allow for numerical differences.
since I may change module names, paths, etc
@ray-chew
Copy link
Owner Author

ray-chew commented Jun 7, 2025

I am merging this without review, as I believe that no one will have time to review a PR with:
image

Anyways, the newly implemented tests may serve as a good sanity check.

@ray-chew ray-chew merged commit 6dd0fa7 into develop Jun 7, 2025
3 checks passed
@tbnc
Copy link
Collaborator

tbnc commented Jun 8, 2025

I am merging this without review, as I believe that no one will have time to review a PR with: image

Anyways, the newly implemented tests may serve as a good sanity check.

Indeed generally the smaller the PR, the easier the review :)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants