wradlib.georef.rect.get_radolan_grid¶
-
wradlib.georef.rect.
get_radolan_grid
(nrows=None, ncols=None, trig=False, wgs84=False)¶ 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 [DWD2009]
¶ 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 ¶ 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 -433.4622 -3658.645 ¶ Coordinate lon lat x y LowerLeft 2.3419E 43.9336N -673.4622 -5008.645 Parameters: - nrows (int) – number of rows (460, 900 by default, 1100, 1500)
- ncols (int) – number of columns (460, 900 by default, 1400)
- trig (boolean) – if True, uses trigonometric formulas for calculation if False, uses osr spatial reference system to transform between projections trig is recommended to be False, however, the two ways of computation are expected to be equivalent.
- wgs84 (boolean) – if True, output coordinates are in wgs84 lonlat format (default: False)
Returns: radolan_grid (
numpy.ndarray
) – Array of shape (rows, cols, 2) xy- or lonlat-grid.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(trig=True) >>> 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: TypeError, ValueError