def __init__(self, model, ipakcb=0, iswtoc=0, nsystm=1, ithk=0, ivoid=0, istpcs=1, icrcc=0,
                 lnwt=0, izcfl=0, izcfm=0, iglfl=0, iglfm=0, iestfl=0, iestfm=0, ipcsfl=0,
                 ipcsfm=0, istfl=0, istfm=0, gl0=0., sgm=1.7, sgs=2., thick=1., sse=1., ssv=1., cr=0.01, cc=0.25,
                 void=0.82, sub=0., pcsoff=0., pcs=0., ids16=None, ids17=None,
                 extension='swt', unit_number=35):
        extensions = [extension]
        name = ['SWT']
        units = [unit_number]
        extra = ['']

        if iswtoc > 0:
            extensions.append('swtbud')
            name.append('DATA(BINARY)')
            units.append(2054)
            extra.append('REPLACE')

        Package.__init__(self, model, extension=extensions, name=name, unit_number=units,
                         extra=extra)  # Call ancestor's init to set self.parent, extension, name and unit number

        nrow, ncol, nlay, nper = self.parent.nrow_ncol_nlay_nper
        self.heading = '# Subsidence and Aquifer-System Compaction Package for Water-Table Aquifers\n' + \
                       '# (SUB-WT) package file for {}, generated by Flopy.'.format(model.version)
        self.url = 'swt.htm'

        if ipakcb != 0:
            self.ipakcb = 53
        else:
            self.ipakcb = 0  # 0: no cell by cell terms are written
        self.iswtoc = iswtoc

        self.nsystm = nsystm
        self.ithk = ithk
        self.ivoid = ivoid
        self.istpcs = istpcs
        self.icrcc = icrcc

        self.lnwt = Util2d(model, (nsystm,), np.int, lnwt, name='lnwt')

        self.izcfl = izcfl
        self.izcfm = izcfm
        self.iglfl = iglfl
        self.iglfm = iglfm
        self.iestfl = iestfl
        self.iestfm = iestfm
        self.ipcsfl = ipcsfl
        self.ipcsfm = ipcsfm
        self.istfl = istfl
        self.istfm = istfm

        self.gl0 = Util2d(model, (nrow, ncol), np.float32, gl0, name='gl0')
        self.sgm = Util2d(model, (nrow, ncol), np.float32, sgm, name='sgm')
        self.sgs = Util2d(model, (nrow, ncol), np.float32, sgs, name='sgs')

        # interbed data
        self.thick = Util3d(model, (nsystm, nrow, ncol), np.float32, thick, name='thick',
                            locat=self.unit_number[0])
        self.void = Util3d(model, (nsystm, nrow, ncol), np.float32, void, name='void',
                           locat=self.unit_number[0])
        self.sub = Util3d(model, (nsystm, nrow, ncol), np.float32, sub, name='sub',
                          locat=self.unit_number[0])
        if icrcc != 0:
            self.sse = Util3d(model, (nsystm, nrow, ncol), np.float32, sse, name='sse',
                              locat=self.unit_number[0])
            self.ssv = Util3d(model, (nsystm, nrow, ncol), np.float32, ssv, name='ssv',
                              locat=self.unit_number[0])
            self.cr = None
            self.cc = None
        else:
            self.sse = None
            self.ssv = None
            self.cr = Util3d(model, (nsystm, nrow, ncol), np.float32, cr, name='cr',
                             locat=self.unit_number[0])
            self.cc = Util3d(model, (nsystm, nrow, ncol), np.float32, cc, name='cc',
                             locat=self.unit_number[0])

        # layer data
        if istpcs != 0:
            self.pcsoff = Util3d(model, (nlay, nrow, ncol), np.float32, pcsoff, name='pcsoff',
                                 locat=self.unit_number[0])
            self.pcs = None
        else:
            self.pcsoff = None
            self.pcs = Util3d(model, (nlay, nrow, ncol), np.float32, pcs, name='pcs',
                              locat=self.unit_number[0])

        # output data
        if iswtoc > 0:
            if ids16 is None:
                ids16 = np.zeros(26, dtype=np.int)
            else:
                if isinstance(ids16, list):
                    ids16 = np.array(ids16)
            # make sure the correct unit is specified
            for i in range(1, 26, 2):
                ids16[i] = 2054
            self.ids16 = ids16
            if ids17 is None:
                self.iswtoc = 1
                # save and print everything
                ids17 = np.ones((1, 30), dtype=np.int)
                ids17[0, 0] = 0
                ids17[0, 1] = nper - 1
                ids17[0, 2] = 0
                ids17[0, 3] = 9999
            else:
                if isinstance(ids17, list):
                    ids17 = np.array(ids17)
            if len(ids17.shape) == 1:
                ids17 = np.reshape(ids17, (1, ids17.shape[0]))
            self.ids17 = ids17

        # add package to model
        self.parent.add_package(self)
Starts serving requests on this connection.
dataset/ETHPy150Open modflowpy/flopy/flopy/modflow/mfswt.py/ModflowSwt.__init__--crossover with--dataset/ETHPy150Open RobotWebTools/rosbridge_suite/rosbridge_server/src/tornado/http1connection.py/HTTP1ServerConnection.start_serving