flopy.discretization.ModelTime
object lacks API for reading references from files
#1631
Labels
Milestone
flopy 3.3.5
python 3.10.5
Model grid geographic reference information can be loaded from files. No such option exists for model temporal reference information.
Current Behavior
Default behavior for
flopy.discretization.Grid
classes is to read from the following references in order:The
.modflow.Modflow
class creates.discretization.ModelTime
and (sub-classes of).discretization.Grid
objects for it'smodeltime
andmodelgrid
attributes (respectively).The
ModelTime
object does not support reading from the above references like it'sGrid
counterpart does. Additionally, the.utils.reference.TemporalReference
does not support reading from file either.Existing behavior for reading temporal information exists in the
Grid
class in it'sread_usgs_model_reference_file
andattribs_from_namfile_header
methods. Currently, temporal information is not used. Moving these methods to.utils.reference
, and adjusting them to be functions that returndict
could allow their use in theModelTime
class as well.Proposed Change
read_usgs_model_reference_file
andread_attribs_from_namfile_header
in.utils.reference
. Use the following signatures.def read_usgs_model_reference_file(reffile: str="usgs.model.reference") -> dict:
def read_attribs_from_namfile_header(namefile: str)-> dict:
.discretization.Grid
. Adjust these methods to use the.utils.referece
functions created above. Changes would be made oread_usgs_model_reference_file
andattribs_from_namfile_header
methods..discretization.ModelTime
class to mirror the API for theGrid
class.Files changed would be:
flopy/discretization/grid.py
flopy/discretization/modeltime.py
flopy/utils/reference.py
Let me know if you see any complications here that I am ignorant to. If there are none seen, I can submit a pull request.
Cheers
Minimum Reproducible Example Files
The text was updated successfully, but these errors were encountered: