Bases: pytesmo.grid.grids.BasicGrid
Regular grid with coordinates as pixel center.
Regular grid that just has lat, lon coordinates and can find the nearest neighbour. It can also yield the gpi, lat, lon information in order.
Parameters: | lon : numpy.array
lat : numpy.array
gpis : numpy.array, optional
subset : numpy.array, optional
setup_kdTree : boolean, optional
shape : tuple, optional
sp_res : int or float
|
---|
Attributes
arrlon | (numpy.array) array of all longitudes of the grid |
arrlat | (numpy.array) array of all latitudes of the grid |
n_gpi | (int) number of gpis in the grid |
gpidirect | (boolean) if true the gpi number is equal to the index of arrlon and arrlat |
gpis | (numpy.array) gpi number for elements in arrlon and arrlat gpi[i] is located at arrlon[i],arrlat[i] |
subset | (numpy.array) if given then this contains the indices of a subset of the grid. This can be used if only a part of a grid is interesting for a application. e.g. land points, or only a specific country |
allpoints | (boolean) if False only a subset of the grid is active |
activearrlon | (numpy.array) array of longitudes that are active, is defined by arrlon[subset] if a subset is given otherwise equal to arrlon |
activearrlat | (numpy.array) array of latitudes that are active, is defined by arrlat[subset] if a subset is given otherwise equal to arrlat |
activegpis | (numpy.array) array of gpis that are active, is defined by gpis[subset] if a subset is given otherwise equal to gpis |
issplit | (boolean) if True then the array was split in n parts with the self.split function |
kdTree | (object) grid.nearest_neighbor.findGeoNN object for nearest neighbor search |
shape | (tuple, optional) if given during initialization then this is the shape the grid can be reshaped to this only makes sense for regular lat,lon grids |
latdim | (numpy.array, optional) if shape is given this attribute has contains all latitudes that make up the regular lat,lon grid |
londim | (numpy.array, optional) if shape is given this attribute has contains all longitudes that make up the regular lat,lon grid |
Methods
Bases: pytesmo.grid.grids.BasicGrid
Regular grid for a specific shape.
Regular grid for spedific shape, that just has lat,lon coordinates and can find the nearest neighbour. It can also yield the gpi, lat, lon information in order.
Parameters: | lon : numpy.array
lat : numpy.array
gpis : numpy.array, optional
subset : numpy.array, optional
setup_kdTree : boolean, optional
shape : tuple, optional
region : str, optional
sp_res : float
shapefile : str, optional
|
---|
Attributes
arrlon | (numpy.array) array of all longitudes of the grid |
arrlat | (numpy.array) array of all latitudes of the grid |
n_gpi | (int) number of gpis in the grid |
gpidirect | (boolean) if true the gpi number is equal to the index of arrlon and arrlat |
gpis | (numpy.array) gpi number for elements in arrlon and arrlat gpi[i] is located at arrlon[i],arrlat[i] |
subset | (numpy.array) if given then this contains the indices of a subset of the grid. This can be used if only a part of a grid is interesting for a application. e.g. land points, or only a specific country |
allpoints | (boolean) if False only a subset of the grid is active |
activearrlon | (numpy.array) array of longitudes that are active, is defined by arrlon[subset] if a subset is given otherwise equal to arrlon |
activearrlat | (numpy.array) array of latitudes that are active, is defined by arrlat[subset] if a subset is given otherwise equal to arrlat |
activegpis | (numpy.array) array of gpis that are active, is defined by gpis[subset] if a subset is given otherwise equal to gpis |
issplit | (boolean) if True then the array was split in n parts with the self.split function |
kdTree | (object) grid.nearest_neighbor.findGeoNN object for nearest neighbor search |
shape | (tuple, optional) if given during initialization then this is the shape the grid can be reshaped to this only makes sense for regular lat,lon grids |
latdim | (numpy.array, optional) if shape is given this attribute has contains all latitudes that make up the regular lat,lon grid |
londim | (numpy.array, optional) if shape is given this attribute has contains all longitudes that make up the regular lat,lon grid |
region | (str) Identifier of the region in the shapefile. If the default shapefile is used, this would be the FIPS country code. |
sp_res | (float) spatial resolution of the grid |
shp | (poets.shape.shapes.Country) Information about the country/region shape |
Methods