[Proj] forward/inverse projection logic for ob_tran
Davide Cesari
dcesari at arpa.emr.it
Thu Nov 22 02:54:23 EST 2012
Hello, after a long pause, I come back to this thread of using proj with
the so-called rotated lat/lon coordinates, used mainly in Numerical
Weather Prediction models.
I think I have found a cleaner solution, i.e. using proj for going from
the geographic space to the "projected" space (which in this case is
still a spherical polar coordinate system) and invproj for the opposite
task and not the other way round. For this purpose it is just necessary
to set the parameters in a different way in order to invert the
transformation, which is not difficult (assuming that previously o_lon_p
and o_lat_p were interpreted as the coordinates of north pole of
rotation and lon_0=180):
o_lat_p remains the same (= lat of rotated N pole)
o_lon_p=180+lon_0=360=0
lon_0=180+o_lon_p (= 180 + lon of rotated N pole)
So in the case previously indicated by Hermann the correct
transformation using invproj would be:
invproj -f "%.6f" -m 57.2957795130823 \
+proj=ob_tran +o_proj=latlon \
+o_lon_p=0 +o_lat_p=39.25 +lon_0=18
which gives the expected results. Of course the same parameters apply to
forward proj.
If anybody is going to try this feature, please report any result.
Best regards, Davide
--
============================= Davide Cesari ============================
Servizio IdroMeteoClima - ARPA Emilia Romagna
NWP modelling - Modellistica numerica previsionale
E-mail: dcesari at arpa.emr.it
Home page: http://www.webalice.it/o.drofa/davide/
Address: ARPA-SIM, Viale Silvani 6, 40122 Bologna, Italy
========================================================================
P.S. I bcc some people who were interested in this subject, in case they
aren't on the proj mailing list anymore.
On 10/10/2011 09:54, Davide Cesari wrote:
> Il -10/01/-28163 20:59, Hermann Peifer ha scritto:
>> Hi,
>>
>> I am currently dealing with regional climate models, where the data
>> comes in form of "rotated pole lat/lon grids", with the North Pole at
>> 39.25N, 162W.
>>
>> I am able to convert "rotated pole coordinates" to "normal lat/lon
>> coordinates" by using:
>>
>> $ proj -f "%.6f" -m 57.2957795130823 +proj=ob_tran +o_proj=latlon
>> +o_lon_p=-162 +o_lat_p=39.25 +lon_0=180
>>
>> It looks to me that the proj/invproj (i.e. forward/inverse) projection
>> logic is opposite to what I would expect: I need to run proj (i.e. the
>> forward projection) in order get from the "rotated lat/lon" coordinates
>> (say: lon=0,lat=0) back to the "normal lat/lon coordinates" (here:
>> lon=18.0,lat=50.75), and vice versa.
>>
>> Is this expected behaviour? If yes: what am I missing?
>>
>> Thanks for your time, Hermann
More information about the Proj
mailing list