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

Update AB2 (mpas_ocn_time_integration_split_ab2.F) code #6323

Closed
wants to merge 1 commit into from

Conversation

hyungyukang
Copy link
Contributor

This PR updates AB2 time stepping code.

Some codes and a routine were updated in split.F, but not in split_ab2.F

  • ocn_diagnostic_solve_wctEdge routine was updated, but split_ab2.F was using a call sentence of the old version of the routine.
    • deltaSSH computation was missing in split_ab2.F.
    • baroclinicThickness is computed instead of 'bottomDepthEdge'.
  • 'Direct application of tidal boundary condition', which was only in split.F, is added to split_ab2.F.

* Some codes & routines were updated in split.F, but not in split_ab2.F
* 'ocn_diagnostic_solve_wctEdge' routine was updated, but split_ab2.F was using a call sentence of the old version of the routine.
   - 'deltaSSH' computation was missing in split_ab2.F.
   - 'baroclinicThickness' is computed instead of 'bottomDepthEdge'.
* 'Direct application of tidal boundary condition', which was only in split.F, is added to split_ab2.F.
Copy link

github-actions bot commented Apr 3, 2024

PR Preview Action v1.4.7
🚀 Deployed preview to https://E3SM-Project.github.io/E3SM/pr-preview/pr-6323/
on branch gh-pages at 2024-04-03 17:45 UTC

@hyungyukang
Copy link
Contributor Author

Passed all COMPASS nightly suite on Perlmutter with GNU compiler.

Test Runtimes:
00:49 PASS ocean_baroclinic_channel_10km_default
01:38 PASS ocean_baroclinic_channel_10km_threads_test
00:44 PASS ocean_baroclinic_channel_10km_decomp_test
00:27 PASS ocean_baroclinic_channel_10km_restart_test
28:03 PASS ocean_global_ocean_QU240_mesh
01:56 PASS ocean_global_ocean_QU240_WOA23_init
00:55 PASS ocean_global_ocean_QU240_WOA23_performance_test
02:30 PASS ocean_global_ocean_QU240_WOA23_restart_test
02:02 PASS ocean_global_ocean_QU240_WOA23_decomp_test
02:04 PASS ocean_global_ocean_QU240_WOA23_threads_test
01:37 PASS ocean_global_ocean_QU240_WOA23_analysis_test
01:13 PASS ocean_global_ocean_QU240_WOA23_RK4_performance_test
01:59 PASS ocean_global_ocean_QU240_WOA23_RK4_restart_test
01:55 PASS ocean_global_ocean_QU240_WOA23_RK4_decomp_test
03:12 PASS ocean_global_ocean_QU240_WOA23_RK4_threads_test
00:00 PASS ocean_global_ocean_QUwISC240_mesh
00:00 PASS ocean_global_ocean_QUwISC240_WOA23_init
03:00 PASS ocean_global_ocean_QUwISC240_WOA23_performance_test
00:41 PASS ocean_ice_shelf_2d_5km_z-star_restart_test
00:23 PASS ocean_ice_shelf_2d_5km_z-level_restart_test
00:21 PASS ocean_ziso_20km_default
00:27 PASS ocean_ziso_20km_with_frazil
Total runtime 56:00
PASS: All passed successfully!

!$omp end parallel

call ocn_diagnostic_solve_wctEdge(btrvel_temp, deltaSSH, &
baroclinicThickness, wctEdge)
Copy link
Contributor

Choose a reason for hiding this comment

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

@hyungyukang commented in a meeting that this is the critical change in this PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

It looks from #6047 that this would be BFB when the thickness is centered, so I don't think this will affect the instability we encountered in the v3 HR G-case.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@cbegeman , thanks for your comment. When I tested this branch very first time, I was able to see some differences in simple test cases. So I thought this change is critical. But today, I cleaned and compiled again after the meeting, and it is very similar now. Maybe I did something wrong during early tests. However, for code uniformity between split_explicit_ab2.F and split_explicit.F, this PR is worth merging.

This PR is not BFB with very small differences (~1e-9).

Just in case, I will test this PR a bit more.

@mark-petersen
Copy link
Contributor

@hyungyukang, it would be better to separate this PR into two PRs: one that is BFB on all tests with the majority of changes, and one with the remaining non-BFB lines. That way it is clear what code changes are non-BFB. It looks like many of these changes are clean-up and conforming to the split-explicit code, but are not changing the computation. It is very helpful to have non-BFB PRs with small isolated changes, even just a few lines, when we look back later and ask how it changed the results.

@hyungyukang
Copy link
Contributor Author

@hyungyukang, it would be better to separate this PR into two PRs: one that is BFB on all tests with the majority of changes, and one with the remaining non-BFB lines. That way it is clear what code changes are non-BFB. It looks like many of these changes are clean-up and conforming to the split-explicit code, but are not changing the computation. It is very helpful to have non-BFB PRs with small isolated changes, even just a few lines, when we look back later and ask how it changed the results.

@mark-petersen , Thanks for suggesting. Agreed. I will close this PR first, then open one PR with BFB on all tests. Maybe it'd be better to open another PR after merging the BFB PR. Thanks!

@hyungyukang
Copy link
Contributor Author

Closing this PR and splitting it into two PRs to clarify the BFB/non-BFB changes as suggested by a reviewer.

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.

5 participants