wradlib.georef.rect.get_radolan_grid#
- wradlib.georef.rect.get_radolan_grid(nrows=None, ncols=None, **kwargs)[source]#
Calculates x/y coordinates of radolan grid of the German Weather Service
Returns the x,y coordinates of the radolan grid positions (lower left corner of every pixel). The radolan grid is a polarstereographic projection, the projection information was taken from RADOLAN-RADVOR-OP Kompositformat_2.2.2 [DWD, 2009]
Coordinates for 900km x 900km grid# Coordinate
lon
lat
x
y
LowerLeft
3.5889E
46.9526N
-523.4622
-4658.645
LowerRight
14.6209E
47.0705N
376.5378
-4658.645
UpperRight
15.7208E
54.7405N
376.5378
-3758.645
UpperLeft
2.0715E
54.5877N
-523.4622
-3758.645
Coordinates for 1100km x 900km grid# Coordinate
lon
lat
x
y
LowerLeft
4.6759E
46.1929N
-443.4622
-4758.645
LowerRight
15.4801E
46.1827N
456.5378
-4758.645
UpperRight
17.1128E
55.5342N
456.5378
-3658.645
UpperLeft
3.0889E
55.5482N
-443.4622
-3658.645
Coordinates for 1500km x 1400km grid# Coordinate
lon
lat
x
y
LowerLeft
2.3419E
43.9336N
-673.4622
-5008.645
- Parameters
- Keyword Arguments
wgs84 (
bool
) – if True, output coordinates are in wgs84 lonlat format (default: False)mode (
str
) – ‘radolan’ - lower left pixel coordinates ‘center’ - pixel center coordinates ‘edge’ - pixel edge coordinatescrs (
osgeo.osr.SpatialReference
| str) – projection of the DWD grid with spheroid model or string trig to use trigonometric formulas for calculation (only for earth model - sphere). Defaults to None (earth model - sphere).
- Returns
radolan_grid (
numpy.ndarray
) – Array of xy- or lonlat-grid. shape is (nrows, ncols, 2) if mode=’radolan’ shape is (nrows, ncols, 2) if mode=’center’ shape is (nrows+1, ncols+1, 2) if mode=’edge’
Examples
>>> # using osr spatial reference transformation >>> import wradlib.georef as georef # noqa >>> radolan_grid = georef.get_radolan_grid() >>> print("{0}, ({1:.4f}, {2:.4f})".format(radolan_grid.shape, *radolan_grid[0,0,:])) # noqa (900, 900, 2), (-523.4622, -4658.6447)
>>> # using pure trigonometric transformations >>> import wradlib.georef as georef >>> radolan_grid = georef.get_radolan_grid(crs="trig") >>> print("{0}, ({1:.4f}, {2:.4f})".format(radolan_grid.shape, *radolan_grid[0,0,:])) # noqa (900, 900, 2), (-523.4622, -4658.6447)
>>> # using osr spatial reference transformation >>> import wradlib.georef as georef >>> radolan_grid = georef.get_radolan_grid(1500, 1400) >>> print("{0}, ({1:.4f}, {2:.4f})".format(radolan_grid.shape, *radolan_grid[0,0,:])) # noqa (1500, 1400, 2), (-673.4622, -5008.6447)
>>> # using osr spatial reference transformation >>> import wradlib.georef as georef >>> radolan_grid = georef.get_radolan_grid(900, 900, wgs84=True) >>> print("{0}, ({1:.4f}, {2:.4f})".format(radolan_grid.shape, *radolan_grid[0,0,:])) # noqa (900, 900, 2), (3.5889, 46.9526)
See Polar Stereographic Projection.
- Raises