Skip to content

Adds bathymetry downscaling by averaging#354

Open
jagoosw wants to merge 2 commits into
mainfrom
jsw/regrid-by-averaging
Open

Adds bathymetry downscaling by averaging#354
jagoosw wants to merge 2 commits into
mainfrom
jsw/regrid-by-averaging

Conversation

@jagoosw

@jagoosw jagoosw commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

This PR modifies regrid_bathymetry to take an argument method (instead of interpolaiton_passes) which is Interpolate(1) by default, and adds MedianAveraging which takes the average of the dataset depths within each (coarser) target cell.

This is with 20 interpolation passes:
image

The new method is almost smoother in the spiky bits and sharper on ridges.

I believe this is how they make the ORCA bathymetries: https://www.drakkar-ocean.eu/publications/reports/orca025-g70.pdf and this SCOR report claims median is better but still flawed for coarse models: https://scor-int.org/WG107Report.pdf

I haven't checked it works on GPU yet but hopefully.

@jagoosw

jagoosw commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator Author

This PR is a breaking change because it removes the argument interpolation_passes from regrid_bathymetry, should we support this and make the default:
...interpolation_passes = 1, method = Interpolation(interpolation_passes)) or just make a breaking change?

@codecov

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 61 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/Bathymetry/regrid_bathymetry.jl 0.00% 61 Missing ⚠️

📢 Thoughts on this report? Let us know!

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