Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Issue #746 slice model transport #781

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

Merged
merged 6 commits into from
Jan 29, 2024
Merged

Conversation

luitjansl
Copy link
Contributor

@luitjansl luitjansl commented Jan 26, 2024

Fixes #746

Description

Fixes the slice_model function to slice transport models as well.
Includes changes to the Advection package. The advection scheme parameter is set by the constructors of derived types of advection. Trying to reinitialize the derived type throws an error, as its construction method doesn't expect arguments. As a pragmatic solution, the constructor methods now get a **ignored argument to ignore these kwargs.

  • 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

@luitjansl luitjansl changed the title Imod #746 slice model transport Issue #746 slice model transport Jan 26, 2024
Copy link
Contributor

@JoerivanEngelen JoerivanEngelen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@luitjansl luitjansl added this pull request to the merge queue Jan 29, 2024
@Manangka
Copy link
Collaborator

In your description you mentioned that you get an error when derived class of the Advection package is bein reinitialized. In your code changes i don't see where this is happening. Could you tell me where this object is being reinitialized?

@Manangka Manangka removed this pull request from the merge queue due to a manual request Jan 29, 2024
@luitjansl
Copy link
Contributor Author

In your description you mentioned that you get an error when derived class of the Advection package is bein reinitialized. In your code changes i don't see where this is happening. Could you tell me where this object is being reinitialized?

In package.py, in the function "mask", last line

@Manangka
Copy link
Collaborator

In your description you mentioned that you get an error when derived class of the Advection package is bein reinitialized. In your code changes i don't see where this is happening. Could you tell me where this object is being reinitialized?

In package.py, in the function "mask", last line

Instead of adding the ignore parameter you could also override the mask method in the Advection package. You could do the same as in the HFB package where the mask method returns a deepcopy

@luitjansl
Copy link
Contributor Author

In your description you mentioned that you get an error when derived class of the Advection package is bein reinitialized. In your code changes i don't see where this is happening. Could you tell me where this object is being reinitialized?

In package.py, in the function "mask", last line

Instead of adding the ignore parameter you could also override the mask method in the Advection package. You could do the same as in the HFB package where the mask method returns a deepcopy

done

@luitjansl luitjansl enabled auto-merge January 29, 2024 16:50
@luitjansl luitjansl added this pull request to the merge queue Jan 29, 2024
Merged via the queue into master with commit 9a4b711 Jan 29, 2024
@luitjansl luitjansl deleted the imod_#746_slice_model_transport branch January 29, 2024 17:42
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.

Add slice_model support GroundwaterTransport model
3 participants