Deltares / Deltares/imod-python

choose datetime object for simulation.from_imod5_data times argument

Open
#1,111 1 comment 0 reactions 1 assignee View on GitHub

@luitjansl is already working on this.

Since Jul 18, 2024.

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

Description

a review comment on the PR for issue #1068 says:

"I realize we are diverting from the public API. There are a lot of different types of objects in Python to describe time & calendars, which are all still commonly used. See this scheme https://stackoverflow.com/a/21916253

Modflow6Simulation.create_time_discretization accepts a lot of these, and internally converts these to np.datetime64. We use the function imod.util.time.to_datetime_internal() for this. I don't think np.datetime64 has the required year attribute for that. Quickest way would be using the line from to_datetime_internal: year = time.astype("datetime64[Y]").astype(int) + 1970.

It is probably worth a separate issue to align the from_imod5_implementation with create_time_discreatization."

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.