LL2PROJ Subroutine

public subroutine LL2PROJ(lon_in, lat_in, x_out, y_out, projection_attributes_out, projection_type_out)

Arguments

Type IntentOptional Attributes Name
real, intent(in) :: lon_in
real, intent(in) :: lat_in
real, intent(out) :: x_out
real, intent(out) :: y_out
double precision, intent(in) :: projection_attributes_out(10)
integer, intent(in) :: projection_type_out

Calls

proc~~ll2proj~~CallsGraph proc~ll2proj LL2PROJ proc~lb2lambert2_uemep lb2lambert2_uEMEP proc~ll2proj->proc~lb2lambert2_uemep proc~ll2laea LL2LAEA proc~ll2proj->proc~ll2laea proc~ll2ltm ll2ltm proc~ll2proj->proc~ll2ltm proc~ll2ps_spherical LL2PS_spherical proc~ll2proj->proc~ll2ps_spherical proc~ll2utm ll2utm proc~ll2proj->proc~ll2utm dcos dcos proc~ll2ltm->dcos dsin dsin proc~ll2ltm->dsin dtan dtan proc~ll2ltm->dtan proc~ll2utm->dcos proc~ll2utm->dsin proc~ll2utm->dtan

Called by

proc~~ll2proj~~CalledByGraph proc~ll2proj LL2PROJ proc~uemep_region_mask_new uEMEP_region_mask_new proc~uemep_region_mask_new->proc~ll2proj proc~uemep_subgrid_emep_from_in_region uEMEP_subgrid_EMEP_from_in_region proc~uemep_subgrid_emep_from_in_region->proc~ll2proj program~uemep uEMEP program~uemep->proc~uemep_region_mask_new program~uemep->proc~uemep_subgrid_emep_from_in_region

Source Code

    subroutine LL2PROJ(lon_in, lat_in, x_out, y_out, projection_attributes_out, projection_type_out)
        ! Definitions only needed for the identification indexes
        double precision, intent(in) :: projection_attributes_out(10)
        real, intent(out) :: x_out, y_out
        integer, intent(in) :: projection_type_out
        real, intent(in) :: lon_in,lat_in
        integer :: utm_zone_out
        real :: ltm_lon0_out

        if (projection_type_out .eq. RDM_projection_index) then
            write(unit_logfile,'(A)') ' ERROR: Conversion from lon-lat to RDM projection is not implemented"'
            stop
        else if (projection_type_out .eq. UTM_projection_index) then
            utm_zone_out = floor(projection_attributes_out(1) + 0.5)
            call ll2utm(1, utm_zone_out, lat_in, lon_in, y_out, x_out)
        else if (projection_type_out .eq. LTM_projection_index) then
            utm_zone_out = floor(projection_attributes_out(1) + 0.5)
            ltm_lon0_out = projection_attributes_out(2)
            call ll2ltm(1, ltm_lon0_out, lat_in, lon_in, y_out, x_out)  !?????????
        else if (projection_type_out .eq. LAEA_projection_index) then
            call LL2LAEA(x_out, y_out, lon_in, lat_in, projection_attributes_out)
        else if (projection_type_out .eq. LCC_projection_index) then
            call lb2lambert2_uEMEP(x_out, y_out, lon_in, lat_in, projection_attributes_out)
        else if (projection_type_out .eq. PS_projection_index) then
            call LL2PS_spherical(x_out, y_out, lon_in, lat_in, projection_attributes_out)
        else if (projection_type_out .eq. LL_projection_index) then
            x_out = lon_in
            y_out = lat_in
        else
            write(unit_logfile, '(A,I0)') 'ERROR: This projection type index is not implemented:', projection_type_out
            stop
        end if
    end subroutine LL2PROJ