Deltares / imod-python

🐍🧰 Make massive MODFLOW models
https://deltares.github.io/imod-python/
MIT License
16 stars 0 forks source link

In topsystem allocation, at_first_active method allocates to all active model cells. #1017

Closed JoerivanEngelen closed 2 months ago

JoerivanEngelen commented 2 months ago

It should allocate only to cells in active boundary condition cells, not to every potential model active. See example visuals, where the left hand side allocates correctly (where river cells are defined), but on the right hand side at_first_active allocates everywhere.

I think I first didn't implement this as presumably this fixes itsself when broadcasting with rate.where(rch_allocated) or rate * rch_allocated. Yet you never know what users do, fixing it is easy, and it makes for a confusing example.

image

This will alter the public API a bit: As allocate_rch_cells will now also require a rate argument. So this issue should be preferably solved before the next (0.17.0) release, when we release all topsystem allocation and distrubion functionality.