flopy icon indicating copy to clipboard operation
flopy copied to clipboard

feature: warn on unrecognized units

Open wpbonelli opened this issue 1 year ago • 1 comments

Suggested in https://github.com/MODFLOW-USGS/modflow6/issues/1452

wpbonelli avatar Nov 17 '23 16:11 wpbonelli

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

wpbonelli avatar Nov 18 '23 20:11 wpbonelli