subroutine geo_ll(geog,plat,plon) C given a vector geog in the geo (geographic) coordinate system, C returns as plat and plon the latitude and longitude of the C corresponding point. C C The geo system is a 3-D Cartesian coordinate system, with origin C at the Center of the Earth, with the x_3 axis pointing to the North C Pole, the x_1 axis pointing to the Equator at the Greenwich Meridian, C and the x_2 axis by the right hand rule pointing to the Equator C at 90 E. parameter (pi=3.14159265358979323846,radpdg=pi/180.) parameter (dgprad=180./pi) dimension geog(3) fact = geog(1)*geog(1) + geog(2)*geog(2) if (fact .le. 0.) then plon = 0. plat = sign(90.,geog(3)) else fact = sqrt(fact) plat = DGPRAD * atan2(geog(3),fact) plon = DGPRAD * atan2(geog(2),geog(1)) endif return end