libsim  Versione 7.1.8

◆ geo_proj_unproj()

elemental subroutine geo_proj_unproj ( type(geo_proj), intent(in)  this,
double precision, intent(in)  x,
double precision, intent(in)  y,
double precision, intent(out)  lon,
double precision, intent(out)  lat 
)

Computes and returns geographical coordinates given the coordinates in the projected system.

Parametri
[in]thisobject to unproject
[in]xprojected coordinates
[in]yprojected coordinates
[out]longeographical coordinates
[out]latgeographical coordinates

Definizione alla linea 902 del file geo_proj_class.F90.

903 ! http://en.wikipedia.org/wiki/Lambert_conformal_conic_projection
904 ! http://fr.wikipedia.org/wiki/Projection_conique_conforme_de_Lambert
905 ! with the following guess:
906 ! projection is always polar, so reference latitude=+-90 according to
907 ! projectionCenterFlag; reference longitude is LoV.
908 ! how coordinates of south pole should be treated? Metview ignores them.
909 ELEMENTAL SUBROUTINE proj_lambert(lon,lat,x,y, &
910  latin1, latin2, lov, lad, projection_center_flag)
911 DOUBLE PRECISION, INTENT(in) :: lon,lat
912 DOUBLE PRECISION, INTENT(out) :: x,y
913 DOUBLE PRECISION, INTENT(in) :: latin1, latin2, lov, lad
914 INTEGER, INTENT(in) :: projection_center_flag
915 
916 DOUBLE PRECISION :: n, f, ro0, ro, cs1, cs2, cs3, pollat, angle, cot
917 DOUBLE PRECISION, PARAMETER :: epsy = 1.0d-100
918 
919 IF (iand(projection_center_flag, 128) == 0) THEN
920  pollat = 90.d0*degrad
921 ELSE
922  pollat = -90.d0*degrad
923 ENDIF
924 cs1 = cos(degrad*latin1)
925 cs2 = tan(pi*.25d0 + degrad*latin1*.5d0)
926 
927 IF (latin1 == latin2) THEN
928  n = sin(degrad*latin1) ! verify that n->sin(latin1) when latin2->latin1
929 ELSE
930  n = log(cs1/cos(degrad*latin2)) / &
931  log(tan(pi*.25d0 + degrad*latin2*.5d0) / cs2)
932 ENDIF
933 f = cs1*cs2**n/n*rearth ! check that rearth is correct here (only if lad==latin1?)
934 angle = pi*.25d0 + pollat*.5d0
935 cot = cos(angle)/sin(angle)
936 IF (cot > epsy) THEN
937  ro0 = f*cot**n
938 ELSE

Generated with Doxygen.