pyremap.descriptor.ProjectionGridDescriptor¶
- class pyremap.descriptor.ProjectionGridDescriptor(projection, meshName=None)[source]¶
 A class for describing a general logically rectangular grid that can be defined by a
pyprojprojection.- Variables:
 projection (pyproj.Proj) – The projection used to map from grid x-y space to latitude and longitude
latLonProjection (pyproj.Proj) – lat-lon projection used to transform from x-y to lat-lon space
x (numpy.ndarray) – The latitude coordinate at grid-cell centers
y (numpy.ndarray) – The longitude coordinate at grid-cell centers
xCorner (numpy.ndarray) – The latitude coordinate at grid-cell corners
yCorner (numpy.ndarray) – The longitude coordinate at grid-cell corners
history (str) – The history attribute written to SCRIP files
xVarName (str) – The name of the x variable
yVarName (str) – The name of the y variable
- __init__(projection, meshName=None)[source]¶
 Constructor stores the projection
- Parameters:
 projection (pyproj.Proj) – The projection used to map from grid x-y space to latitude and longitude
meshName (str, optional) – The name of the grid (e.g.
'10km_Antarctic_stereo')
Methods
__init__(projection[, meshName])Constructor stores the projection
create(projection, x, y, meshName)Given x and y coordinates defining the axes of the logically rectangular grid, save the coordinates interpolate/extrapolate to locate corners.
project_to_lat_lon(X, Y)Given X and Y locations of points in a projection, returns the corresponding latitude and longitude of each point.
read(projection, fileName[, meshName, ...])Given a grid file with x and y coordinates defining the axes of the logically rectangular grid, read in the x and y coordinates and interpolate/extrapolate to locate corners.
to_esmf(esmfFileName)Create an ESMF mesh file for the mesh
to_scrip(scripFileName)Create a SCRIP file based on the grid and projection.