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

Does the show method for OrthogonalSphericalShellGrid make sense? #3808

Open
glwagner opened this issue Oct 1, 2024 · 10 comments
Open

Does the show method for OrthogonalSphericalShellGrid make sense? #3808

glwagner opened this issue Oct 1, 2024 · 10 comments

Comments

@glwagner
Copy link
Member

glwagner commented Oct 1, 2024

For example for the tripolar grid it looks like this

2160×1080×60 OrthogonalSphericalShellGrid{Float64, Periodic, RightConnected, Bounded} on GPU with 7×7×7 halo and with precomputed metrics
├── centered at (λ, φ) = (75.0, 1.8005)
├── longitude: Periodic  extent 360.167 degrees       variably spaced with min(Δλ)=0.000208433, max(Δλ)=0.175625
├── latitude:  RightConnected  extent 170.157 degrees variably spaced with min(Δφ)=0.000312453, max(Δφ)=0.157553
└── z:         Bounded  z  [-6000.0, 0.0]            variably spaced with min(Δz)=5.24961, max(Δz)=438.409

This claims that whatever grid I've constructed is "RightConnected" in latitude. This doesn't really make sense to me... but let's set that aside (it's a separate issue with the tripolar grid).

The bigger issue is that the y-topology is NOT the "latitude topology" --- on an orthogonal spherical shell grid, "y" and "latitude" are different (that's the whole point, when they do coincide we are on a LatitudeLongitudeGrid).

We should design a good show method for this grid type. My impression is that the show method was copied from LatitudeLongitudeGrid. But we need to work a bit harder for OrthogonalSphericalShellGrid because it is more general. I think we should give information both about the coordinate system (lat, lon, z), and in addition to that and separately, give information about the logical arrangement of the grid (x, y, z), including the topology. The former is important for understanding the geography of the grid and the latter is important for understanding the discretization, and the two are distinct from one another. So the show method for this grid is going to be more involved than the others. I don't think we need to indicate whether the x, y directions are "variably spaced". That is useful for rectilinear and lat-lon grids, but not for general grids.

cc @navidcy @simone-silvestri

@navidcy
Copy link
Collaborator

navidcy commented Oct 5, 2024

It doesn't! It was designed essentially thinking of a cubed sphere panel in mind; it makes sense for those I believe.

@glwagner
Copy link
Member Author

glwagner commented Oct 5, 2024

Hmm, I don't think y = latitude on a cubed sphere panel either, at least not for all the panels right?

@glwagner
Copy link
Member Author

glwagner commented Oct 5, 2024

Here's a few things that I can think of that might help me understand the geometry of an arbitrary orthogonal grid:

  • the extrema of longitude and latitude covered by the box
  • the grid spacing in physical units, ie statistics of dx, dy. And perhaps a measure of the "nominal" spacing, eg statistics of sqrt(Az)? We could also express stretching the the ratio between max and min spacings (we could do this for other stretched coordinates too)
  • somehow, if possible, convey the "orientation" of the cells (if they have a preferred orientation). This is basically the angles between the intrinsic and extrinsic (geographic) coordinate system
  • what else?

@navidcy
Copy link
Collaborator

navidcy commented Oct 5, 2024

Where the center of the grid is perhaps?

@glwagner
Copy link
Member Author

glwagner commented Oct 6, 2024

Where the center of the grid is perhaps?

That too! Although, that is already shown:

├── centered at (λ, φ) = (75.0, 1.8005)

@navidcy
Copy link
Collaborator

navidcy commented Oct 6, 2024

Yes it is. Just making sure we need it to stay.

@simone-silvestri
Copy link
Collaborator

It might be usefull to show the maximum and minum spacing, and the location of the north poles in latitude and longitude

@navidcy
Copy link
Collaborator

navidcy commented Oct 7, 2024

Regarding spacing: I agree
Regarding location of the poles: are you referring to a tripolar grid in particular?

@simone-silvestri
Copy link
Collaborator

Yep. For a show method specific to the tripolar grid

@glwagner
Copy link
Member Author

glwagner commented Oct 8, 2024

Here we are talking about the show method for OrthogonalSphericalShellGrid.

Maybe some people want the only grid that matters to be the tripolar grid but that is not our current situation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants