Пример #1
0
    def setUp(self):

        # This is to show how to use dataNoPeri
        # class dataNoPeri:
        fd3x4 = dataNoPeri(4, 3, (1, 4), (1, 3))
        fd5x7 = dataNoPeri(7, 5, (1, 4), (1, 3))

        # Each Grid below is the same. This is just to make it clear which
        # grid is being used
        self.fromGrid3x4 = [fd3x4.coords[1], fd3x4.coords[0]]
        self.toGrid3x4 = self.fromGrid3x4

        self.fromGrid5x7 = [fd5x7.coords[1], fd5x7.coords[0]]
        self.toGrid5x7 = self.fromGrid5x7

        # Get the data for each grid
        self.data3x4 = fd3x4.data
        self.data5x7 = fd5x7.data

        self.data3x4[:] = 1
        self.data3x4[1, 1] = 0

        self.dimsSml, self.gridSml, self.dataSml = makeGrid(4, 3)
        self.dimsLrg, self.gridLrg, self.dataLrg = makeGrid(6, 5)

        self.eps = 1.e-5
    def setUp(self):

        # This is to show how to use dataNoPeri
        # class dataNoPeri:
        fd3x4 = dataNoPeri(4, 3, (1, 4), (1, 3))
        fd5x7 = dataNoPeri(7, 5, (1, 4), (1, 3))

        # Each Grid below is the same. This is just to make it clear which
        # grid is being used
        self.fromGrid3x4 = [fd3x4.coords[1], fd3x4.coords[0]]
        self.toGrid3x4   = self.fromGrid3x4

        self.fromGrid5x7 = [fd5x7.coords[1], fd5x7.coords[0]]
        self.toGrid5x7   = self.fromGrid5x7

        # Get the data for each grid
        self.data3x4 = fd3x4.data
        self.data5x7 = fd5x7.data

        self.data3x4[:] = 1
        self.data3x4[1,1] = 0

        self.dimsSml, self.gridSml, self.dataSml = makeGrid(4,3) 
        self.dimsLrg, self.gridLrg, self.dataLrg = makeGrid(6,5) 

        self.eps = 1.e-5
    def setUp(self):

        # This is to show how to use dataNoPeri
        # class dataNoPeri:
        #   def __init__(self, nx, ny, xBnds, yBnds):
        fd3x4 = dataNoPeri(4, 3, (45, 315), (-60,60))
        fd5x7 = dataNoPeri(7, 5, (45, 315), (-60,60))

        # Each Grid below is the same. This is just to make it clear which
        # grid is being used
        self.fromGrid3x4 = fd3x4.cdmsFromCell
        self.toGrid3x4   = fd3x4.cdmsFromCell

        self.fromGrid5x7 = fd5x7.cdmsFromCell
        self.toGrid5x7   = fd5x7.cdmsFromCell

        # Get the data for each grid
        self.data3x4 = fd3x4.cdmsFromData
        self.data5x7 = fd5x7.cdmsFromData

        self.eps = 1.e-8
Пример #4
0
    def setUp(self):

        # This is to show how to use dataNoPeri
        # class dataNoPeri:
        #   def __init__(self, nx, ny, xBnds, yBnds):
        fd3x4 = dataNoPeri(4, 3, (45, 315), (-60, 60))
        fd5x7 = dataNoPeri(7, 5, (45, 315), (-60, 60))

        # Each Grid below is the same. This is just to make it clear which
        # grid is being used
        self.fromGrid3x4 = fd3x4.cdmsFromCell
        self.toGrid3x4 = fd3x4.cdmsFromCell

        self.fromGrid5x7 = fd5x7.cdmsFromCell
        self.toGrid5x7 = fd5x7.cdmsFromCell

        # Get the data for each grid
        self.data3x4 = fd3x4.cdmsFromData
        self.data5x7 = fd5x7.cdmsFromData

        self.eps = 1.e-8