dmit.regrot module

Conversion between regular and rotated spherical coordinates. Original Source: Fortran SUBROUTINE regrof.F, by J.E. Haugen, 1992.

dmit.regrot.reg_to_rot(pole_lon, pole_lat, lon, lat)[source]

Rotates from regular grid to rotated grid

Parameters
  • pole_lon (float) – Longitude of pole in degrees

  • pole_lat (float) – Latitude of pole in degrees

  • lon (float, list) – Longitudes of points in grid. Can also be a single point.

  • lat (float, list) – Latitudes of points in grid. Can also be a single point.

Returns

  • lon1 (float, list) – Longitudes of rotated grid. Same shape as input.

  • lat1 (float, list) – Latitudes of rotated grid. Same shape as input.

dmit.regrot.rot_to_reg(pole_lon, pole_lat, lon, lat)[source]

Rotates from rotated grid to regular grid

Parameters
  • pole_lon (float) – Longitude of pole in degrees

  • pole_lat (float) – Latitude of pole in degrees

  • lon (float, list) – Longitudes of points in grid. Can also be a single point.

  • lat (float, list) – Latitudes of points in grid. Can also be a single point.

Returns

  • lon1 (float, list) – Longitudes of regular grid. Same shape as input.

  • lat1 (float, list) – Latitudes of regular grid. Same shape as input.