Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion flopy/modflow/mf.py
Original file line number Diff line number Diff line change
Expand Up @@ -670,8 +670,9 @@ def load_results(self, **kwargs):
else:
return hdObj, ddObj, bdObj

@staticmethod
@classmethod
def load(
cls,
f,
version="mf2005",
exe_name="mf2005.exe",
Expand Down
4 changes: 2 additions & 2 deletions flopy/modflow/mfag.py
Original file line number Diff line number Diff line change
Expand Up @@ -685,8 +685,8 @@ def get_default_dtype(maxells=0, block="well"):

return np.dtype(dtype)

@staticmethod
def load(f, model, nper=0, ext_unit_dict=None):
@classmethod
def load(cls, f, model, nper=0, ext_unit_dict=None):
"""
Method to load the AG package from file

Expand Down
4 changes: 2 additions & 2 deletions flopy/modflow/mfbas.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,8 @@ def write_file(self, check=True):
# Close file
f_bas.close()

@staticmethod
def load(f, model, ext_unit_dict=None, check=True, **kwargs):
@classmethod
def load(cls, f, model, ext_unit_dict=None, check=True, **kwargs):
"""
Load an existing package.

Expand Down
4 changes: 2 additions & 2 deletions flopy/modflow/mfbcf.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,8 @@ def write_file(self, f=None):
f_bcf.write(self.wetdry[k].get_file_entry())
f_bcf.close()

@staticmethod
def load(f, model, ext_unit_dict=None):
@classmethod
def load(cls, f, model, ext_unit_dict=None):
"""
Load an existing package.

Expand Down
4 changes: 2 additions & 2 deletions flopy/modflow/mfchd.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,8 @@ def get_default_dtype(structured=True):
def get_sfac_columns():
return ["shead", "ehead"]

@staticmethod
def load(f, model, nper=None, ext_unit_dict=None, check=True):
@classmethod
def load(cls, f, model, nper=None, ext_unit_dict=None, check=True):
"""
Load an existing package.

Expand Down
4 changes: 2 additions & 2 deletions flopy/modflow/mfde4.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,8 @@ def write_file(self):
f.write("\n")
f.close()

@staticmethod
def load(f, model, ext_unit_dict=None):
@classmethod
def load(cls, f, model, ext_unit_dict=None):
"""
Load an existing package.

Expand Down
4 changes: 2 additions & 2 deletions flopy/modflow/mfdis.py
Original file line number Diff line number Diff line change
Expand Up @@ -848,8 +848,8 @@ def check(self, f=None, verbose=True, level=1, checktype=None):
# if verbose:
# print(txt)

@staticmethod
def load(f, model, ext_unit_dict=None, check=True):
@classmethod
def load(cls, f, model, ext_unit_dict=None, check=True):
"""
Load an existing package.

Expand Down
4 changes: 2 additions & 2 deletions flopy/modflow/mfdisu.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,8 +529,8 @@ def zcentroids(self):
def ncpl(self):
return self.nodes / self.nlay

@staticmethod
def load(f, model, ext_unit_dict=None, check=False):
@classmethod
def load(cls, f, model, ext_unit_dict=None, check=False):
"""
Load an existing package.

Expand Down
4 changes: 2 additions & 2 deletions flopy/modflow/mfdrn.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,8 @@ def get_empty(ncells=0, aux_names=None, structured=True, is_drt=False):
def get_sfac_columns():
return ["cond"]

@staticmethod
def load(f, model, nper=None, ext_unit_dict=None, check=True):
@classmethod
def load(cls, f, model, nper=None, ext_unit_dict=None, check=True):
"""
Load an existing package.

Expand Down
4 changes: 2 additions & 2 deletions flopy/modflow/mfdrt.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,8 @@ def get_empty(ncells=0, aux_names=None, structured=True, is_drt=False):
dtype = Package.add_to_dtype(dtype, aux_names, np.float32)
return create_empty_recarray(ncells, dtype, default_value=-1.0e10)

@staticmethod
def load(f, model, nper=None, ext_unit_dict=None, check=True):
@classmethod
def load(cls, f, model, nper=None, ext_unit_dict=None, check=True):
"""
Load an existing package.

Expand Down
4 changes: 2 additions & 2 deletions flopy/modflow/mfevt.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,8 @@ def write_file(self, f=None):
f_evt.write(ievt)
f_evt.close()

@staticmethod
def load(f, model, nper=None, ext_unit_dict=None):
@classmethod
def load(cls, f, model, nper=None, ext_unit_dict=None):
"""
Load an existing package.

Expand Down
4 changes: 2 additions & 2 deletions flopy/modflow/mffhb.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,8 +420,8 @@ def write_file(self):

f.close()

@staticmethod
def load(f, model, nper=None, ext_unit_dict=None):
@classmethod
def load(cls, f, model, nper=None, ext_unit_dict=None):
"""
Load an existing package.

Expand Down
4 changes: 2 additions & 2 deletions flopy/modflow/mfflwob.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,8 @@ def write_file(self):

return

@staticmethod
def load(f, model, ext_unit_dict=None, check=True):
@classmethod
def load(cls, f, model, ext_unit_dict=None, check=True):
"""
Load an existing package.

Expand Down
4 changes: 2 additions & 2 deletions flopy/modflow/mfgage.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,8 @@ def write_file(self):
# close the gage file
f.close()

@staticmethod
def load(f, model, nper=None, ext_unit_dict=None):
@classmethod
def load(cls, f, model, nper=None, ext_unit_dict=None):
"""
Load an existing package.

Expand Down
4 changes: 2 additions & 2 deletions flopy/modflow/mfghb.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,8 @@ def get_default_dtype(structured=True):
def get_sfac_columns():
return ["cond"]

@staticmethod
def load(f, model, nper=None, ext_unit_dict=None, check=True):
@classmethod
def load(cls, f, model, nper=None, ext_unit_dict=None, check=True):
"""
Load an existing package.

Expand Down
4 changes: 2 additions & 2 deletions flopy/modflow/mfgmg.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,8 @@ def write_file(self):
f_gmg.write("{}\n".format(self.relax))
f_gmg.close()

@staticmethod
def load(f, model, ext_unit_dict=None):
@classmethod
def load(cls, f, model, ext_unit_dict=None):
"""
Load an existing package.

Expand Down
4 changes: 2 additions & 2 deletions flopy/modflow/mfhfb.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,8 @@ def get_default_dtype(structured=True):
def get_sfac_columns():
return ["hydchr"]

@staticmethod
def load(f, model, ext_unit_dict=None):
@classmethod
def load(cls, f, model, ext_unit_dict=None):
"""
Load an existing package.

Expand Down
4 changes: 2 additions & 2 deletions flopy/modflow/mfhob.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,8 @@ def write_file(self):

return

@staticmethod
def load(f, model, ext_unit_dict=None, check=True):
@classmethod
def load(cls, f, model, ext_unit_dict=None, check=True):
"""
Load an existing package.

Expand Down
4 changes: 2 additions & 2 deletions flopy/modflow/mfhyd.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,8 @@ def get_default_dtype():
)
return dtype

@staticmethod
def load(f, model, ext_unit_dict=None):
@classmethod
def load(cls, f, model, ext_unit_dict=None):
"""
Load an existing package.

Expand Down
4 changes: 2 additions & 2 deletions flopy/modflow/mflak.py
Original file line number Diff line number Diff line change
Expand Up @@ -639,8 +639,8 @@ def write_file(self):
# close the lak file
f.close()

@staticmethod
def load(f, model, nper=None, ext_unit_dict=None):
@classmethod
def load(cls, f, model, nper=None, ext_unit_dict=None):
"""
Load an existing package.

Expand Down
4 changes: 2 additions & 2 deletions flopy/modflow/mflmt.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ def write_file(self):

f.close()

@staticmethod
def load(f, model, ext_unit_dict=None):
@classmethod
def load(cls, f, model, ext_unit_dict=None):
"""
Load an existing package.

Expand Down
4 changes: 2 additions & 2 deletions flopy/modflow/mflpf.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,8 +437,8 @@ def write_file(self, check=True, f=None):
f.close()
return

@staticmethod
def load(f, model, ext_unit_dict=None, check=True):
@classmethod
def load(cls, f, model, ext_unit_dict=None, check=True):
"""
Load an existing package.

Expand Down
4 changes: 2 additions & 2 deletions flopy/modflow/mfmlt.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ def write_file(self):
"""
pass

@staticmethod
def load(f, model, nrow=None, ncol=None, ext_unit_dict=None):
@classmethod
def load(cls, f, model, nrow=None, ncol=None, ext_unit_dict=None):
"""
Load an existing package.

Expand Down
4 changes: 2 additions & 2 deletions flopy/modflow/mfmnw1.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,8 @@ def get_default_dtype(structured=True):
else:
pass

@staticmethod
def load(f, model, nper=None, gwt=False, nsol=1, ext_unit_dict=None):
@classmethod
def load(cls, f, model, nper=None, gwt=False, nsol=1, ext_unit_dict=None):

if model.verbose:
sys.stdout.write("loading mnw1 package file...\n")
Expand Down
4 changes: 2 additions & 2 deletions flopy/modflow/mfmnw2.py
Original file line number Diff line number Diff line change
Expand Up @@ -1324,8 +1324,8 @@ def get_default_spd_dtype(structured=True):
msg = "get_default_spd_dtype: unstructured model not supported"
raise NotImplementedError(msg)

@staticmethod
def load(f, model, nper=None, gwt=False, nsol=1, ext_unit_dict=None):
@classmethod
def load(cls, f, model, nper=None, gwt=False, nsol=1, ext_unit_dict=None):
"""

Parameters
Expand Down
4 changes: 2 additions & 2 deletions flopy/modflow/mfmnwi.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ def __init__(

self.parent.add_package(self)

@staticmethod
def load(f, model, nper=None, gwt=False, nsol=1, ext_unit_dict=None):
@classmethod
def load(cls, f, model, nper=None, gwt=False, nsol=1, ext_unit_dict=None):

if model.verbose:
sys.stdout.write("loading mnw2 package file...\n")
Expand Down
4 changes: 2 additions & 2 deletions flopy/modflow/mfnwt.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,8 @@ def write_file(self):

f.close()

@staticmethod
def load(f, model, ext_unit_dict=None):
@classmethod
def load(cls, f, model, ext_unit_dict=None):
"""
Load an existing package.

Expand Down
6 changes: 4 additions & 2 deletions flopy/modflow/mfoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -733,8 +733,10 @@ def get_ocoutput_units(f, ext_unit_dict=None):
# return
return ihedun, fhead, iddnun, fddn

@staticmethod
def load(f, model, nper=None, nstp=None, nlay=None, ext_unit_dict=None):
@classmethod
def load(
cls, f, model, nper=None, nstp=None, nlay=None, ext_unit_dict=None
):
"""
Load an existing package.

Expand Down
4 changes: 2 additions & 2 deletions flopy/modflow/mfpar.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,8 @@ def set_pval(self, model, ext_unit_dict):

return

@staticmethod
def load(f, npar, verbose=False):
@classmethod
def load(cls, f, npar, verbose=False):
"""
Load property parameters from an existing package.

Expand Down
4 changes: 2 additions & 2 deletions flopy/modflow/mfparbc.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ def get(self, fkey):
return self.bc_parms[key]
return None

@staticmethod
def load(f, npar, dt, model, ext_unit_dict=None, verbose=False):
@classmethod
def load(cls, f, npar, dt, model, ext_unit_dict=None, verbose=False):
"""
Load bc property parameters from an existing bc package
that uses list data (e.g. WEL, RIV, etc.).
Expand Down
4 changes: 2 additions & 2 deletions flopy/modflow/mfpcg.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@ def write_file(self):
f.write("\n")
f.close()

@staticmethod
def load(f, model, ext_unit_dict=None):
@classmethod
def load(cls, f, model, ext_unit_dict=None):
"""
Load an existing package.

Expand Down
4 changes: 2 additions & 2 deletions flopy/modflow/mfpcgn.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,8 @@ def write_file(self):
f.write(line)
f.close()

@staticmethod
def load(f, model, ext_unit_dict=None):
@classmethod
def load(cls, f, model, ext_unit_dict=None):
"""
Load an existing package.

Expand Down
4 changes: 2 additions & 2 deletions flopy/modflow/mfpks.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ def write_file(self):
f.write("END\n")
f.close()

@staticmethod
def load(f, model, ext_unit_dict=None):
@classmethod
def load(cls, f, model, ext_unit_dict=None):
"""
Load an existing package.

Expand Down
4 changes: 2 additions & 2 deletions flopy/modflow/mfpval.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ def __getitem__(self, item):
else:
return None

@staticmethod
def load(f, model, ext_unit_dict=None):
@classmethod
def load(cls, f, model, ext_unit_dict=None):
"""
Load an existing package.

Expand Down
4 changes: 2 additions & 2 deletions flopy/modflow/mfrch.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,8 +366,8 @@ def write_file(self, check=True, f=None):
f_rch.write(file_entry_irch)
f_rch.close()

@staticmethod
def load(f, model, nper=None, ext_unit_dict=None, check=True):
@classmethod
def load(cls, f, model, nper=None, ext_unit_dict=None, check=True):
"""
Load an existing package.

Expand Down
4 changes: 2 additions & 2 deletions flopy/modflow/mfriv.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,8 @@ def add_record(self, kper, index, values):
except Exception as e:
raise Exception("mfriv error adding record to list: " + str(e))

@staticmethod
def load(f, model, nper=None, ext_unit_dict=None, check=True):
@classmethod
def load(cls, f, model, nper=None, ext_unit_dict=None, check=True):
"""
Load an existing package.

Expand Down
Loading