Conversation
| regis2 = regis.copy(deep=True) | ||
|
|
||
| # botm needs to have the name "bottom' | ||
| regis2["bottom"] = regis2["botm"] |
There was a problem hiding this comment.
Yeah, this should be fixed in the aggregate method. Let's make it a new issue.
There was a problem hiding this comment.
ok, I see you did this. Thanks!
|
|
||
| def test_check_elevations_consistency(): | ||
| regis = get_regis_horstermeer() | ||
| nlmod.layers.check_elevations_consistency(regis) |
There was a problem hiding this comment.
perhaps we can add an inconsistent elevation to check method when the layer model isn't correct?
There was a problem hiding this comment.
I added a check. The inconsistencies are reported by the logger, but it turns out you can use pytest to test logger output as well (at least locally on my computer).
| gwf = nlmod.gwf.gwf(ds, sim) | ||
| nlmod.gwf.dis(ds, gwf) | ||
|
|
||
| nlmod.grid.interpolate_gdf_to_array(bgt, gwf, field="values", method="linear") |
There was a problem hiding this comment.
we should try to bring some more structure to the interpolation methods? There are quite a few, and I've been working on a new one, but finding them isn't as easy as I'd hoped.
There was a problem hiding this comment.
This notebook gives an overview of what is available: https://nlmod.readthedocs.io/en/stable/examples/07_resampling.html
There was a problem hiding this comment.
The interpolation methods are in https://nlmod.readthedocs.io/en/stable/examples/06_gridding_vector_data.html
I split the original notebook in a gridding_vector_data-notebook and a resample-notebook a long time ago.
There was a problem hiding this comment.
Thanks for the reminders, I saw the resampling notebook but I wasn't really looking for raster ops, but somehow missed the gridding_vector data notebook. I think the new work should probably get it's own notebook, but it is essentially the opposite direction of the gridding vectors notebook (but only for points). I'll commit it now so you guys can take a look.
dbrakenhoff
left a comment
There was a problem hiding this comment.
Nice work! Looking good to me, I left a few comments, some can be picked up in future work.
This PR adds some tests for previously untested layer-methods.
It also fixes a problem with
get_last_active_layer_from_idomain(which returned only zeros before) and addedget_last_active_layer(likeget_first_active_layer).This PR will raise the coverage percentage to above 70 %!