Skip to content

Add arbitrary topography on P4estMeshCubedSphere#187

Merged
amrueda merged 15 commits into
mainfrom
ma/tri
Jun 4, 2026
Merged

Add arbitrary topography on P4estMeshCubedSphere#187
amrueda merged 15 commits into
mainfrom
ma/tri

Conversation

@MarcoArtiano

@MarcoArtiano MarcoArtiano commented May 5, 2026

Copy link
Copy Markdown
Collaborator

Other than baroclinic test case with real horography, some idealized test cases with horography are really interesting and I will add them in this PR (at least 1 for having 1 case with real horography and 1 idealized one):
https://sites.google.com/umich.edu/dcmip-2025/dcmip-2025-test-cases/test-case-2-mountain-triggered-meso-scale-flow-phenomena.

The visualization has been realized by clipping the data in paraview with radius = 6371300.
image(3)

With the horography, two functions are implemented to adapt the vertical size elements to smoothly restore the cubed sphere.

Vortex shedding generated by a gaussian hill on the sphere (the hole on the left is the island). Clipped radius for visualization: 318650 (this is a small earth size, 20 times smaller)
image

ps: I have removed the simulation with real topography, because until we have a good imex scheme in the main, it is prohibitively to run that simulation.

High-resolution vortex shedding
image

image

@MarcoArtiano MarcoArtiano changed the title WIP: add arbitrary horography on P4estCubedSphere WIP: add arbitrary horography on P4estMeshCubedSphere May 5, 2026
@codecov

codecov Bot commented May 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.14%. Comparing base (b6e2ac3) to head (46f2073).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #187      +/-   ##
==========================================
+ Coverage   97.11%   97.14%   +0.03%     
==========================================
  Files          38       39       +1     
  Lines        5128     5186      +58     
==========================================
+ Hits         4980     5038      +58     
  Misses        148      148              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@MarcoArtiano MarcoArtiano changed the title WIP: add arbitrary horography on P4estMeshCubedSphere WIP: add arbitrary torography on P4estMeshCubedSphere May 5, 2026
@MarcoArtiano MarcoArtiano changed the title WIP: add arbitrary torography on P4estMeshCubedSphere WIP: add arbitrary topography on P4estMeshCubedSphere May 6, 2026
@MarcoArtiano MarcoArtiano marked this pull request as ready for review May 6, 2026 13:20
@MarcoArtiano MarcoArtiano changed the title WIP: add arbitrary topography on P4estMeshCubedSphere Add arbitrary topography on P4estMeshCubedSphere May 6, 2026

@benegee benegee left a comment

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.

Just a very quick reply to say this looks really cool!

I assume, the usual mapping argument of P4estMesh (used in the 2D Schär mountain test case) does not work here.

Comment thread src/meshes/p4est_cubed_sphere_topography.jl Outdated
@MarcoArtiano

MarcoArtiano commented May 6, 2026

Copy link
Copy Markdown
Collaborator Author

Just a very quick reply to say this looks really cool!

I assume, the usual mapping argument of P4estMesh (used in the 2D Schär mountain test case) does not work here.

No, it does not work. Here I'm just changing the the radial coordinate of the cubed sphere mapping, and then everything gets translated accordingly. So at the end you would have something that looks like a sphere but with some bumps (the topography is propagated also in the vertical layer). To avoid that we apply a smoothing function in the vertical direction. Two famous ones are Gal-Chen and Sleve, so that given a surface topography, we adjust the element size, so that we get again the perfect sphere after some vertical elements.

The Schär mountain can be redefined also here. The vortex shedding example shows how to define a simple Gaussian hill, you have to choose the spherical coordinate and then provide a function $$z(\lambda, \phi)$$, where $$\lambda$$ and $$\phi$$ are the longitude and latitude, respectively.

benegee
benegee previously approved these changes May 6, 2026

@benegee benegee left a comment

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.

Like!

amrueda
amrueda previously approved these changes Jun 4, 2026

@amrueda amrueda left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!
Just a couple minor comments.

Comment thread src/meshes/p4est_cubed_sphere_topography.jl Outdated
Co-authored-by: Andrés Rueda-Ramírez <aruedara@uni-koeln.de>
@amrueda amrueda merged commit 34290ee into main Jun 4, 2026
10 checks passed
@amrueda amrueda deleted the ma/tri branch June 4, 2026 09:56
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.

3 participants