coordTrafo.py
coordTrafo - submodule of SLOTH
This sub-module contains two inverse functions to switch between rotated and non-rotated coordinates. The original version of these functions was written by Tobias TESCH at FZJ-IBG3, but was migrated to SLOTH for easier handling and less dependencies.
- sloth.coordTrafo.rotate_grid(lat, lon, np_lat, np_lon)[source]
Transform to rotated pole grid
- Parameters:
lat (ndarray) – ndarrays of geographical latitude/longitude values (in degree)
lon (ndarray) – ndarrays of geographical latitude/longitude values (in degree)
np_lat (double) – geographical latitude/longitude of rotated north pole (in degree)
np_lon (double) – geographical latitude/longitude of rotated north pole (in degree)
- Returns:
rlat, rlon – ndarrays of rotated latitude/longitude values (in degree)
- Return type:
ndarray
Notes
For reference see M. Baldauf et al. “Kurze Beschreibung des Lokal-Modells Kürzestfrist COSMO-DE (LMK) und seiner Datenbanken auf dem Datenserver des DWD”, pp. 21-22 https://www.dwd.de/SharedDocs/downloads/DE/modelldokumentationen/nwv/cosmo_de/cosmo_de_dbbeschr_version_2_4_161124.pdf?__blob=publicationFile&v=4
- sloth.coordTrafo.undo_grid_rotation(rlat, rlon, np_lat, np_lon)[source]
Undo the rotated pole grid transformation
- Parameters:
rlat (ndarray) – ndarrays of rotated latitude/longitude values (in degree)
rlon (ndarray) – ndarrays of rotated latitude/longitude values (in degree)
np_lat (ndarray) – geographical latitude/longitude of rotated north pole (in degree)
np_lon (ndarray) – geographical latitude/longitude of rotated north pole (in degree)
- Returns:
lat, lon – ndarrays of geographical latitude/longitude values (in degree)
- Return type:
ndarray
Notes
For reference see M. Baldauf et al. “Kurze Beschreibung des Lokal-Modells Kürzestfrist COSMO-DE (LMK) und seiner Datenbanken auf dem Datenserver des DWD”, pp. 21-22 https://www.dwd.de/SharedDocs/downloads/DE/modelldokumentationen/nwv/cosmo_de/cosmo_de_dbbeschr_version_2_4_161124.pdf?__blob=publicationFile&v=4