flopy
flopy copied to clipboard
feature: warn on unrecognized units
Suggested in https://github.com/MODFLOW-USGS/modflow6/issues/1452
This seems more involved than anticipated — when length_units
are passed to e.g. flopy.mf6.ModflowGwfdis
they are first set on the discretization instance via generic mfdata mechanisms before making their way into a Grid
, which parses the value and attempts to assign a recognized unit. While Grid
recognizes "cm" as "centimeters", this info is not passed back to the discretization during model initialization or when write_simulation()
is called.
Intercepting somewhere and warning on unrecognized length units is possible but it seems better to consider refactoring init- and/or write-time logic so input files reflect everything flopy knows about the grid discretization