subroutine PROJ2LL(x_in, y_in, lon_out, lat_out, projection_attributes_in, projection_type_in)
! Definitions only needed for the identification indexes
double precision, intent(in) :: projection_attributes_in(10)
real, intent(in) :: x_in, y_in
integer, intent(in) :: projection_type_in
real, intent(out) :: lon_out,lat_out
integer :: utm_zone_in
real :: ltm_lon0_in
if (projection_type_in .eq. RDM_projection_index) then
call RDM2LL(y_in, x_in, lat_out, lon_out)
else if (projection_type_in .eq. UTM_projection_index) then
utm_zone_in = floor(projection_attributes_in(1) + 0.5)
call utm2ll(1, utm_zone_in, y_in, x_in, lat_out, lon_out)
else if (projection_type_in .eq. LTM_projection_index) then
utm_zone_in = floor(projection_attributes_in(1) + 0.5)
ltm_lon0_in = projection_attributes_in(2)
call ltm2ll(1, utm_zone_in, ltm_lon0_in, y_in, x_in, lat_out, lon_out)
else if (projection_type_in .eq. LAEA_projection_index) then
call LAEA2LL(x_in, y_in, lon_out, lat_out, projection_attributes_in)
else if (projection_type_in .eq. LCC_projection_index) then
call lambert2lb2_uEMEP(x_in, y_in, lon_out, lat_out, projection_attributes_in)
else if (projection_type_in .eq. PS_projection_index) then
call PS2LL_spherical(x_in, y_in, lon_out, lat_out, projection_attributes_in)
else if (projection_type_in .eq. LL_projection_index) then
lon_out = x_in
lat_out = y_in
else
write(unit_logfile, '(A,I0)') 'ERROR: This projection type index is not implemented:', projection_type_in
stop
end if
end subroutine PROJ2LL