Skip to content

Port merry-go-round testcase from compass #284

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

andrewdnolan
Copy link
Collaborator

Ports the Default testcase from the merry_go_round testgroup from compass,

Checklist

  • User's Guide has been updated
  • Developer's Guide has been updated
  • API documentation in the Developer's Guide (api.md) has any new or modified class, method and/or functions listed
  • Documentation has been built locally and changes look as expected
  • Testing comment in the PR documents testing used to verify the changes
  • New tests have been added to a test suite

@andrewdnolan andrewdnolan added in progress This PR is not ready for review or merging ocean Related to ocean tests or analysis labels Mar 7, 2025


def add_merry_go_round_tasks(component):
resolution = 5
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
resolution = 5
resolution = 5. # Resolution provided in [units]

Replace [units] with m or km

if not (vert_coord == 'z-level' or vert_coord == 'sigma'):
raise ValueError('Vertical coordinate {vert_coord} not supported')

lx, ly = (500, 5)
Copy link
Collaborator

Choose a reason for hiding this comment

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

These should be moved to the config file


lx, ly = (500, 5)
nx, ny = compute_planar_hex_nx_ny(lx, ly, self.resolution)
nz = int(50 / (self.resolution / 5))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should be expressed in terms of a config parameter lz

# Initialize normalVelocity
z_mid_edge = z_mid.isel(nCells=ds.cellsOnEdge - 1).mean("TWO")

x_one_quarters = 0.75 * x_min + 0.25 * x_max
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
x_one_quarters = 0.75 * x_min + 0.25 * x_max
x_one_quarters = x_min + 0.25 * (x_max - x_min)

This is more intuitive to me

@cbegeman
Copy link
Collaborator

@andrewdnolan Looking great so far! Just a few minor suggestions

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
in progress This PR is not ready for review or merging ocean Related to ocean tests or analysis
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants