def __init__(self, in_ny, in_nx, out_ny, out_nx, factor):
        """Constructor
        
        Inputs:
            in_ny -- number of input grid rows
            in_nx -- number of input grid columns
            out_ny -- number of output grid rows
            out_nx -- number of output grid columns
            factor -- input grid box length divided by output grid box length
        """
        self.in_ny = in_ny
        self.in_nx = in_nx
        self.out_ny = out_ny
        self.out_nx = out_nx
        self.factor = factor

        self.jfine = Numeric.zeros(out_ny)
        self.dj = Numeric.zeros(out_ny, Numeric.Float64)
        self.jp1 = Numeric.zeros(out_ny)
        self.ifine = Numeric.zeros(out_nx)
        self.di = Numeric.zeros(out_nx, Numeric.Float64)
        self.ip1 = Numeric.zeros(out_nx)

        for j in xrange(0, out_ny):
            xjfine = float(j) * self.factor 

            self.jfine[j] = int(float(j) * self.factor)
            self.dj[j] = xjfine - float(self.jfine[j])
            self.jp1[j] = min(self.in_ny-1, self.jfine[j]+1)

        for i in xrange(0, out_nx):
            xifine = float(i) * self.factor

            self.ifine[i] = int(float(i) * self.factor)
            self.di[i] = xifine - float(self.ifine[i])
            self.ip1[i] = min (self.in_nx-1, self.ifine[i]+1)

        self.d1 = Numeric.outerproduct(1.0 - self.dj, 1.0 - self.di)
        self.d2 = Numeric.outerproduct(self.dj, 1.0 - self.di)
        self.d3 = Numeric.outerproduct(1.0 - self.dj, self.di)
        self.d4 = Numeric.outerproduct(self.dj, self.di)
Constructor
        
        Inputs:
            in_ny -- number of input grid rows
            in_nx -- number of input grid columns
            out_ny -- number of output grid rows
            out_nx -- number of output grid columns
            factor -- input grid box length divided by output grid box length
        
recipes/Python/414084_Extracting_low_resolutigrid_high/recipe-414084.py