hydromodpy.spatial.field.geology.geology_field#
Geology spatial field for heterogeneous parameter mapping on simulation meshes.
Purpose#
This module defines GeologyField, a concrete implementation of the generic
Field interface based on geology classes (typically read from raster data).
Its role is to convert raw geology support into reusable spatial fractions
on a target mesh.
Pipeline in the field framework#
Build
GeologyFieldfrom encoded grid data.Call
on_mesh(mesh)to obtain per-cell fractions of geology zones.Pass the returned discretization to
FieldParam(kind="heterogeneous", values_by_key=...).FieldParam.to_mesh_field(...)computes one numerical value per mesh cell using weighted aggregation.
Design choice#
The geometry and the physical values are intentionally separated:
GeologyFieldhandles where zones are located.FieldParamhandles which value each zone receives.
This allows:
reusing the same geology support for multiple calibrated variables (for example K, Sy, porosity),
changing parameter values without recomputing geometry logic.
Classes
|
Geology-driven implementation of the generic spatial |