Skip to content

Horvisc: Reorder if-blocks in rescaled Kh#862

Merged
Hallberg-NOAA merged 1 commit intoNOAA-GFDL:dev/gfdlfrom
marshallward:reorder_horvisc_kh_loop
Mar 20, 2025
Merged

Horvisc: Reorder if-blocks in rescaled Kh#862
Hallberg-NOAA merged 1 commit intoNOAA-GFDL:dev/gfdlfrom
marshallward:reorder_horvisc_kh_loop

Conversation

@marshallward
Copy link
Copy Markdown
Member

This reorders several if-blocks inside of a large do-loop of horizontal_viscosity() associated with rescaled Kh.

This should help performance, but will also make it easier to move these loops to GPU.

Copy link
Copy Markdown
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.

These changes all look functionally equivalent to me, and I trust @marshallward when he says that this revised construct with the logic outside of the do-loops should perform better.

@Hallberg-NOAA Hallberg-NOAA added the refactor Code cleanup with no changes in functionality or results label Mar 19, 2025
This reorders several if-blocks inside of a large do-loop of
horizontal_viscosity() associated with rescaled Kh.

This should help performance, but will also make it easier to move these
loops to GPU.
@Hallberg-NOAA Hallberg-NOAA force-pushed the reorder_horvisc_kh_loop branch from 78966a8 to c6bd685 Compare March 20, 2025 08:54
@Hallberg-NOAA
Copy link
Copy Markdown
Member

This PR has passed pipeline testing at https://gitlab.gfdl.noaa.gov/ogrp/mom6ci/MOM6/-/pipelines/26796.

@Hallberg-NOAA Hallberg-NOAA merged commit 47733ed into NOAA-GFDL:dev/gfdl Mar 20, 2025
10 checks passed
@marshallward marshallward deleted the reorder_horvisc_kh_loop branch May 24, 2025 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Code cleanup with no changes in functionality or results

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants