def createGaussianGrid(nlats, xorigin=0.0, order="yx"): """ createGaussianGrid(nlats, xorigin=0.0) Create a Gaussian grid, with shape (nlats, 2*nlats). 'nlats' is the number of latitudes. 'xorigin' is the origin of the longitude axis. 'order' is either "yx" or "xy" """ lat = createGaussianAxis(nlats) nlons = 2*nlats lon = createUniformLongitudeAxis(xorigin, nlons, 360.0/float(nlons)) return createRectGrid(lat, lon, order, "gaussian")
def createGaussianGrid(nlats, xorigin=0.0, order="yx"): """ createGaussianGrid(nlats, xorigin=0.0) Create a Gaussian grid, with shape (nlats, 2*nlats). 'nlats' is the number of latitudes. 'xorigin' is the origin of the longitude axis. 'order' is either "yx" or "xy" """ lat = createGaussianAxis(nlats) nlons = 2 * nlats lon = createUniformLongitudeAxis(xorigin, nlons, 360.0 / float(nlons)) return createRectGrid(lat, lon, order, "gaussian")
def createUniformGrid(startLat, nlat, deltaLat, startLon, nlon, deltaLon, order="yx", mask=None): lat = createUniformLatitudeAxis(startLat, nlat, deltaLat) lon = createUniformLongitudeAxis(startLon, nlon, deltaLon) return createRectGrid(lat, lon, order, "uniform", mask)
def createUniformGrid(startLat, nlat, deltaLat, startLon, nlon, deltaLon, order="yx", mask=None): lat = createUniformLatitudeAxis(startLat, nlat, deltaLat) lon = createUniformLongitudeAxis(startLon, nlon, deltaLon) return createRectGrid(lat,lon,order,"uniform",mask)