RDM2LL Subroutine

public subroutine RDM2LL(y, x, lat, lon)

Arguments

Type IntentOptional Attributes Name
real :: y
real :: x
real :: lat
real :: lon

Called by

proc~~rdm2ll~~CalledByGraph proc~rdm2ll RDM2LL proc~proj2ll PROJ2LL proc~proj2ll->proc~rdm2ll proc~uemep_read_agriculture_rivm_data uEMEP_read_agriculture_rivm_data proc~uemep_read_agriculture_rivm_data->proc~rdm2ll proc~read_country_bounding_box_data read_country_bounding_box_data proc~read_country_bounding_box_data->proc~proj2ll proc~uemep_calculate_emissions_for_emep uEMEP_calculate_emissions_for_EMEP proc~uemep_calculate_emissions_for_emep->proc~uemep_read_agriculture_rivm_data proc~uemep_grid_roads uEMEP_grid_roads proc~uemep_calculate_emissions_for_emep->proc~uemep_grid_roads proc~uemep_read_meteo_nc uEMEP_read_meteo_nc proc~uemep_calculate_emissions_for_emep->proc~uemep_read_meteo_nc proc~uemep_read_monthly_and_daily_shipping_asi_data uEMEP_read_monthly_and_daily_shipping_asi_data proc~uemep_calculate_emissions_for_emep->proc~uemep_read_monthly_and_daily_shipping_asi_data proc~uemep_read_roadlink_data_ascii uEMEP_read_roadlink_data_ascii proc~uemep_calculate_emissions_for_emep->proc~uemep_read_roadlink_data_ascii proc~uemep_read_weekly_shipping_asi_data uEMEP_read_weekly_shipping_asi_data proc~uemep_calculate_emissions_for_emep->proc~uemep_read_weekly_shipping_asi_data 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->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->proc~proj2ll 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->proc~proj2ll 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 program~uemep uEMEP program~uemep->proc~uemep_read_agriculture_rivm_data program~uemep->proc~read_country_bounding_box_data program~uemep->proc~uemep_calculate_emissions_for_emep 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

Source Code

    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