Deltares / Deltares/MeshKernelPy

Align refinement on gridded/nongridded samples

Open
#71 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
27
Forks
5
PR merge metrics
No merged PRs in 30d

Description

Is your feature request related to a problem? Please describe.
There is a discrepancy in the refinement method depending on the type of samples provided. Align this so similar outputs can be expected with similar data (in different formats)

Describe the solution you'd like
When refining on xyz samples, the samples are interpolated to faces and then the faces are refined based on the value. With gridded samples, the samples are interpolated to nodes and there are three options:

  • all nodes of a cell on land (above 0): do not refine
  • all nodes of a cell in water (below 0): normal refine
  • some nodes of a cell in water and some on land: always refine until min_edge_size

Align these, so also interpolate xyz samples to nodes and include landsea feature. This will result in minor or no changes away from the coastline and improve the grid next to the coastline.

Describe alternatives you've considered
None

additional question
This might be related to use_mass_center_when_refining in meshkernel.MeshRefinementParameters() and use_nodal_refinement in mesh2d_refine_based_on_gridded_samples()

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at meshkernel.MeshRefinementParameters() and mesh2d_refine_based_on_gridded_samples(), then trace how xyz and gridded samples are interpolated before refinement. Compare the existing face- and node-based paths, including landsea handling; done means both sample formats produce aligned refinement behavior near coastlines and away from them.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.