Skip to content

Gamma plane#707

Draft
jshipton wants to merge 2 commits intomainfrom
gamma_plane
Draft

Gamma plane#707
jshipton wants to merge 2 commits intomainfrom
gamma_plane

Conversation

@jshipton
Copy link
Copy Markdown
Contributor

@jshipton jshipton commented Feb 23, 2026

Create gamma plane option for shallow water and enable specification of a "trap" in the Coriolis parameter via the ShallowWaterEquation class.

@jshipton jshipton requested a review from 12shughes February 23, 2026 15:16
if angle_units == 'rad':
unit_factor = 1.0

theta = atan2(y, x)
Copy link
Copy Markdown
Collaborator

@12shughes 12shughes Feb 23, 2026

Choose a reason for hiding this comment

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

I think this requires x,y to be (0,0) on the pole, which is why I previously had x_shift etc although that only works if the pole is in the centre of the mesh. Unless I've missed something, SpatialCoordinate(mesh) always gives x,y as (0,0) in the corner so would then be a different x,y to this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Would it help to add some input arguments to translate? I can't remember what you use this for...

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

My original functions had Lx and Ly as input arguments to shift x and y. I use these to define the position of my cyclones, so given it's a polar plane I want to consider the centre of the mesh as (0,0) as that's the pole.

xyz[1] - self.parameters.y0)
elif rotation is CoriolisOptions.gammaplane:
x, y = SpatialCoordinate(self.domain.mesh)
r, _ = rtheta_from_xy(x, y)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It's also used in here, so currently my gamma plane and trap is centred on a corner of the domain. This will probably be different for different people using it, but I imagine you'd typically want a gamma plane centred in the centre of the mesh?

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.

2 participants