gwmod / nlmod

Python package to build, run and visualize MODFLOW 6 groundwater models in the Netherlands.
https://nlmod.readthedocs.io
MIT License
31 stars 2 forks source link

resample methods in to_model_ds #341

Open tomvansteijn opened 4 months ago

tomvansteijn commented 4 months ago

When modelling a large area it can be necessary to coarsen the grid beyond the default 100 m resolution dictated by the REGIS dataset. The method to_model_ds uses resample.ds_to_structured_grid, using nearest neighbour interpolation by default (the argument is not set).

I think it would be useful to have other scaling methods for the hydraulic conductances, such as the mean and harmonic mean. Have you considered to implement these in nlmod?

OnnoEbbens commented 3 months ago

I agree that it would be nice to have this in nlmod. We have not yet implemented this. If you use the update_ds_from_layer_ds function there are more resampling methods than just nearest neighbor (example here: https://nlmod.readthedocs.io/en/stable/examples/12_layer_generation.html). However the harmonic mean is not yet an option in update_ds_from_layer_ds.

For geotop we use the arithmetic weighted mean for kh and a harmonic weighted mean for kv by default. So it would be nice to implement this logic for scaling in the update_ds_from_layer_ds function.