示例#1
0
    def __init__(self, modelname = 'modflowtest', namefile_ext = 'nam', \
                 version = 'mf2005', exe_name='mf2005.exe', \
                 listunit=2, model_ws = None,external_path=None,\
                 verbose=False,load=True, silent = 0):
        '''
        external_path - used to activate external array option
        external_binflag -  controls ASCII vs. binary for external property arrays
                            does not influence data added using add_external()
        load - flag to control loading of existing arrays into FLOPY or simple passing
               string names through

        verbose controls Package _repr_ screen output
        '''
        BaseModel.__init__(self, modelname, namefile_ext, exe_name, model_ws)
        self.heading = '# Name file for ' + version + ', generated by Flopy.'
        if version == 'mf2k':
            self.glo = ModflowGlobal(self)
        self.lst = ModflowList(self, unitnumber=listunit)
        self.version = version  # So that we can do something different for mf2005
        #--external option stuff
        self.free_format = True
        self.external_fnames = []
        self.external_units = []
        self.external_binflag = []
        self.external_path = external_path
        self.external = False
        self.load = load
        #--the starting external data unit number
        self.__next_ext_unit = 1000
        if external_path is not None:
            assert os.path.exists(external_path),'external_path does not exist'
            self.external = True
        self.verbose = verbose
        self.silent = silent
        '''self.__bcf = None
示例#2
0
 def __init__(self, modelname='mt3dmstest', namefile_ext='nam',
              modflowmodel=None, ftlfilename=None,
              model_ws=None, external_path=None,verbose=False,
              load=True):
     BaseModel.__init__(self, modelname, namefile_ext, model_ws=model_ws)
     self.heading = '# Name file for MT3DMS, generated by Flopy.'
     self.__mf = modflowmodel
     self.lst = Mt3dList(self)
     self.ftlfilename = ftlfilename
     self.__adv = None
     self.__dsp = None
     self.__gcg = None
     self.__rct = None
     self.__ssm = None
     self.free_format = False
     self.external_path = external_path
     self.external = False
     self.external_fnames = []
     self.external_units = []
     self.external_binflag = []
     self.load = load
     self.__next_ext_unit = 500
     if external_path is not None:
         assert os.path.exists(external_path),'external_path does not exist'
         self.external = True         
     self.verbose = verbose            
     return
示例#3
0
 def __init__(self,
              modelname='mt3dmstest',
              namefile_ext='nam',
              modflowmodel=None,
              ftlfilename=None,
              model_ws=None,
              external_path=None,
              verbose=False,
              load=True):
     BaseModel.__init__(self, modelname, namefile_ext, model_ws=model_ws)
     self.heading = '# Name file for MT3DMS, generated by Flopy.'
     self.__mf = modflowmodel
     self.lst = Mt3dList(self)
     self.ftlfilename = ftlfilename
     self.__adv = None
     self.__dsp = None
     self.__gcg = None
     self.__rct = None
     self.__ssm = None
     self.free_format = False
     self.external_path = external_path
     self.external = False
     self.external_fnames = []
     self.external_units = []
     self.external_binflag = []
     self.load = load
     self.__next_ext_unit = 500
     if external_path is not None:
         assert os.path.exists(
             external_path), 'external_path does not exist'
         self.external = True
     self.verbose = verbose
     return
示例#4
0
    def set_name(self, value):
        # Overrides BaseModel's setter for name property
        BaseModel.set_name(self, value)

        for i in range(len(self.glo.extension)):
            self.glo.file_name[i] = self.name + '.' + self.glo.extension[i]

        for i in range(len(self.lst.extension)):
            self.lst.file_name[i] = self.name + '.' + self.lst.extension[i]
示例#5
0
    def set_name(self, value):
        # Overrides BaseModel's setter for name property
        BaseModel.set_name(self, value)

        for i in range(len(self.glo.extension)):
            self.glo.file_name[i] = self.name + '.' + self.glo.extension[i]

        for i in range(len(self.lst.extension)):
            self.lst.file_name[i] = self.name + '.' + self.lst.extension[i]
示例#6
0
 def __init__(self,
              modelname='mt3dmstest',
              namefile_ext='nam',
              modflowmodel=None,
              mt3dmsmodel=None,
              exe_name='swt_v4.exe',
              model_ws=None,
              verbose=False):
     BaseModel.__init__(self,
                        modelname,
                        namefile_ext,
                        exe_name=exe_name,
                        model_ws=model_ws)
     self.heading = '# Name file for MT3DMS, generated by Flopy.'
     self.__mf = modflowmodel
     self.__mt = mt3dmsmodel
     self.lst = SeawatList(self)
     self.__vdf = None
     self.verbose = verbose
     return
示例#7
0
    def __init__(self, modelname = 'modflowtest', namefile_ext = 'nam', \
                 version = 'mf2005', exe_name='mf2005.exe', \
                 listunit=2, model_ws = None,external_path=None,\
                 verbose=False,load=True, silent = 0):
        '''
        external_path - used to activate external array option
        external_binflag -  controls ASCII vs. binary for external property arrays
                            does not influence data added using add_external()
        load - flag to control loading of existing arrays into FLOPY or simple passing
               string names through

        verbose controls Package _repr_ screen output
        '''
        BaseModel.__init__(self, modelname, namefile_ext, exe_name, model_ws)
        self.heading = '# Name file for ' + version + ', generated by Flopy.'
        if version == 'mf2k':
            self.glo = ModflowGlobal(self)
        self.lst = ModflowList(self, unitnumber=listunit)
        self.version = version  # So that we can do something different for mf2005
        #--external option stuff
        self.free_format = True
        self.external_fnames = []
        self.external_units = []
        self.external_binflag = []
        self.external_path = external_path
        self.external = False
        self.load = load
        #--the starting external data unit number
        self.__next_ext_unit = 1000
        if external_path is not None:
            assert os.path.exists(
                external_path), 'external_path does not exist'
            self.external = True
        self.verbose = verbose
        self.silent = silent
        '''self.__bcf = None