Deltares / Deltares/imod-python

Open IDF's zonder patroon herkenning

Open
#276 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

In GitLab by @JaccoHoogewoud on Oct 6, 2022, 09:53

Ik zou graag IDF's inlezen zonder dat er layers of time patroonherkenning wordt toegepast. Nu probeer ik patroon herkenning te voor komen met pattern = "{name}", maar dat voorkomt alleen dat layers worden aangemaakt.

idf = '.\\head_STEADY-STATE_l1.idf'
raster = imod.idf.open(idf,pattern="{name}")
tif = idf[:-3] + 'tif'
imod.rasterio.write(tif,raster)
--> ValueError: Only x and y dimensions supported, found ('time', 'y', 'x')

Nu moet ik raster = raster.sel(time='steady-state') toevoegen om de code werkend te krijgen.

Is het mogelijk om een open statement te hebben, bijvoorbeeld pattern = None, waarbij een da wordt gemaakt met alleen x en y dimensies?

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.idf.open and inspect how the pattern argument creates layers and time dimensions. Implement the requested pattern=None behavior only if supported by the existing API design, then verify that the returned object has x and y dimensions and can be passed to imod.rasterio.write without selecting time.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 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.