rdm2ll.f90 Source File


Files dependent on this one

sourcefile~~rdm2ll.f90~~AfferentGraph sourcefile~rdm2ll.f90 rdm2ll.f90 sourcefile~lambert_projection.f90 lambert_projection.f90 sourcefile~lambert_projection.f90->sourcefile~rdm2ll.f90 sourcefile~uemep_read_agriculture_rivm_data.f90 uEMEP_read_agriculture_rivm_data.f90 sourcefile~uemep_read_agriculture_rivm_data.f90->sourcefile~rdm2ll.f90 sourcefile~uemep_read_agriculture_rivm_data.f90->sourcefile~lambert_projection.f90 sourcefile~uemep_auto_subgrid.f90 uEMEP_auto_subgrid.f90 sourcefile~uemep_auto_subgrid.f90->sourcefile~lambert_projection.f90 sourcefile~uemep_crossreference_grids.f90 uEMEP_crossreference_grids.f90 sourcefile~uemep_crossreference_grids.f90->sourcefile~lambert_projection.f90 sourcefile~uemep_define_subgrid.f90 uEMEP_define_subgrid.f90 sourcefile~uemep_define_subgrid.f90->sourcefile~lambert_projection.f90 sourcefile~uemep_grid_roads.f90 uEMEP_grid_roads.f90 sourcefile~uemep_grid_roads.f90->sourcefile~lambert_projection.f90 sourcefile~uemep_main.f90 uEMEP_main.f90 sourcefile~uemep_main.f90->sourcefile~uemep_read_agriculture_rivm_data.f90 sourcefile~uemep_main.f90->sourcefile~uemep_auto_subgrid.f90 sourcefile~uemep_main.f90->sourcefile~uemep_crossreference_grids.f90 sourcefile~uemep_main.f90->sourcefile~uemep_define_subgrid.f90 sourcefile~uemep_main.f90->sourcefile~uemep_grid_roads.f90 sourcefile~uemep_read_emep.f90 uEMEP_read_EMEP.f90 sourcefile~uemep_main.f90->sourcefile~uemep_read_emep.f90 sourcefile~uemep_read_industry_data.f90 uEMEP_read_industry_data.f90 sourcefile~uemep_main.f90->sourcefile~uemep_read_industry_data.f90 sourcefile~uemep_read_landuse_rivm_data.f90 uEMEP_read_landuse_rivm_data.f90 sourcefile~uemep_main.f90->sourcefile~uemep_read_landuse_rivm_data.f90 sourcefile~uemep_read_meteo_nc.f90 uEMEP_read_meteo_nc.f90 sourcefile~uemep_main.f90->sourcefile~uemep_read_meteo_nc.f90 sourcefile~uemep_read_receptor_data.f90 uEMEP_read_receptor_data.f90 sourcefile~uemep_main.f90->sourcefile~uemep_read_receptor_data.f90 sourcefile~uemep_read_roadlink_data_ascii.f90 uEMEP_read_roadlink_data_ascii.f90 sourcefile~uemep_main.f90->sourcefile~uemep_read_roadlink_data_ascii.f90 sourcefile~uemep_read_rwc_heating_data.f90 uEMEP_read_RWC_heating_data.f90 sourcefile~uemep_main.f90->sourcefile~uemep_read_rwc_heating_data.f90 sourcefile~uemep_read_shipping_asi_data.f90 uEMEP_read_shipping_asi_data.f90 sourcefile~uemep_main.f90->sourcefile~uemep_read_shipping_asi_data.f90 sourcefile~uemep_read_ssb_data.f90 uEMEP_read_SSB_data.f90 sourcefile~uemep_main.f90->sourcefile~uemep_read_ssb_data.f90 sourcefile~uemep_save_emission_netcdf.f90 uEMEP_save_emission_netcdf.f90 sourcefile~uemep_main.f90->sourcefile~uemep_save_emission_netcdf.f90 sourcefile~uemep_set_subgrids.f90 uEMEP_set_subgrids.f90 sourcefile~uemep_main.f90->sourcefile~uemep_set_subgrids.f90 sourcefile~uemep_subgrid_emep.f90 uEMEP_subgrid_EMEP.f90 sourcefile~uemep_main.f90->sourcefile~uemep_subgrid_emep.f90 sourcefile~uemep_subgrid_emission_emep.f90 uEMEP_subgrid_emission_EMEP.f90 sourcefile~uemep_main.f90->sourcefile~uemep_subgrid_emission_emep.f90 sourcefile~uemep_tiling_routines.f90 uEMEP_tiling_routines.f90 sourcefile~uemep_main.f90->sourcefile~uemep_tiling_routines.f90 sourcefile~uemep_read_emep.f90->sourcefile~lambert_projection.f90 sourcefile~uemep_read_industry_data.f90->sourcefile~lambert_projection.f90 sourcefile~uemep_read_landuse_rivm_data.f90->sourcefile~lambert_projection.f90 sourcefile~uemep_read_landuse_rivm_data.f90->sourcefile~uemep_crossreference_grids.f90 sourcefile~uemep_read_meteo_nc.f90->sourcefile~lambert_projection.f90 sourcefile~uemep_read_receptor_data.f90->sourcefile~lambert_projection.f90 sourcefile~uemep_read_roadlink_data_ascii.f90->sourcefile~lambert_projection.f90 sourcefile~uemep_read_rwc_heating_data.f90->sourcefile~lambert_projection.f90 sourcefile~uemep_read_shipping_asi_data.f90->sourcefile~lambert_projection.f90 sourcefile~uemep_read_ssb_data.f90->sourcefile~lambert_projection.f90 sourcefile~uemep_save_emission_netcdf.f90->sourcefile~lambert_projection.f90 sourcefile~uemep_save_emission_netcdf.f90->sourcefile~uemep_read_agriculture_rivm_data.f90 sourcefile~uemep_save_emission_netcdf.f90->sourcefile~uemep_grid_roads.f90 sourcefile~uemep_save_emission_netcdf.f90->sourcefile~uemep_read_industry_data.f90 sourcefile~uemep_save_emission_netcdf.f90->sourcefile~uemep_read_meteo_nc.f90 sourcefile~uemep_save_emission_netcdf.f90->sourcefile~uemep_read_roadlink_data_ascii.f90 sourcefile~uemep_save_emission_netcdf.f90->sourcefile~uemep_read_rwc_heating_data.f90 sourcefile~uemep_save_emission_netcdf.f90->sourcefile~uemep_read_shipping_asi_data.f90 sourcefile~uemep_set_subgrids.f90->sourcefile~lambert_projection.f90 sourcefile~uemep_subgrid_emep.f90->sourcefile~lambert_projection.f90 sourcefile~uemep_subgrid_emission_emep.f90->sourcefile~lambert_projection.f90 sourcefile~uemep_tiling_routines.f90->sourcefile~lambert_projection.f90

