예제 #1
0
파일: __init__.py 프로젝트: jmettes/tcrm
    def polarGridAroundEye(self, i):
        """
        Generate a polar coordinate grid around the eye of the
        tropical cyclone at time i.

        :type  i: int
        :param i: the time.
        """
        if self.domain=='full':
            R, theta = makeGrid(self.track.Longitude[i],
                                self.track.Latitude[i],
                                self.margin, self.resolution,
                                minLon=self.gridLimit['xMin'],
                                maxLon=self.gridLimit['xMax'],
                                minLat=self.gridLimit['yMin'],
                                maxLat=self.gridLimit['yMax'])
        else:
            R, theta = makeGrid(self.track.Longitude[i],
                                self.track.Latitude[i],
                                self.margin, self.resolution)
        return R, theta
예제 #2
0
    def polarGridAroundEye(self, i):
        """
        Generate a polar coordinate grid around the eye of the
        tropical cyclone at time i.

        :type  i: int
        :param i: the time.
        """
        if self.domain == 'full':
            R, theta = makeGrid(self.track.Longitude[i],
                                self.track.Latitude[i],
                                self.margin, self.resolution,
                                minLon=self.gridLimit['xMin'],
                                maxLon=self.gridLimit['xMax'],
                                minLat=self.gridLimit['yMin'],
                                maxLat=self.gridLimit['yMax'])
        else:
            R, theta = makeGrid(self.track.Longitude[i],
                                self.track.Latitude[i],
                                self.margin, self.resolution)
        return R, theta
예제 #3
0
def polarGridAroundEye(lon, lat, margin=2, resolution=0.02):
    R, theta = makeGrid(lon, lat, margin, resolution)
    return R, theta