primod.RechargeSvatMapping doesn't drop layer dimension
JoerivanEngelen opened this issue · 1 comments
JoerivanEngelen commented
The RechargeSvatMapping requires a 2D field of active Recharge cells which need to be coupled to SVATs.
The recharge grid can be provided in two ways:
- A 2D grid with dims (y, x)
- A 3D grid with dims (layer, y, x), where the layer dimension is length one.
In the latter case, we call xarray .drop_vars("layer")
to drop the layer dimension.
However, I'm getting reports this doesn't actually drop the dimension, but creates an empty dimension, which still needs to be squeezed.
Furthermore I see we have not separate unit tests for this mapping to test its validation.
Huite commented
I think the right method here would've been .squeeze("layer", drop=True)
instead.