diff --git a/flopy/export/netcdf.py b/flopy/export/netcdf.py index 3b29125b2d..00e9e583bf 100644 --- a/flopy/export/netcdf.py +++ b/flopy/export/netcdf.py @@ -219,7 +219,7 @@ def __init__( self.global_attributes = {} self.global_attributes["namefile"] = self.model.namefile self.global_attributes["model_ws"] = self.model.model_ws - self.global_attributes["exe_name"] = self.model.exe_name + self.global_attributes["exe_name"] = self.model.exename self.global_attributes["modflow_version"] = self.model.version self.global_attributes["create_hostname"] = socket.gethostname() diff --git a/flopy/export/utils.py b/flopy/export/utils.py index a40af73b90..e490c6ea7a 100644 --- a/flopy/export/utils.py +++ b/flopy/export/utils.py @@ -1026,7 +1026,16 @@ def transient2d_export(f: Union[str, os.PathLike], t2d, fmt=None, **kwargs): array = t2d.array with np.errstate(invalid="ignore"): - if array.dtype not in [int, np.int32, np.int64]: + from numpy import dtype + + if array.dtype not in [ + int, + np.int32, + np.int64, + dtype("float64"), + dtype("int64"), + dtype("int32"), + ]: if mask is not None: array[:, 0, mask] = np.nan array[array <= min_valid] = np.nan diff --git a/flopy/mbase.py b/flopy/mbase.py index 40cdbf700f..3eff8fb836 100644 --- a/flopy/mbase.py +++ b/flopy/mbase.py @@ -165,6 +165,13 @@ def update_modelgrid(self): ) self._mg_resync = True + @property + @abc.abstractmethod + def modeltime(self): + raise NotImplementedError( + "must define modeltime in child class to use this base class" + ) + @property @abc.abstractmethod def modelgrid(self): diff --git a/flopy/modflow/mf.py b/flopy/modflow/mf.py index a5394d3e69..7ce4ca18b5 100644 --- a/flopy/modflow/mf.py +++ b/flopy/modflow/mf.py @@ -140,6 +140,8 @@ def __init__( if self.version == "mf2k": self.glo = ModflowGlobal(self) + self._exename = exe_name + self.lst = ModflowList(self, unitnumber=listunit) # -- check if unstructured is specified for something # other than mfusg is specified