Sign up ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

First I should clarify I don't have previous experience with the field, so I don't know the technical terminology. My question is as follows:

I have two weather datasets:

  • The first one has the regular coordinate system (I don't know if it has an specific name), ranging from -90 to 90 and -180 to 180, and the poles are at latitudes -90 and 90.

  • In the second one, although it should correspond to the same region, I noticed something different: latitude and longitude were not the same, as they have another reference point (in the description is called a rotated grid). Together with the lat/lon pairs, comes the following information: southern pole lat: -35.00, southern pole lon: -15.00, angle: 0.0.

I need to transform the second pair of lon/lat to the first one. It could be as simple as add 35 to the latitudes and 15 to the longitudes, since the angle is 0 and it seems a simple shifting, but I'm not sure.

Edit: The information I have about the coordinates is the following for the first one for the second one

Apparently, the second coordinate system is defined by a general rotation of the sphere

"One choice for these parameters is:

  • The geographic latitude in degrees of the southern pole of the coordinate system, thetap for example;

  • The geographic longitude in degrees of the southern pole of the coordinate system, lambdap for example;

  • The angle of rotation in degrees about the new polar axis (measured clockwise when looking from the southern to the northern pole) of the coordinate system, assuming the new axis to have been obtained by first rotating the sphere through lambdap degrees about the geographic polar axis, and then rotating through (90 + thetap) degrees so that the southern pole moved along the (previously rotated) Greenwich meridian."

but still I don't know how to convert this to the first one.

Any help on the subject will be much appreciated

share|improve this question
So is this GRIB data? If so, maybe we need a grib tag. –  Kirk Kuykendall Jun 9 '11 at 15:59

3 Answers 3

up vote 13 down vote accepted

Manually reversing the rotation should do the trick; there should be a formula for rotating spherical coordinate systems somewhere, but since I can't find it, here's the derivation ( ' marks the rotated coordinate system; normal geographic coordinates use plain symbols):

First convert the data in the second dataset from spherical (lon', lat') to (x',y',z') using:

x' = cos(lon')*cos(lat')
y' = sin(lon')*cos(lat')
z' = sin(lat')

Then use two rotation matrices to rotate the second coordinate system so that it coincides with the first 'normal' one. We'll be rotating the coordinate axes, so we can use the axis rotation matrices. We need to reverse the sign in the ϑ matrix to match the rotation sense used in the ECMWF definition, which seems to be different from the standard positive direction.

Since we're undoing the rotation described in the definition of the coordinate system, we first rotate by ϑ = -(90 + lat0) = -55 degrees around the y' axis (along the rotated Greenwich meridian) and then by φ = -lon0 = +15 degrees around the z axis):

x   ( cos(φ), sin(φ), 0) (  cos(ϑ), 0, sin(ϑ)) (x')
y = (-sin(φ), cos(φ), 0).(  0     , 1, 0     ).(y')
z   ( 0     , 0     , 1) ( -sin(ϑ), 0, cos(ϑ)) (z')

Expanded, this becomes:

x = cos(ϑ) cos(φ) x' + sin(φ) y' + sin(ϑ) cos(φ) z'
y = -cos(ϑ) sin(φ) x' + cos(φ) y' - sin(ϑ) sin(φ) z'
z = -sin(ϑ) x' + cos(ϑ) z'

Then convert back to 'normal' (lat,lon) using

lat = arcsin(z)
lon = atan2(y, x)

If you don't have atan2, you can implement it yourself by using atan(y/x) and examining the signs of x and y

Make sure that you convert all angles to radians before using the trigonometric functions, or you'll get weird results; convert back to degrees in the end if that's what you prefer...

Example (rotated sphere coordinates ==> standard geographic coordinates):

  • southern pole of the rotated CS is (lat0, lon0)

    (-90°, *) ==> (-35°, -15°)

  • prime meridian of the rotated CS is the -15° meridian in geographic (rotated 55° towards north)

    (0°, 0°) ==> (55°, -15°)

  • symmetry requires that both equators intersect at 90°/-90° in the new CS, or 75°/-105° in geographic coordinates

    (0°, 90°) ==> (0°, 75°)
    (0°, -90°) ==> (0°,-105°)

EDIT: Rewritten the answer thanks to very constructive comment by whuber: the matrices and the expansion are now in sync, using proper signs for the rotation parameters; added reference to the definition of the matrices; removed atan(y/x) from the answer; added examples of conversion.

share|improve this answer
The idea's good, but some of the details need fixing. lon0 = -15, not +15. All three lines in the expansion of the matrix product are incorrect. ATan2 (or its equivalent) must be used, modified to return any reasonable longitude when x=y=0. Note that because x^2+y^2+z^2 = 1, at the end you get simply lat = Arcsin(z). –  whuber Sep 19 '11 at 19:59
Thanks. I fixed the answer to at least make the math correct. The rotations should now match the description in the CS definition, but it's hard to be certain about their sign without an example (other than the position of the south pole). –  mkadunc Sep 20 '11 at 12:36
Well done! I'm surprised this reply isn't getting more votes, because it provides useful and hard-to-find material. –  whuber Sep 20 '11 at 15:07
This is indeed very hard to find material, thank you very much for the answer. I ended up using this software to convert from a rotated grid to a regular grid. My guess is that it first transforms the coordinates as in this answer and then interpolates them in order to give the results at the points of a rectangular grid. Although a little late, I leave this her for future reference. –  skd Mar 19 '13 at 15:00
I'm struggling to work out the matrices for converting into the rotated frame. At first I thought I could simply reorder the un-rotation matrices, but because the axes have changes the rotation around Z in not correct. Could you help? –  Craig Jan 21 at 0:08

Which software are you using? Every GIS software will have the facility to show you the current cordinate system/projection information. , which can help you in getting the name of your current coordinate system.

Additionally, if you're using ArcGIS, you can use the Project tool to re-project the second dataset, importing settings from the first one.

share|improve this answer
Unfortunatly I'm not using any software. Those are just grid datasets and they come with the following information: - For the first one:… - For the second one:… –  skd Jun 9 '11 at 11:51
Since the angle of rotation is 0, I think a simple translation should align the second dataset to the first one, like you said adding 15 to X and 35 to Y –  ujjwalesri Jun 10 '11 at 4:36

In case anyone is interested I've shared a MATLAB script on the file exchange transforming regular lat/lon to rotated lat/lon and vice versa: Rotated grid transform

share|improve this answer
Thanks for the reply I will definately try this script. –  skd Oct 6 '13 at 1:15
Just in case the link goes dead can you please insert the code for future readers. Thanks. –  Michael Miles-Stimson Oct 1 at 0:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.