Source Code

module mod_rdm2ll

    implicit none
    private

    public :: RDM2LL

contains

    subroutine RDM2LL(y,x,lat,lon)

        implicit none
        real x,y,lat,lon
        real referenceRdX,referenceRdY,referenceWgs84X,referenceWgs84Y
        real dX,dY
        real sumN,sumE

        !SOURCE:   https://www.roelvanlisdonk.nl/2012/11/21/simple-way-for-converting-rijksdriehoek-coordinates-to-lat-and-long-wgs84-in-c/
        !referentie coordinated RDM

        referenceRdX = 155000
        referenceRdY = 463000

        !The city "Amsterfoort" is used as reference "WGS84" coordinate.
        referenceWgs84X = 52.15517
        referenceWgs84Y = 5.387206

        dX = (x - referenceRdX) * 10**(-5.0)
        dY = (y - referenceRdY) * 10**(-5.0)
        sumN = (3235.65389 * dY) + (-32.58297 * (dX**2)) + (-0.2475 * (dY**2)) + (-0.84978 * (dX**2) * dY) + (-0.0655 * (dY**3)) + (-0.01709 * (dX**2) * (dY**2)) + (-0.00738 * dX) + (0.0053 * (dX**4)) + (-0.00039 * (dX**2) * (dY**3)) + (0.00033 * (dX**4) * dY) + (-0.00012 * dX * dY)

        sumE = (5260.52916 * dX) + (105.94684 * dX * dY) + (2.45656 * dX * (dY**2)) + (-0.81885 * (dX**3)) + (0.05594 * dX * (dY**3)) + (-0.05607 * (dX**3) * dY) + (0.01199 * dY) + (-0.00256 *(dX**3) * (dY**2)) + (0.00128 * dX * (dY**4)) + (0.00022 * (dY**2)) + (-0.00022 *(dX**2)) + (0.00026 * (dX**5))

        lat = referenceWgs84X + (sumN / 3600.)
        lon = referenceWgs84Y + (sumE / 3600.)

    end subroutine RDM2LL

end module mod_rdm2ll