Skip to content

Define FiniteDifferenceSpace for extruded spaces #2344

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

Merged
merged 1 commit into from
Jun 3, 2025

Conversation

charleskawczynski
Copy link
Member

@charleskawczynski charleskawczynski commented Jun 3, 2025

The failure here revealed that ClimaDiagnostics.jl is reconstructing the vertical grid, via _FiniteDifferenceGrid, which is not efficient (we can instead just return a pointer) and will become gpu-incompatible in #2343 (as the mesh, once made, will be moved to the gpu).

This PR defines FiniteDifferenceSpace(space::ExtrudedFiniteDifferenceSpace) which avoids that code path and reconstructs a new grid with the same backing data.

I suppose I should add this to ClimaDiagnostics, so that I can test it in ClimaAtmos, as this is the only place where this functionality seems to be exercised. I'll do that now, but this feature should probably exist in ClimaCore.

@charleskawczynski charleskawczynski force-pushed the ck/FiniteDifferenceSpace_constr branch from 85b7f32 to ab09e0a Compare June 3, 2025 18:16
@charleskawczynski
Copy link
Member Author

I don't this is controversial, so I'm going to merge.

@charleskawczynski charleskawczynski merged commit a7bb4ec into main Jun 3, 2025
32 of 33 checks passed
@charleskawczynski charleskawczynski deleted the ck/FiniteDifferenceSpace_constr branch June 3, 2025 18:16
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.

1 participant