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

Need for IJIndex Algorithm on Stretched Grid #3060

Open
mathomp4 opened this issue Sep 27, 2024 · 3 comments
Open

Need for IJIndex Algorithm on Stretched Grid #3060

mathomp4 opened this issue Sep 27, 2024 · 3 comments
Assignees
Labels
🪲 Bug Something isn't working ❗ High Priority This is a high priority PR

Comments

@mathomp4
Copy link
Member

As detailed in #2850, the current MAPL_GetGlobalHorzIJIndex routine does not work on the stretched grid. @weiyuan-jiang has a PR in to actually trap the error and fail out (see #2851).

All this is well and good, but the consequence is that for normal GOCART runs, you have to disable all the volcanoes (which are point source emissions).

But, @mmanyin asked:

Is there an open ticket for resolving 'point source' problem w/ stretched grid? GMI uses it for more than just volcanoes.

So without a working MAPL_GetGlobalHorzIJIndex routine for stretched grids, GMI will have issues.

I know in talking with @bena-nasa and @weiyuan-jiang said how the normal algorithms we have for this sort of thing don't quite work (great circles?). Perhaps with @tclune a naive, if suboptimal/slow, routine could be added for the stretched grid cases?

@mathomp4 mathomp4 added 🪲 Bug Something isn't working ❗ High Priority This is a high priority PR labels Sep 27, 2024
@tclune
Copy link
Collaborator

tclune commented Sep 27, 2024

@weiyuan-jiang outlined the correct algorithm earlier this week. You invert the schmidt transform to find the original lat/lon and then use the existing algorithm.

For performance it will be important to use the vectorized form of this where the user passes in a list of lats and lons so that we don't do the inverse schmidt transform over and over again.

Unfortunately, in the short term this means creating a copy of schmidt (and inverse) so that MAPL can access.

Long term, we hope ESMF can directly bin in a more general manner, but probably will be slower when generic.

@mathomp4
Copy link
Member Author

Ahhh. I forgot about that! Well, for @weiyuan-jiang 's benefit here is the transform:

https://github.com/GEOS-ESM/GFDL_atmos_cubed_sphere/blob/0dd21f5426b602a698f5dfd73b44da3a62c81fe4/model/fv_grid_utils.F90#L912-L965

I don't think that'd be too hard to invert.

@tclune
Copy link
Collaborator

tclune commented Sep 27, 2024

Not entirely obvious whether it is invertible in that form. Hopefully we can actually find an implementation of the inverse or we can express mathematically and then invert. Also we need to ignore the fixes to put lon and lat into the proper interval but then apply such fixes again to the output of the inverse ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪲 Bug Something isn't working ❗ High Priority This is a high priority PR
Projects
None yet
Development

No branches or pull requests

3 participants