Skip to content

Conversation

@JoerivanEngelen
Copy link
Contributor

@JoerivanEngelen JoerivanEngelen commented Aug 6, 2024

Fixes #1116

Description

  • open_projectfile_data now groups wells by ipf name
  • GridAgnosticWell.from_imod5_data now validates associated IPFs whether they meet our requirements
  • GridAgnosticWell.from_imod5_data deactivates unassociated IPFs if not present in certain timestep anymore
  • Remove imod.formats.prj.convert_to_disv
  • Adds lots of test cases to test the well import from projectfiles

Checklist

  • Links to correct issue
  • Update changelog, if changes affect users
  • PR title starts with Issue #nr, e.g. Issue #737
  • Unit tests were added
  • If feature added: Added/extended example

Fixes #1125 and #1136

# Description
This PR adds: 
- ``open_projectfile_data`` now returns well data differently. They are
now grouped by ipf name, with lists with the times, layers,
multiplication and addition factors and dataframes. All error handling
for faulty cases will be done in ``Well.from_imod5_data.``
- Test cases to test further developments on #1116.

Tests calling ``from_imod5_data`` with a WEL defined in the projectfile
will probably break now, as a different data object is returned now.
These will be fixed in the follow-up issue
#1137

# Checklist
- [x] Links to correct issue
- [ ] Update changelog, if changes affect users
- [x] PR title starts with ``Issue #nr``, e.g. ``Issue #737``
- [x] Unit tests were added
- [ ] **If feature added**: Added/extended example
Fixes #1137 

# Description
Updates ``from_imod5_data`` to accept data of ``open_projectfile_data``
in new form

- Remove ``imod.formats.prj.disv_conversion`` as it is not used anymore,
and all functionality in that is now covered by
Simulation.from_imod5_data.
- Ensure all well data is returned with column name "filt_top" and
"filt_bot" (not "top" and "bottom"). We might be able to make this more
consistent with the ``mf6`` module by naming it to ``screen_top`` and
``screen_bottom``?
- Refactor the ``from_imod5_data`` to generalize this into
GridAgnosticWell base class, reducing code duplication.
- For this, add ``_imod5_depth_colnames`` and `` _depth_colnames``
attributes
- Only resample timeseries when loading ipf with associated timeseries
- Set unassociated wells when not specified in projectfile on requested
timestamp to zero
- Associated wells are forward filled in this case
- Associated wells are validated for overlapping definitions with
different additions, multiplications or same associated wells defined to
two layers

- Add extra test cases to ``imod/tests/test_formats/test_prj_wel.py``
- Use years in time domain of timeseries associated to ipfs in cases in
``imod/tests/test_formats/test_prj_wel.py``
- Add tests to load from_imod5_data with times within and outside well
time range.


# Checklist
<!---
Before requesting review, please go through this checklist:
-->

- [x] Links to correct issue
- [ ] Update changelog, if changes affect users
- [x] PR title starts with ``Issue #nr``, e.g. ``Issue #737``
- [x] Unit tests were added
- [ ] **If feature added**: Added/extended example
@JoerivanEngelen JoerivanEngelen changed the base branch from master to imod5_converter_feature_branch August 14, 2024 16:45
@JoerivanEngelen JoerivanEngelen marked this pull request as ready for review August 14, 2024 16:48
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
4.0% Duplication on New Code (required ≤ 3%)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

@JoerivanEngelen JoerivanEngelen merged commit a230bc9 into imod5_converter_feature_branch Aug 15, 2024
@JoerivanEngelen JoerivanEngelen deleted the issue_#1116_fix_imod5_well_import branch August 15, 2024 06:00
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.

Dealing with WEL IPFs from a project file in open_projectfile_data

2 participants