def __init__(
        self,
        beta=1.5e-11,               # gradient of coriolis parameter
        #rek=5.787e-7,               # linear drag in lower layer
        rd=15000.0,                 # deformation radius
        delta=0.25,                 # layer thickness ratio (H1/H2)
        H1 = 500,                   # depth of layer 1 (H1)
        U1=0.025,                   # upper layer flow
        U2=0.0,                     # lower layer flow
        **kwargs
        ):
        """
        Parameters
        ----------

        beta : number
            Gradient of coriolis parameter. Units: meters :sup:`-1`
            seconds :sup:`-1`
        rek : number
            Linear drag in lower layer. Units: seconds :sup:`-1`
        rd : number
            Deformation radius. Units: meters.
        delta : number
            Layer thickness ratio (H1/H2)
        U1 : number *or* aray-like
            Upper layer flow. Units: m/s
        U2 : number *or* array-like
            Lower layer flow. Units: m/s
        """

        # physical
        self.beta = beta
        #self.rek = rek
        self.rd = rd
        self.delta = delta
        self.Hi = np.array([ H1, H1/delta])
        self.U1 = U1
        self.U2 = U2
        #self.filterfac = filterfac


        super(QGModel, self).__init__(nz=2, **kwargs)

        # initial conditions: (PV anomalies)
        self.set_q1q2(
            1e-7*np.random.rand(self.ny,self.nx) + 1e-6*(
                np.ones((self.ny,1)) * np.random.rand(1,self.nx) ),
                np.zeros_like(self.x) )
def __init__ ( self , beta = 1.5e-11 , rd = 15000.0 , delta = 0.25 , H1 = 500 , U1 = 0.025 , U2 = 0.0 , ** kwargs ) : self . beta = beta self . rd = rd self . delta = delta self . Hi = np . array ( [ H1 , H1 / delta ] ) self . U1 = U1 self . U2 = U2 super ( QGModel , self ) . __init__ ( nz = 2 , ** kwargs ) self . set_q1q2 ( 1e-7 * np . random . rand ( self . ny , self . nx ) + 1e-6 * ( np . ones ( ( self . ny , 1 ) ) * np . random . rand ( 1 , self . nx ) ) , np . zeros_like ( self . x ) )
Parameters
        ----------

        beta : number
            Gradient of coriolis parameter. Units: meters :sup:`-1`
            seconds :sup:`-1`
        rek : number
            Linear drag in lower layer. Units: seconds :sup:`-1`
        rd : number
            Deformation radius. Units: meters.
        delta : number
            Layer thickness ratio (H1/H2)
        U1 : number *or* aray-like
            Upper layer flow. Units: m/s
        U2 : number *or* array-like
            Lower layer flow. Units: m/s