Deltares / Deltares/imod-python

imod.prepare.spatial._celltable can create elements in like_chunks having a dimension of length 1, then throws error

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

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
41
Forks
12
Avg merge
21h 8m
Merged PRs (30d)
1

Description

In GitLab by @JoerivanEngelen on Jul 10, 2023, 13:17

@JannekePouwels just ran into this edge case:

Based on a template and resolution, an a template grid is divided into chunks. When creatingThese chunks can have a dimension of length 1, which cause an error in a subsequent call to imod.util.spatial_reference.

Potential fixes:

  1. Throw clear error message what happened, asking the user to adapt their template or resolution.
  2. Appoint dx or dy value to template grids

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 imod.prepare.spatial._celltable and reproduce the issue with a template and resolution that produce a chunk dimension of length 1. Trace the subsequent call to imod.util.spatial_reference and determine whether the agreed fix is a clear validation error or assigning dx/dy values; add coverage for the edge case and confirm normal chunking still works.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.