PROJ2LL Subroutine

public subroutine PROJ2LL(x_in, y_in, lon_out, lat_out, projection_attributes_in, projection_type_in)

Arguments

Type IntentOptional Attributes Name
real, intent(in) :: x_in
real, intent(in) :: y_in
real, intent(out) :: lon_out
real, intent(out) :: lat_out
double precision, intent(in) :: projection_attributes_in(10)
integer, intent(in) :: projection_type_in

Calls

proc~~proj2ll~~CallsGraph proc~proj2ll PROJ2LL proc~laea2ll LAEA2LL proc~proj2ll->proc~laea2ll proc~lambert2lb2_uemep lambert2lb2_uEMEP proc~proj2ll->proc~lambert2lb2_uemep proc~ltm2ll ltm2ll proc~proj2ll->proc~ltm2ll proc~ps2ll_spherical PS2LL_spherical proc~proj2ll->proc~ps2ll_spherical proc~rdm2ll RDM2LL proc~proj2ll->proc~rdm2ll proc~utm2ll utm2ll proc~proj2ll->proc~utm2ll dcos dcos proc~ltm2ll->dcos dsin dsin proc~ltm2ll->dsin dtan dtan proc~ltm2ll->dtan proc~utm2ll->dcos proc~utm2ll->dsin proc~utm2ll->dtan

Called by

proc~~proj2ll~~CalledByGraph proc~proj2ll PROJ2LL proc~read_country_bounding_box_data read_country_bounding_box_data proc~read_country_bounding_box_data->proc~proj2ll proc~uemep_define_subgrid uEMEP_define_subgrid proc~uemep_define_subgrid->proc~proj2ll proc~uemep_define_subgrid_extent uEMEP_define_subgrid_extent proc~uemep_define_subgrid_extent->proc~proj2ll proc~uemep_grid_roads uEMEP_grid_roads proc~uemep_grid_roads->proc~proj2ll proc~uemep_preaggregate_shipping_asi_data uEMEP_preaggregate_shipping_asi_data proc~uemep_preaggregate_shipping_asi_data->proc~proj2ll proc~uemep_read_emep uEMEP_read_EMEP proc~uemep_read_emep->proc~proj2ll proc~uemep_read_landuse_rivm_data uEMEP_read_landuse_rivm_data proc~uemep_read_landuse_rivm_data->proc~proj2ll proc~uemep_read_meteo_nc uEMEP_read_meteo_nc proc~uemep_read_meteo_nc->proc~proj2ll proc~uemep_read_monthly_and_daily_shipping_asi_data uEMEP_read_monthly_and_daily_shipping_asi_data proc~uemep_read_monthly_and_daily_shipping_asi_data->proc~proj2ll proc~uemep_read_netcdf_landuse_latlon uEMEP_read_netcdf_landuse_latlon proc~uemep_read_netcdf_landuse_latlon->proc~proj2ll proc~uemep_read_netcdf_population_latlon uEMEP_read_netcdf_population_latlon proc~uemep_read_netcdf_population_latlon->proc~proj2ll proc~uemep_read_netcdf_shipping_latlon uEMEP_read_netcdf_shipping_latlon proc~uemep_read_netcdf_shipping_latlon->proc~proj2ll proc~uemep_read_roadlink_data_ascii uEMEP_read_roadlink_data_ascii proc~uemep_read_roadlink_data_ascii->proc~proj2ll proc~uemep_read_weekly_shipping_asi_data uEMEP_read_weekly_shipping_asi_data proc~uemep_read_weekly_shipping_asi_data->proc~proj2ll proc~uemep_region_mask_new uEMEP_region_mask_new proc~uemep_region_mask_new->proc~proj2ll proc~uemep_set_region_tile_grids uEMEP_set_region_tile_grids proc~uemep_set_region_tile_grids->proc~proj2ll proc~uemep_set_tile_grids uEMEP_set_tile_grids proc~uemep_set_tile_grids->proc~proj2ll proc~uemep_calculate_emissions_for_emep uEMEP_calculate_emissions_for_EMEP proc~uemep_calculate_emissions_for_emep->proc~uemep_grid_roads proc~uemep_calculate_emissions_for_emep->proc~uemep_read_meteo_nc proc~uemep_calculate_emissions_for_emep->proc~uemep_read_monthly_and_daily_shipping_asi_data proc~uemep_calculate_emissions_for_emep->proc~uemep_read_roadlink_data_ascii proc~uemep_calculate_emissions_for_emep->proc~uemep_read_weekly_shipping_asi_data program~uemep uEMEP program~uemep->proc~read_country_bounding_box_data program~uemep->proc~uemep_define_subgrid program~uemep->proc~uemep_define_subgrid_extent program~uemep->proc~uemep_grid_roads program~uemep->proc~uemep_preaggregate_shipping_asi_data program~uemep->proc~uemep_read_emep program~uemep->proc~uemep_read_landuse_rivm_data program~uemep->proc~uemep_read_meteo_nc program~uemep->proc~uemep_read_monthly_and_daily_shipping_asi_data program~uemep->proc~uemep_read_netcdf_landuse_latlon program~uemep->proc~uemep_read_netcdf_population_latlon program~uemep->proc~uemep_read_netcdf_shipping_latlon program~uemep->proc~uemep_read_roadlink_data_ascii program~uemep->proc~uemep_read_weekly_shipping_asi_data program~uemep->proc~uemep_region_mask_new program~uemep->proc~uemep_set_region_tile_grids program~uemep->proc~uemep_set_tile_grids program~uemep->proc~uemep_calculate_emissions_for_emep

Source Code

    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