Deltares / Deltares/imod-python

Packages should have a to_file() method, consistent with from_file()

Open
#293 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

In GitLab by @jdelsman on Nov 17, 2022, 09:46

Model packages do not have a to_file() to write an intermediate nc or zarr file, for subsequent use with from_file().
Now one must use Package.dataset.to_netcdf(). Package.to_file() seems a lot more intuitive. Confusingly, there is an 'write_netcdf()' method, but that has a specific usecase (I would change its name acordingly to say write_qgis_netcdf() or something), and cannot be used in conjunction with from_file().

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 by reading the Package.from_file(), Package.dataset, and existing write_netcdf() entry points mentioned in the issue. Trace how netCDF and zarr inputs are handled, then define completion as a Package.to_file() path that writes an intermediate file usable by from_file() without replacing the existing write_netcdf() use case.

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
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.