Skip to content

update files to allow r-theta coords centred off 0,0#708

Open
12shughes wants to merge 8 commits into
gamma_planefrom
gamma_plane-pr
Open

update files to allow r-theta coords centred off 0,0#708
12shughes wants to merge 8 commits into
gamma_planefrom
gamma_plane-pr

Conversation

@12shughes

Copy link
Copy Markdown
Collaborator

No description provided.

@12shughes 12shughes requested a review from jshipton February 25, 2026 15:21
Comment thread gusto/core/coord_transforms.py Outdated
Comment thread gusto/core/equation_configuration.py Outdated
Comment thread gusto/core/equation_configuration.py
elif rotation is CoriolisOptions.gammaplane:
x, y = SpatialCoordinate(self.domain.mesh)
r, _ = rtheta_from_xy(x, y)
r, _ = rtheta_from_xy(x, y, self.parameters.x0, self.parameters.y0)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Would be good to make the default here centered on the pole - so you need to pass in Lx/2 and Ly/2 instead of setting x0 and y0 in the parameters class. You could try:

Lx=mesh.coordinates.dat.data[:, 0].max()
Ly=mesh.coordinates.dat.data[:, 1].max()

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

So would we take out the x0 and y0 argument entirely in the parameters? Or have them set to None by default but if they're specified then the chosen values are used here?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think take them out - we don't want to suggest that something works when we haven't tried it (and in this case I'm not sure of why anyone would want to do this!)

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