Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse MODFLOW6 input (partially) #688

Open
wants to merge 39 commits into
base: master
Choose a base branch
from
Open

Parse MODFLOW6 input (partially) #688

wants to merge 39 commits into from

Conversation

Manangka
Copy link
Collaborator

In GitLab by @Huite on May 25, 2022, 16:49

This is somewhat of a grab-bag of features required for the TKI project.

The primary feature is that it allows reading MODFLOW6 input via imod.mf6.Modflow6Simulation.open.
It also includes a number of methods to convert DIS input to DISU input. The DISU package currently has the form of a LowLevelUnstructuredDiscretization: low level, since ideally we can store the information in a UGRID 3D kind of class.
Finally, it introduces a StorageBase class which stores the common logic for the two classes rather than having it duplicated.

Fix https://gitlab.com/deltares/imod/imod-python/-/issues/138

Huite added 30 commits March 2, 2022 21:54
Introduce StorageBase for Storage packages to avoid repetition
* Use pandas for ~3 times faster reading of list input
* Add logic for mimicking parts of Fortran read intrinsic: double formats (to_float), comma and whitespace separation (split_string), weird concatenation operators in text files (read_fortran_deflated_text_array).
* Allow parse_option to return more than one option (required for auxiliary).
* Add auxiliary and boundnames entries to list input dtype.
* Fix delr, delc (both 1D) and top (2D) in read_dis_blockfile.
* Intercept errors and attach file name.
* Do not convert to dense (grid) form
* Add optional keyword `sparse_to_dense` in list input reading functions
* Update test to read Well data
@Manangka
Copy link
Collaborator Author

In GitLab by @Huite on May 25, 2022, 16:49

requested review from @JoerivanEngelen and @luitjansl

@Manangka
Copy link
Collaborator Author

In GitLab by @luitjansl on May 31, 2022, 10:28

Commented on imod/mf6/read_input/common.py line 10

is_empty(line: str) may be a better name.

@Manangka
Copy link
Collaborator Author

In GitLab by @luitjansl on May 31, 2022, 10:41

Commented on imod/mf6/out/dis.py line 81

you could define this header size outside this functin, so that the other functions in this source file can use it as well. it comes back a few times, it seems

@Manangka
Copy link
Collaborator Author

In GitLab by @luitjansl on May 31, 2022, 11:03

Commented on imod/mf6/out/disu.py line 81

is the hds in the name short for "heads"? if so, it would be clearer to write it out. Also, are these functions going to be re-used for reading concentration?

@Manangka
Copy link
Collaborator Author

In GitLab by @luitjansl on May 31, 2022, 11:48

approved this merge request

@Manangka
Copy link
Collaborator Author

In GitLab by @JoerivanEngelen on Jun 7, 2022, 11:50

Commented on imod/mf6/out/dis.py line 81

I agree, can probably be stored in constants in the module

@Manangka
Copy link
Collaborator Author

@Manangka
Copy link
Collaborator Author

In GitLab by @JoerivanEngelen on Jun 7, 2022, 11:50

Commented on imod/mf6/disu.py line 182

I found this hard to comprehend.
Would it be possible to add a very simple example of what is happening in the comment?

@Manangka
Copy link
Collaborator Author

In GitLab by @JoerivanEngelen on Jun 7, 2022, 11:50

Commented on imod/mf6/pkgbase.py line 248

What is there still TODO? If nothing, please remove, if so please add.

@Manangka
Copy link
Collaborator Author

In GitLab by @JoerivanEngelen on Jun 7, 2022, 11:50

Commented on imod/util.py line 1076

Have you added a separate test for this function? I couldn't find it...

@Manangka
Copy link
Collaborator Author

In GitLab by @JoerivanEngelen on Jun 7, 2022, 11:52

Looks good, we still have to think of what we want to support with this.

For example: What about Groundwater Transport models? And what about Advanced Boundary Condition packages we still have to add?

Perhaps raise a specific error for now if somebody tries to load a transport model?

@Manangka
Copy link
Collaborator Author

In GitLab by @Huite on Jun 14, 2022, 16:40

added 3 commits

  • ce5ac5e - Ensure the applying the factor doesn't cast to a different type
  • aa439d2 - Space in warning
  • 4abab8e - Add angledegx for connection normal in disu from dis method

Compare with previous version

@Manangka
Copy link
Collaborator Author

In GitLab by @Huite on Jun 15, 2022, 15:21

added 1 commit

  • 9b29cb1 - Include angldegx correctly in disu input

Compare with previous version

@Manangka
Copy link
Collaborator Author

In GitLab by @Huite on Jun 20, 2022, 10:15

added 1 commit

  • 38cdafb - Use node number for DISU list based input, rather than to start numbering at...

Compare with previous version

@Manangka
Copy link
Collaborator Author

In GitLab by @Huite on Jun 23, 2022, 17:33

added 1 commit

  • 72b4842 - Add index_col=False to read_text_listinput

Compare with previous version

@Manangka
Copy link
Collaborator Author

In GitLab by @Huite on Aug 17, 2022, 09:53

added 1 commit

  • fe172a5 - Take 1-based indexing into account for MODFLOW periods

Compare with previous version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants