uEMEP Program

Uses

  • program~~uemep~~UsesGraph program~uemep uEMEP module~auto_subgrid auto_subgrid program~uemep->module~auto_subgrid module~calculate_exposure calculate_exposure program~uemep->module~calculate_exposure module~chemistry_no2 chemistry_no2 program~uemep->module~chemistry_no2 module~crossreference_grids crossreference_grids program~uemep->module~crossreference_grids module~define_subgrid define_subgrid program~uemep->module~define_subgrid module~grid_roads grid_roads program~uemep->module~grid_roads module~read_agriculture_asi_data read_agriculture_asi_data program~uemep->module~read_agriculture_asi_data module~read_command_line read_command_line program~uemep->module~read_command_line module~read_config read_config program~uemep->module~read_config module~read_emep read_emep program~uemep->module~read_emep module~read_industry_data read_industry_data program~uemep->module~read_industry_data module~read_landuse_rivm_data read_landuse_rivm_data program~uemep->module~read_landuse_rivm_data module~read_meteo_nc read_meteo_nc program~uemep->module~read_meteo_nc module~read_receptor_data read_receptor_data program~uemep->module~read_receptor_data module~read_roadlink_data_ascii read_roadlink_data_ascii program~uemep->module~read_roadlink_data_ascii module~read_rwc_heating_data read_rwc_heating_data program~uemep->module~read_rwc_heating_data module~read_shipping_asi_data read_shipping_asi_data program~uemep->module~read_shipping_asi_data module~read_ssb_data read_ssb_data program~uemep->module~read_ssb_data module~read_time_profiles read_time_profiles program~uemep->module~read_time_profiles module~redistribute_data redistribute_data program~uemep->module~redistribute_data module~save_emission_netcdf save_emission_netcdf program~uemep->module~save_emission_netcdf module~save_netcdf_file save_netcdf_file program~uemep->module~save_netcdf_file module~set_constants set_constants program~uemep->module~set_constants module~set_emission_factors set_emission_factors program~uemep->module~set_emission_factors module~set_filenames set_filenames program~uemep->module~set_filenames module~set_subgrids set_subgrids program~uemep->module~set_subgrids module~subgrid_deposition subgrid_deposition program~uemep->module~subgrid_deposition module~subgrid_deposition_emep subgrid_deposition_emep program~uemep->module~subgrid_deposition_emep module~subgrid_dispersion subgrid_dispersion program~uemep->module~subgrid_dispersion module~subgrid_emep subgrid_emep program~uemep->module~subgrid_emep module~subgrid_emission_emep subgrid_emission_emep program~uemep->module~subgrid_emission_emep module~subgrid_meteo_emep subgrid_meteo_emep program~uemep->module~subgrid_meteo_emep module~tiling_routines tiling_routines program~uemep->module~tiling_routines module~uemep_configuration uemep_configuration program~uemep->module~uemep_configuration module~uemep_definitions uEMEP_definitions program~uemep->module~uemep_definitions module~uemep_logger uemep_logger program~uemep->module~uemep_logger module~auto_subgrid->module~uemep_configuration module~auto_subgrid->module~uemep_definitions module~mod_area_interpolation mod_area_interpolation module~auto_subgrid->module~mod_area_interpolation module~mod_lambert_projection mod_lambert_projection module~auto_subgrid->module~mod_lambert_projection netcdf netcdf module~auto_subgrid->netcdf module~calculate_exposure->module~uemep_configuration module~calculate_exposure->module~uemep_definitions module~chemistry_no2->module~uemep_configuration module~chemistry_no2->module~uemep_definitions module~time_functions time_functions module~chemistry_no2->module~time_functions module~uemep_constants uemep_constants module~chemistry_no2->module~uemep_constants module~crossreference_grids->module~uemep_configuration module~crossreference_grids->module~uemep_definitions module~crossreference_grids->module~mod_lambert_projection module~define_subgrid->module~uemep_configuration module~define_subgrid->module~mod_lambert_projection module~define_subgrid->module~uemep_constants module~grid_roads->module~uemep_configuration module~grid_roads->module~mod_lambert_projection module~read_agriculture_asi_data->module~uemep_configuration module~read_agriculture_asi_data->module~mod_area_interpolation module~read_agriculture_asi_data->module~mod_lambert_projection module~read_command_line->module~uemep_configuration module~read_command_line->module~uemep_definitions module~read_command_line->module~uemep_logger module~read_config->module~uemep_configuration module~read_config->module~uemep_definitions module~io_functions io_functions module~read_config->module~io_functions module~read_namefile_routines read_namefile_routines module~read_config->module~read_namefile_routines module~read_config->module~time_functions module~read_emep->module~uemep_configuration module~kz_functions kz_functions module~read_emep->module~kz_functions module~read_emep->module~mod_lambert_projection module~read_emep->module~time_functions module~read_industry_data->module~uemep_configuration module~read_industry_data->module~mod_lambert_projection module~utility_functions utility_functions module~read_industry_data->module~utility_functions module~read_landuse_rivm_data->module~crossreference_grids module~read_landuse_rivm_data->module~uemep_configuration module~read_landuse_rivm_data->module~uemep_definitions module~read_landuse_rivm_data->module~mod_lambert_projection module~mod_read_esri_ascii_file mod_read_esri_ascii_file module~read_landuse_rivm_data->module~mod_read_esri_ascii_file module~read_meteo_nc->module~read_config module~read_meteo_nc->module~uemep_configuration module~read_meteo_nc->module~uemep_definitions module~read_meteo_nc->module~mod_lambert_projection module~read_meteo_nc->module~time_functions module~read_meteo_nc->netcdf module~read_receptor_data->module~uemep_configuration module~read_receptor_data->module~mod_lambert_projection module~read_receptor_data->module~utility_functions module~read_roadlink_data_ascii->module~uemep_configuration module~read_roadlink_data_ascii->module~mod_lambert_projection module~read_roadlink_data_ascii->module~time_functions module~read_roadlink_data_ascii->module~utility_functions module~read_rwc_heating_data->module~uemep_configuration module~read_rwc_heating_data->module~mod_lambert_projection module~read_rwc_heating_data->module~utility_functions module~read_shipping_asi_data->module~uemep_configuration module~read_shipping_asi_data->module~mod_area_interpolation module~read_shipping_asi_data->module~mod_lambert_projection module~read_shipping_asi_data->module~time_functions module~read_shipping_asi_data->module~utility_functions module~read_ssb_data->module~uemep_configuration module~read_ssb_data->module~mod_area_interpolation module~read_ssb_data->module~mod_lambert_projection module~read_ssb_data->module~utility_functions module~read_time_profiles->module~uemep_configuration module~read_time_profiles->module~time_functions module~redistribute_data->module~save_netcdf_file module~redistribute_data->module~uemep_configuration module~save_emission_netcdf->module~grid_roads module~save_emission_netcdf->module~read_agriculture_asi_data module~save_emission_netcdf->module~read_industry_data module~save_emission_netcdf->module~read_meteo_nc module~save_emission_netcdf->module~read_roadlink_data_ascii module~save_emission_netcdf->module~read_rwc_heating_data module~save_emission_netcdf->module~read_shipping_asi_data module~save_emission_netcdf->module~read_time_profiles module~save_emission_netcdf->module~save_netcdf_file module~save_emission_netcdf->module~set_emission_factors module~save_emission_netcdf->module~uemep_configuration module~save_emission_netcdf->module~uemep_definitions module~save_emission_netcdf->module~io_functions module~save_emission_netcdf->module~mod_lambert_projection module~save_emission_netcdf->module~time_functions module~save_netcdf_file->module~chemistry_no2 module~save_netcdf_file->module~uemep_configuration module~save_netcdf_file->module~mod_area_interpolation module~save_netcdf_file->module~mod_read_esri_ascii_file module~set_constants->module~uemep_configuration module~set_emission_factors->module~uemep_configuration module~set_filenames->module~uemep_configuration module~set_filenames->module~uemep_definitions module~set_subgrids->module~uemep_configuration module~set_subgrids->module~uemep_definitions module~set_subgrids->module~mod_lambert_projection module~set_subgrids->module~utility_functions module~subgrid_deposition->module~uemep_configuration module~dispersion_functions dispersion_functions module~subgrid_deposition->module~dispersion_functions module~subgrid_deposition->module~kz_functions module~local_trajectory local_trajectory module~subgrid_deposition->module~local_trajectory module~subgrid_deposition->module~mod_area_interpolation module~mod_rargsort mod_rargsort module~subgrid_deposition->module~mod_rargsort module~set_dispersion_parameters set_dispersion_parameters module~subgrid_deposition->module~set_dispersion_parameters module~subgrid_deposition_emep->module~uemep_configuration module~subgrid_deposition_emep->module~mod_area_interpolation module~subgrid_dispersion->module~uemep_configuration module~subgrid_dispersion->module~dispersion_functions module~subgrid_dispersion->module~kz_functions module~subgrid_dispersion->module~local_trajectory module~subgrid_dispersion->module~mod_area_interpolation module~subgrid_dispersion->module~set_dispersion_parameters module~subgrid_emep->module~uemep_configuration module~subgrid_emep->module~uemep_definitions module~subgrid_emep->module~mod_lambert_projection module~subgrid_emep->module~uemep_constants module~subgrid_emission_emep->module~uemep_configuration module~subgrid_emission_emep->module~mod_lambert_projection module~subgrid_meteo_emep->module~uemep_configuration module~subgrid_meteo_emep->module~uemep_definitions module~subgrid_meteo_emep->module~uemep_constants module~tiling_routines->module~uemep_configuration module~tiling_routines->module~mod_lambert_projection module~uemep_configuration->module~uemep_definitions module~uemep_configuration->module~uemep_logger module~uemep_configuration->module~uemep_constants module~io_functions->module~uemep_definitions module~kz_functions->module~uemep_constants module~local_trajectory->module~uemep_constants module~local_trajectory->module~utility_functions module~mod_lambert_projection->module~uemep_definitions module~mod_lambert_projection->module~uemep_constants module~mod_lambert_projection->module~utility_functions module~mod_rdm2ll mod_rdm2ll module~mod_lambert_projection->module~mod_rdm2ll module~mod_read_esri_ascii_file->module~uemep_definitions module~read_namefile_routines->module~uemep_constants module~set_dispersion_parameters->module~uemep_configuration module~time_functions->module~uemep_constants module~utility_functions->module~uemep_constants

uEMEP

Bruce rolstad Denby (brucerd@met.no) MET Norway


Reminder note for compilation on Intel To add this library to your linker input in the IDE, open the context menu for the project node, choose Properties, then in the Project Properties dialog box, choose Linker , and edit the Linker Input to add legacy_stdio_definitions.lib to the semi-colon-separated list Tools/options/intel compilers and tools/visual fortran/compilers and add bin, include and lib, e.g. C:\Program Files (x86)\netcdf 4.3.3.1\bin; Control programme for running the downscaling routine uEMEP



To link to netcdf in visual studio Tools - options - Intel compilers - VisusalFortran - Compilers - Libraries/includes/executables C:\Program Files (x86)\netcdf 4.3.3.1\include C:\Program Files (x86)\netcdf 4.3.3.1\bin C:\Program Files (x86)\netcdf 4.3.3.1\lib


Calls

program~~uemep~~CallsGraph program~uemep uEMEP proc~check_command_line check_command_line program~uemep->proc~check_command_line proc~correct_annual_mean_chemistry correct_annual_mean_chemistry program~uemep->proc~correct_annual_mean_chemistry proc~read_country_bounding_box_data read_country_bounding_box_data program~uemep->proc~read_country_bounding_box_data proc~uemep_calculate_deposition uEMEP_calculate_deposition program~uemep->proc~uemep_calculate_deposition proc~uemep_calculate_emissions_for_emep uEMEP_calculate_emissions_for_EMEP program~uemep->proc~uemep_calculate_emissions_for_emep proc~uemep_calculate_exposure uEMEP_calculate_exposure program~uemep->proc~uemep_calculate_exposure proc~uemep_change_road_data uEMEP_change_road_data program~uemep->proc~uemep_change_road_data proc~uemep_chemistry uEMEP_chemistry program~uemep->proc~uemep_chemistry proc~uemep_combine_local_source uEMEP_combine_local_source program~uemep->proc~uemep_combine_local_source proc~uemep_convert_proxy_to_emissions uEMEP_convert_proxy_to_emissions program~uemep->proc~uemep_convert_proxy_to_emissions proc~uemep_crossreference_grids uEMEP_crossreference_grids program~uemep->proc~uemep_crossreference_grids proc~uemep_define_subgrid uEMEP_define_subgrid program~uemep->proc~uemep_define_subgrid proc~uemep_define_subgrid_extent uEMEP_define_subgrid_extent program~uemep->proc~uemep_define_subgrid_extent proc~uemep_disperse_local_source uEMEP_disperse_local_source program~uemep->proc~uemep_disperse_local_source proc~uemep_grid_receptor_data uEMEP_grid_receptor_data program~uemep->proc~uemep_grid_receptor_data proc~uemep_grid_roads uEMEP_grid_roads program~uemep->proc~uemep_grid_roads proc~uemep_nox_emission_temperature uEMEP_nox_emission_temperature program~uemep->proc~uemep_nox_emission_temperature proc~uemep_preaggregate_shipping_asi_data uEMEP_preaggregate_shipping_asi_data program~uemep->proc~uemep_preaggregate_shipping_asi_data proc~uemep_read_agriculture_rivm_data uEMEP_read_agriculture_rivm_data program~uemep->proc~uemep_read_agriculture_rivm_data proc~uemep_read_command_line uEMEP_read_command_line program~uemep->proc~uemep_read_command_line proc~uemep_read_config uEMEP_read_config program~uemep->proc~uemep_read_config proc~uemep_read_emep uEMEP_read_EMEP program~uemep->proc~uemep_read_emep proc~uemep_read_emission_rivm_data uEMEP_read_emission_rivm_data program~uemep->proc~uemep_read_emission_rivm_data proc~uemep_read_industry_data uEMEP_read_industry_data program~uemep->proc~uemep_read_industry_data proc~uemep_read_landuse_rivm_data uEMEP_read_landuse_rivm_data program~uemep->proc~uemep_read_landuse_rivm_data proc~uemep_read_meteo_nc uEMEP_read_meteo_nc program~uemep->proc~uemep_read_meteo_nc proc~uemep_read_monthly_and_daily_shipping_asi_data uEMEP_read_monthly_and_daily_shipping_asi_data program~uemep->proc~uemep_read_monthly_and_daily_shipping_asi_data proc~uemep_read_netcdf_landuse_latlon uEMEP_read_netcdf_landuse_latlon program~uemep->proc~uemep_read_netcdf_landuse_latlon proc~uemep_read_netcdf_population uEMEP_read_netcdf_population program~uemep->proc~uemep_read_netcdf_population proc~uemep_read_netcdf_population_latlon uEMEP_read_netcdf_population_latlon program~uemep->proc~uemep_read_netcdf_population_latlon proc~uemep_read_netcdf_shipping_latlon uEMEP_read_netcdf_shipping_latlon program~uemep->proc~uemep_read_netcdf_shipping_latlon proc~uemep_read_receptor_data uEMEP_read_receptor_data program~uemep->proc~uemep_read_receptor_data proc~uemep_read_roadlink_data_ascii uEMEP_read_roadlink_data_ascii program~uemep->proc~uemep_read_roadlink_data_ascii proc~uemep_read_roadlink_emission_data uEMEP_read_roadlink_emission_data program~uemep->proc~uemep_read_roadlink_emission_data proc~uemep_read_rwc_heating_data uEMEP_read_RWC_heating_data program~uemep->proc~uemep_read_rwc_heating_data proc~uemep_read_shipping_asi_data uEMEP_read_shipping_asi_data program~uemep->proc~uemep_read_shipping_asi_data proc~uemep_read_ssb_data uEMEP_read_SSB_data program~uemep->proc~uemep_read_ssb_data proc~uemep_read_time_profiles uEMEP_read_time_profiles program~uemep->proc~uemep_read_time_profiles proc~uemep_read_weekly_shipping_asi_data uEMEP_read_weekly_shipping_asi_data program~uemep->proc~uemep_read_weekly_shipping_asi_data proc~uemep_redistribute_local_source uEMEP_redistribute_local_source program~uemep->proc~uemep_redistribute_local_source proc~uemep_region_mask_new uEMEP_region_mask_new program~uemep->proc~uemep_region_mask_new proc~uemep_reset_constants uEMEP_reset_constants program~uemep->proc~uemep_reset_constants proc~uemep_save_netcdf_control uEMEP_save_netcdf_control program~uemep->proc~uemep_save_netcdf_control proc~uemep_set_constants uEMEP_set_constants program~uemep->proc~uemep_set_constants proc~uemep_set_deposition_velocities uEMEP_set_deposition_velocities program~uemep->proc~uemep_set_deposition_velocities proc~uemep_set_emission_factors uEMEP_set_emission_factors program~uemep->proc~uemep_set_emission_factors proc~uemep_set_filenames uEMEP_set_filenames program~uemep->proc~uemep_set_filenames proc~uemep_set_landuse_classes uEMEP_set_landuse_classes program~uemep->proc~uemep_set_landuse_classes proc~uemep_set_loop_receptor_grid uEMEP_set_loop_receptor_grid program~uemep->proc~uemep_set_loop_receptor_grid proc~uemep_set_pollutant_loop uEMEP_set_pollutant_loop program~uemep->proc~uemep_set_pollutant_loop proc~uemep_set_region_tile_grids uEMEP_set_region_tile_grids program~uemep->proc~uemep_set_region_tile_grids proc~uemep_set_species_loop uEMEP_set_species_loop program~uemep->proc~uemep_set_species_loop proc~uemep_set_subgrid_select_latlon_centre uEMEP_set_subgrid_select_latlon_centre program~uemep->proc~uemep_set_subgrid_select_latlon_centre proc~uemep_set_subgrids uEMEP_set_subgrids program~uemep->proc~uemep_set_subgrids proc~uemep_set_tile_grids uEMEP_set_tile_grids program~uemep->proc~uemep_set_tile_grids proc~uemep_subgrid_deposition uEMEP_subgrid_deposition program~uemep->proc~uemep_subgrid_deposition proc~uemep_subgrid_deposition_emep uEMEP_subgrid_deposition_EMEP program~uemep->proc~uemep_subgrid_deposition_emep proc~uemep_subgrid_dispersion uEMEP_subgrid_dispersion program~uemep->proc~uemep_subgrid_dispersion proc~uemep_subgrid_emep uEMEP_subgrid_EMEP program~uemep->proc~uemep_subgrid_emep proc~uemep_subgrid_emep_from_in_region uEMEP_subgrid_EMEP_from_in_region program~uemep->proc~uemep_subgrid_emep_from_in_region proc~uemep_subgrid_emission_emep uEMEP_subgrid_emission_EMEP program~uemep->proc~uemep_subgrid_emission_emep proc~uemep_subgrid_meteo_emep uEMEP_subgrid_meteo_EMEP program~uemep->proc~uemep_subgrid_meteo_emep proc~print_help_page print_help_page proc~check_command_line->proc~print_help_page proc~print_version print_version proc~check_command_line->proc~print_version proc~uemep_annual_mean_pdf_correction_no2_o3 uEMEP_annual_mean_pdf_correction_NO2_O3 proc~correct_annual_mean_chemistry->proc~uemep_annual_mean_pdf_correction_no2_o3 proc~ll2laea LL2LAEA proc~read_country_bounding_box_data->proc~ll2laea proc~ll2ltm ll2ltm proc~read_country_bounding_box_data->proc~ll2ltm proc~ll2utm ll2utm proc~read_country_bounding_box_data->proc~ll2utm proc~proj2ll PROJ2LL proc~read_country_bounding_box_data->proc~proj2ll proc~uemep_calculate_emissions_for_emep->proc~uemep_convert_proxy_to_emissions proc~uemep_calculate_emissions_for_emep->proc~uemep_grid_roads proc~uemep_calculate_emissions_for_emep->proc~uemep_nox_emission_temperature proc~uemep_calculate_emissions_for_emep->proc~uemep_read_agriculture_rivm_data proc~uemep_calculate_emissions_for_emep->proc~uemep_read_industry_data 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_roadlink_emission_data proc~uemep_calculate_emissions_for_emep->proc~uemep_read_rwc_heating_data proc~uemep_calculate_emissions_for_emep->proc~uemep_read_shipping_asi_data proc~uemep_calculate_emissions_for_emep->proc~uemep_read_time_profiles proc~uemep_calculate_emissions_for_emep->proc~uemep_read_weekly_shipping_asi_data proc~uemep_calculate_emissions_for_emep->proc~uemep_set_emission_factors proc~date_to_datestr date_to_datestr proc~uemep_calculate_emissions_for_emep->proc~date_to_datestr proc~date_to_number date_to_number proc~uemep_calculate_emissions_for_emep->proc~date_to_number proc~datestr_to_date datestr_to_date proc~uemep_calculate_emissions_for_emep->proc~datestr_to_date proc~lambert2lb2_uemep lambert2lb2_uEMEP proc~uemep_calculate_emissions_for_emep->proc~lambert2lb2_uemep proc~number_to_date number_to_date proc~uemep_calculate_emissions_for_emep->proc~number_to_date proc~uemep_save_emission_netcdf uEMEP_save_emission_netcdf proc~uemep_calculate_emissions_for_emep->proc~uemep_save_emission_netcdf proc~uemep_during_no2 uEMEP_During_NO2 proc~uemep_chemistry->proc~uemep_during_no2 proc~uemep_nonlocal_no2_o3 uEMEP_nonlocal_NO2_O3 proc~uemep_chemistry->proc~uemep_nonlocal_no2_o3 proc~uemep_photostationary_no2 uEMEP_photostationary_NO2 proc~uemep_chemistry->proc~uemep_photostationary_no2 proc~uemep_phototimescale_no2 uEMEP_phototimescale_NO2 proc~uemep_chemistry->proc~uemep_phototimescale_no2 proc~uemep_romberg_no2 uEMEP_Romberg_NO2 proc~uemep_chemistry->proc~uemep_romberg_no2 proc~uemep_srm_no2 uEMEP_SRM_NO2 proc~uemep_chemistry->proc~uemep_srm_no2 proc~mean_mask mean_mask proc~uemep_combine_local_source->proc~mean_mask proc~lb2lambert2_uemep lb2lambert2_uEMEP proc~uemep_crossreference_grids->proc~lb2lambert2_uemep proc~ll2ps_spherical LL2PS_spherical proc~uemep_crossreference_grids->proc~ll2ps_spherical proc~uemep_define_subgrid->proc~lb2lambert2_uemep proc~uemep_define_subgrid->proc~ll2ps_spherical proc~uemep_define_subgrid->proc~proj2ll proc~uemep_define_subgrid_extent->proc~proj2ll proc~uemep_grid_roads->proc~lb2lambert2_uemep proc~line_fraction_in_grid_func line_fraction_in_grid_func proc~uemep_grid_roads->proc~line_fraction_in_grid_func proc~uemep_grid_roads->proc~ll2ps_spherical proc~uemep_grid_roads->proc~proj2ll proc~sigma0_traffic_func sigma0_traffic_func proc~uemep_grid_roads->proc~sigma0_traffic_func proc~tunnel_deposition_factor tunnel_deposition_factor proc~uemep_grid_roads->proc~tunnel_deposition_factor proc~uemep_preaggregate_shipping_asi_data->proc~ll2laea proc~uemep_preaggregate_shipping_asi_data->proc~ll2ltm proc~uemep_preaggregate_shipping_asi_data->proc~ll2utm proc~uemep_preaggregate_shipping_asi_data->proc~proj2ll proc~utm2ll utm2ll proc~uemep_preaggregate_shipping_asi_data->proc~utm2ll proc~area_weighted_extended_interpolation_function area_weighted_extended_interpolation_function proc~uemep_read_agriculture_rivm_data->proc~area_weighted_extended_interpolation_function proc~uemep_read_agriculture_rivm_data->proc~lb2lambert2_uemep proc~uemep_read_agriculture_rivm_data->proc~ll2ps_spherical proc~rdm2ll RDM2LL proc~uemep_read_agriculture_rivm_data->proc~rdm2ll proc~check_dir_exist check_dir_exist proc~uemep_read_config->proc~check_dir_exist proc~uemep_read_config->proc~date_to_datestr proc~date_to_datestr_bracket date_to_datestr_bracket proc~uemep_read_config->proc~date_to_datestr_bracket proc~date_to_datestr_squarebracket date_to_datestr_squarebracket proc~uemep_read_config->proc~date_to_datestr_squarebracket proc~uemep_read_config->proc~date_to_number proc~uemep_read_config->proc~datestr_to_date proc~uemep_read_config->proc~number_to_date proc~read_name_char read_name_char proc~uemep_read_config->proc~read_name_char proc~read_name_double read_name_double proc~uemep_read_config->proc~read_name_double proc~read_name_integer read_name_integer proc~uemep_read_config->proc~read_name_integer proc~read_name_logical read_name_logical proc~uemep_read_config->proc~read_name_logical proc~read_name_real read_name_real proc~uemep_read_config->proc~read_name_real proc~replace_string_char replace_string_char proc~uemep_read_config->proc~replace_string_char nf90_close nf90_close proc~uemep_read_emep->nf90_close nf90_get_att nf90_get_att proc~uemep_read_emep->nf90_get_att nf90_get_var nf90_get_var proc~uemep_read_emep->nf90_get_var nf90_inq_dimid nf90_inq_dimid proc~uemep_read_emep->nf90_inq_dimid nf90_inq_varid nf90_inq_varid proc~uemep_read_emep->nf90_inq_varid nf90_inquire_dimension nf90_inquire_dimension proc~uemep_read_emep->nf90_inquire_dimension nf90_inquire_variable nf90_inquire_variable proc~uemep_read_emep->nf90_inquire_variable nf90_open nf90_open proc~uemep_read_emep->nf90_open proc~uemep_read_emep->proc~date_to_number proc~uemep_read_emep->proc~lb2lambert2_uemep proc~uemep_read_emep->proc~ll2ps_spherical proc~uemep_read_emep->proc~number_to_date proc~uemep_read_emep->proc~proj2ll proc~troenkz_invl_from_phi TROENKz_invL_from_phi proc~uemep_read_emep->proc~troenkz_invl_from_phi proc~uemep_read_industry_data->proc~lb2lambert2_uemep proc~uemep_read_industry_data->proc~ll2laea proc~uemep_read_industry_data->proc~ll2ltm proc~uemep_read_industry_data->proc~ll2ps_spherical proc~uemep_read_industry_data->proc~ll2utm proc~uemep_read_landuse_rivm_data->proc~uemep_crossreference_grids proc~uemep_read_landuse_rivm_data->proc~lb2lambert2_uemep proc~uemep_read_landuse_rivm_data->proc~ll2ps_spherical proc~uemep_read_landuse_rivm_data->proc~proj2ll proc~read_esri_ascii_file read_esri_ascii_file proc~uemep_read_landuse_rivm_data->proc~read_esri_ascii_file proc~read_esri_ascii_header read_esri_ascii_header proc~uemep_read_landuse_rivm_data->proc~read_esri_ascii_header proc~uemep_read_meteo_nc->nf90_close proc~uemep_read_meteo_nc->nf90_get_att proc~uemep_read_meteo_nc->nf90_get_var proc~uemep_read_meteo_nc->nf90_inq_dimid proc~uemep_read_meteo_nc->nf90_inq_varid proc~uemep_read_meteo_nc->nf90_inquire_dimension proc~uemep_read_meteo_nc->nf90_inquire_variable proc~uemep_read_meteo_nc->nf90_open proc~uemep_read_meteo_nc->proc~date_to_datestr_bracket proc~uemep_read_meteo_nc->proc~date_to_number proc~uemep_read_meteo_nc->proc~datestr_to_date proc~uemep_read_meteo_nc->proc~lb2lambert2_uemep proc~uemep_read_meteo_nc->proc~ll2ps_spherical proc~uemep_read_meteo_nc->proc~number_to_date proc~uemep_read_meteo_nc->proc~proj2ll proc~uemep_read_meteo_nc->proc~replace_string_char proc~uemep_read_monthly_and_daily_shipping_asi_data->proc~datestr_to_date proc~uemep_read_monthly_and_daily_shipping_asi_data->proc~lb2lambert2_uemep proc~uemep_read_monthly_and_daily_shipping_asi_data->proc~ll2ps_spherical proc~uemep_read_monthly_and_daily_shipping_asi_data->proc~number_to_date proc~nxtdat nxtdat proc~uemep_read_monthly_and_daily_shipping_asi_data->proc~nxtdat proc~uemep_read_monthly_and_daily_shipping_asi_data->proc~proj2ll proc~uemep_read_netcdf_landuse_latlon->nf90_get_var proc~uemep_read_netcdf_landuse_latlon->nf90_inq_dimid proc~uemep_read_netcdf_landuse_latlon->nf90_inq_varid proc~uemep_read_netcdf_landuse_latlon->nf90_inquire_dimension proc~uemep_read_netcdf_landuse_latlon->nf90_open proc~uemep_read_netcdf_landuse_latlon->proc~proj2ll proc~uemep_read_netcdf_population->nf90_get_att proc~uemep_read_netcdf_population->nf90_get_var proc~uemep_read_netcdf_population->nf90_inq_dimid proc~uemep_read_netcdf_population->nf90_inq_varid proc~uemep_read_netcdf_population->nf90_inquire_dimension proc~uemep_read_netcdf_population->nf90_open proc~uemep_read_netcdf_population->proc~ll2laea proc~uemep_read_netcdf_population->proc~ll2ltm proc~uemep_read_netcdf_population->proc~ll2utm proc~uemep_read_netcdf_population_latlon->nf90_get_var proc~uemep_read_netcdf_population_latlon->nf90_inq_dimid proc~uemep_read_netcdf_population_latlon->nf90_inq_varid proc~uemep_read_netcdf_population_latlon->nf90_inquire_dimension proc~uemep_read_netcdf_population_latlon->nf90_open proc~area_weighted_extended_vectorgrid_interpolation_function area_weighted_extended_vectorgrid_interpolation_function proc~uemep_read_netcdf_population_latlon->proc~area_weighted_extended_vectorgrid_interpolation_function proc~uemep_read_netcdf_population_latlon->proc~proj2ll proc~uemep_read_netcdf_shipping_latlon->nf90_get_var proc~uemep_read_netcdf_shipping_latlon->nf90_inq_dimid proc~uemep_read_netcdf_shipping_latlon->nf90_inq_varid proc~uemep_read_netcdf_shipping_latlon->nf90_inquire_dimension proc~uemep_read_netcdf_shipping_latlon->nf90_open proc~uemep_read_netcdf_shipping_latlon->proc~area_weighted_extended_vectorgrid_interpolation_function proc~uemep_read_netcdf_shipping_latlon->proc~proj2ll proc~uemep_read_receptor_data->proc~ll2laea proc~uemep_read_receptor_data->proc~ll2ltm proc~uemep_read_receptor_data->proc~ll2utm proc~uemep_read_roadlink_data_ascii->proc~lb2lambert2_uemep proc~uemep_read_roadlink_data_ascii->proc~ll2laea proc~uemep_read_roadlink_data_ascii->proc~ll2ltm proc~uemep_read_roadlink_data_ascii->proc~ll2ps_spherical proc~uemep_read_roadlink_data_ascii->proc~ll2utm proc~uemep_read_roadlink_data_ascii->proc~nxtdat proc~uemep_read_roadlink_data_ascii->proc~proj2ll proc~uemep_read_roadlink_emission_data->proc~date_to_number proc~uemep_read_roadlink_emission_data->proc~datestr_to_date proc~uemep_read_roadlink_emission_data->proc~number_to_date proc~uemep_read_roadlink_emission_data->proc~nxtdat proc~uemep_read_rwc_heating_data->proc~lb2lambert2_uemep proc~uemep_read_rwc_heating_data->proc~ll2ps_spherical proc~uemep_read_rwc_heating_data->proc~nxtdat proc~uemep_read_rwc_heating_data->proc~utm2ll proc~uemep_read_shipping_asi_data->proc~lb2lambert2_uemep proc~uemep_read_shipping_asi_data->proc~ll2laea proc~uemep_read_shipping_asi_data->proc~ll2ltm proc~uemep_read_shipping_asi_data->proc~ll2ps_spherical proc~uemep_read_shipping_asi_data->proc~ll2utm proc~day_of_week day_of_week proc~uemep_read_time_profiles->proc~day_of_week proc~uemep_read_time_profiles->proc~number_to_date proc~summer_time_europe summer_time_europe proc~uemep_read_time_profiles->proc~summer_time_europe proc~uemep_read_weekly_shipping_asi_data->proc~date_to_number proc~uemep_read_weekly_shipping_asi_data->proc~datestr_to_date proc~uemep_read_weekly_shipping_asi_data->proc~lb2lambert2_uemep proc~uemep_read_weekly_shipping_asi_data->proc~ll2ps_spherical proc~uemep_read_weekly_shipping_asi_data->proc~nxtdat proc~uemep_read_weekly_shipping_asi_data->proc~proj2ll proc~uemep_region_mask_new->nf90_close proc~uemep_region_mask_new->nf90_get_att proc~uemep_region_mask_new->nf90_get_var proc~uemep_region_mask_new->nf90_inq_dimid proc~uemep_region_mask_new->nf90_inq_varid proc~uemep_region_mask_new->nf90_inquire_dimension proc~uemep_region_mask_new->nf90_inquire_variable proc~uemep_region_mask_new->nf90_open proc~ll2proj LL2PROJ proc~uemep_region_mask_new->proc~ll2proj proc~uemep_region_mask_new->proc~proj2ll proc~direction DIRECTION proc~uemep_save_netcdf_control->proc~direction proc~uemep_save_netcdf_control->proc~mean_mask proc~uemep_save_netcdf_file uEMEP_save_netcdf_file proc~uemep_save_netcdf_control->proc~uemep_save_netcdf_file proc~uemep_save_netcdf_receptor_file uEMEP_save_netcdf_receptor_file proc~uemep_save_netcdf_control->proc~uemep_save_netcdf_receptor_file proc~uemep_source_fraction_chemistry uEMEP_source_fraction_chemistry proc~uemep_save_netcdf_control->proc~uemep_source_fraction_chemistry proc~write_esri_ascii_file write_esri_ascii_file proc~uemep_save_netcdf_control->proc~write_esri_ascii_file proc~uemep_set_region_tile_grids->proc~proj2ll proc~uemep_set_subgrid_select_latlon_centre->proc~ll2laea proc~uemep_set_subgrid_select_latlon_centre->proc~ll2ltm proc~uemep_set_subgrid_select_latlon_centre->proc~ll2utm proc~uemep_set_tile_grids->proc~proj2ll proc~uemep_subgrid_deposition->proc~area_weighted_extended_interpolation_function proc~area_weighted_interpolation_function area_weighted_interpolation_function proc~uemep_subgrid_deposition->proc~area_weighted_interpolation_function proc~delta_wind_direction delta_wind_direction proc~uemep_subgrid_deposition->proc~delta_wind_direction proc~gauss_plume_cartesian_sigma_func gauss_plume_cartesian_sigma_func proc~uemep_subgrid_deposition->proc~gauss_plume_cartesian_sigma_func proc~gauss_plume_cartesian_sigma_integral_func gauss_plume_cartesian_sigma_integral_func proc~uemep_subgrid_deposition->proc~gauss_plume_cartesian_sigma_integral_func proc~rargsort rargsort proc~uemep_subgrid_deposition->proc~rargsort proc~u_profile_neutral_val_func u_profile_neutral_val_func proc~uemep_subgrid_deposition->proc~u_profile_neutral_val_func proc~uemep_calculate_all_trajectory uEMEP_calculate_all_trajectory proc~uemep_subgrid_deposition->proc~uemep_calculate_all_trajectory proc~uemep_create_wind_field uEMEP_create_wind_field proc~uemep_subgrid_deposition->proc~uemep_create_wind_field proc~uemep_minimum_distance_trajectory_fast uEMEP_minimum_distance_trajectory_fast proc~uemep_subgrid_deposition->proc~uemep_minimum_distance_trajectory_fast proc~uemep_set_dispersion_params_pg uEMEP_set_dispersion_params_PG proc~uemep_subgrid_deposition->proc~uemep_set_dispersion_params_pg proc~uemep_set_dispersion_params_simple uEMEP_set_dispersion_params_simple proc~uemep_subgrid_deposition->proc~uemep_set_dispersion_params_simple proc~uemep_set_dispersion_sigma_kz uEMEP_set_dispersion_sigma_Kz proc~uemep_subgrid_deposition->proc~uemep_set_dispersion_sigma_kz proc~uemep_set_dispersion_sigma_pg uEMEP_set_dispersion_sigma_PG proc~uemep_subgrid_deposition->proc~uemep_set_dispersion_sigma_pg proc~uemep_set_dispersion_sigma_simple uEMEP_set_dispersion_sigma_simple proc~uemep_subgrid_deposition->proc~uemep_set_dispersion_sigma_simple proc~z_centremass_gauss_func z_centremass_gauss_func proc~uemep_subgrid_deposition->proc~z_centremass_gauss_func proc~uemep_subgrid_deposition_emep->proc~area_weighted_extended_interpolation_function proc~uemep_subgrid_dispersion->proc~area_weighted_interpolation_function proc~uemep_subgrid_dispersion->proc~delta_wind_direction proc~uemep_subgrid_dispersion->proc~gauss_plume_cartesian_sigma_func proc~gauss_plume_second_order_rotated_reflected_func gauss_plume_second_order_rotated_reflected_func proc~uemep_subgrid_dispersion->proc~gauss_plume_second_order_rotated_reflected_func proc~gauss_plume_second_order_rotated_reflected_integral_func gauss_plume_second_order_rotated_reflected_integral_func proc~uemep_subgrid_dispersion->proc~gauss_plume_second_order_rotated_reflected_integral_func proc~uemep_subgrid_dispersion->proc~u_profile_neutral_val_func proc~uemep_subgrid_dispersion->proc~uemep_calculate_all_trajectory proc~uemep_subgrid_dispersion->proc~uemep_minimum_distance_trajectory_fast proc~uemep_subgrid_dispersion->proc~uemep_set_dispersion_params_pg proc~uemep_subgrid_dispersion->proc~uemep_set_dispersion_params_simple proc~uemep_subgrid_dispersion->proc~uemep_set_dispersion_sigma_kz proc~uemep_set_dispersion_sigma_kz_emulator uEMEP_set_dispersion_sigma_Kz_emulator proc~uemep_subgrid_dispersion->proc~uemep_set_dispersion_sigma_kz_emulator proc~uemep_subgrid_dispersion->proc~uemep_set_dispersion_sigma_pg proc~uemep_subgrid_dispersion->proc~uemep_set_dispersion_sigma_simple proc~uemep_subgrid_dispersion_integral uEMEP_subgrid_dispersion_integral proc~uemep_subgrid_dispersion->proc~uemep_subgrid_dispersion_integral proc~uemep_subgrid_dispersion->proc~z_centremass_gauss_func amod amod proc~uemep_subgrid_emep->amod proc~uemep_subgrid_emep_from_in_region->proc~ll2proj proc~uemep_subgrid_emission_emep->proc~lb2lambert2_uemep proc~lb2lambert_uemep lb2lambert_uEMEP proc~uemep_subgrid_emission_emep->proc~lb2lambert_uemep proc~uemep_subgrid_emission_emep->proc~ll2ps_spherical proc~date_to_datestr_new date_to_datestr_new proc~date_to_datestr_bracket->proc~date_to_datestr_new proc~date_to_datestr_squarebracket->proc~date_to_datestr_new sngl sngl proc~date_to_number->sngl dcos dcos proc~ll2ltm->dcos dsin dsin proc~ll2ltm->dsin dtan dtan proc~ll2ltm->dtan proc~ll2proj->proc~lb2lambert2_uemep proc~ll2proj->proc~ll2laea proc~ll2proj->proc~ll2ltm proc~ll2proj->proc~ll2ps_spherical proc~ll2proj->proc~ll2utm proc~ll2utm->dcos proc~ll2utm->dsin proc~ll2utm->dtan idint idint proc~number_to_date->idint proc~proj2ll->proc~lambert2lb2_uemep proc~proj2ll->proc~rdm2ll proc~proj2ll->proc~utm2ll proc~laea2ll LAEA2LL proc~proj2ll->proc~laea2ll proc~ltm2ll ltm2ll proc~proj2ll->proc~ltm2ll proc~ps2ll_spherical PS2LL_spherical proc~proj2ll->proc~ps2ll_spherical proc~summer_time_europe->proc~date_to_number cosd cosd proc~uemep_annual_mean_pdf_correction_no2_o3->cosd proc~get_sun_angles get_sun_angles proc~uemep_annual_mean_pdf_correction_no2_o3->proc~get_sun_angles proc~uemep_create_wind_field->proc~u_profile_neutral_val_func proc~uemep_create_wind_field->proc~uemep_set_dispersion_sigma_simple proc~uemep_create_wind_field->proc~z_centremass_gauss_func proc~distrl_sqr distrl_sqr proc~uemep_minimum_distance_trajectory_fast->proc~distrl_sqr clog clog proc~uemep_phototimescale_no2->clog proc~uemep_save_emission_netcdf->proc~check_dir_exist proc~uemep_save_for_emep_netcdf_file uEMEP_save_for_EMEP_netcdf_file proc~uemep_save_emission_netcdf->proc~uemep_save_for_emep_netcdf_file proc~uemep_save_netcdf_file->nf90_close proc~uemep_save_netcdf_file->nf90_inq_dimid proc~uemep_save_netcdf_file->nf90_inq_varid proc~uemep_save_netcdf_file->nf90_inquire_dimension proc~uemep_save_netcdf_file->nf90_open nf90_create nf90_create proc~uemep_save_netcdf_file->nf90_create nf90_def_dim nf90_def_dim proc~uemep_save_netcdf_file->nf90_def_dim nf90_def_var nf90_def_var proc~uemep_save_netcdf_file->nf90_def_var nf90_def_var_chunking nf90_def_var_chunking proc~uemep_save_netcdf_file->nf90_def_var_chunking nf90_def_var_deflate nf90_def_var_deflate proc~uemep_save_netcdf_file->nf90_def_var_deflate nf90_enddef nf90_enddef proc~uemep_save_netcdf_file->nf90_enddef nf90_put_att nf90_put_att proc~uemep_save_netcdf_file->nf90_put_att nf90_put_var nf90_put_var proc~uemep_save_netcdf_file->nf90_put_var nf90_redef nf90_redef proc~uemep_save_netcdf_file->nf90_redef proc~check check proc~uemep_save_netcdf_file->proc~check proc~uemep_save_netcdf_receptor_file->nf90_close proc~uemep_save_netcdf_receptor_file->nf90_inq_dimid proc~uemep_save_netcdf_receptor_file->nf90_inq_varid proc~uemep_save_netcdf_receptor_file->nf90_inquire_dimension proc~uemep_save_netcdf_receptor_file->nf90_open proc~uemep_save_netcdf_receptor_file->proc~area_weighted_interpolation_function proc~uemep_save_netcdf_receptor_file->nf90_create proc~uemep_save_netcdf_receptor_file->nf90_def_dim proc~uemep_save_netcdf_receptor_file->nf90_def_var proc~uemep_save_netcdf_receptor_file->nf90_enddef proc~uemep_save_netcdf_receptor_file->nf90_put_att proc~uemep_save_netcdf_receptor_file->nf90_put_var proc~uemep_save_netcdf_receptor_file->nf90_redef proc~uemep_save_netcdf_receptor_file->proc~check proc~uemep_set_dispersion_sigma_kz->proc~u_profile_neutral_val_func proc~uemep_set_dispersion_sigma_kz->proc~z_centremass_gauss_func proc~kz_func Kz_func proc~uemep_set_dispersion_sigma_kz->proc~kz_func proc~troenkz TROENKz proc~uemep_set_dispersion_sigma_kz->proc~troenkz proc~uemep_source_fraction_chemistry->proc~uemep_during_no2 proc~uemep_source_fraction_chemistry->proc~uemep_nonlocal_no2_o3 proc~uemep_source_fraction_chemistry->proc~uemep_photostationary_no2 proc~uemep_source_fraction_chemistry->proc~uemep_phototimescale_no2 proc~uemep_source_fraction_chemistry->proc~uemep_romberg_no2 proc~uemep_source_fraction_chemistry->proc~uemep_srm_no2 proc~uemep_subgrid_dispersion_integral->proc~delta_wind_direction proc~uemep_subgrid_dispersion_integral->proc~gauss_plume_cartesian_sigma_integral_func proc~uemep_subgrid_dispersion_integral->proc~u_profile_neutral_val_func proc~uemep_subgrid_dispersion_integral->proc~uemep_calculate_all_trajectory proc~uemep_subgrid_dispersion_integral->proc~uemep_minimum_distance_trajectory_fast proc~uemep_subgrid_dispersion_integral->proc~uemep_set_dispersion_params_pg proc~uemep_subgrid_dispersion_integral->proc~uemep_set_dispersion_params_simple proc~uemep_subgrid_dispersion_integral->proc~uemep_set_dispersion_sigma_kz proc~uemep_subgrid_dispersion_integral->proc~uemep_set_dispersion_sigma_kz_emulator proc~uemep_subgrid_dispersion_integral->proc~uemep_set_dispersion_sigma_pg proc~uemep_subgrid_dispersion_integral->proc~uemep_set_dispersion_sigma_simple proc~uemep_subgrid_dispersion_integral->proc~z_centremass_gauss_func proc~gauss_plume_second_order_rotated_integral_func gauss_plume_second_order_rotated_integral_func proc~uemep_subgrid_dispersion_integral->proc~gauss_plume_second_order_rotated_integral_func proc~utm2ll->dcos proc~utm2ll->dsin proc~utm2ll->dtan nf90_strerror nf90_strerror proc~check->nf90_strerror proc~date_to_julian date_to_julian proc~get_sun_angles->proc~date_to_julian proc~phih_func phih_func proc~kz_func->proc~phih_func proc~ltm2ll->dcos proc~ltm2ll->dsin proc~ltm2ll->dtan proc~uemep_save_for_emep_netcdf_file->nf90_close proc~uemep_save_for_emep_netcdf_file->nf90_inq_dimid proc~uemep_save_for_emep_netcdf_file->nf90_inq_varid proc~uemep_save_for_emep_netcdf_file->nf90_inquire_dimension proc~uemep_save_for_emep_netcdf_file->nf90_open proc~uemep_save_for_emep_netcdf_file->nf90_create proc~uemep_save_for_emep_netcdf_file->nf90_def_dim proc~uemep_save_for_emep_netcdf_file->nf90_def_var proc~uemep_save_for_emep_netcdf_file->nf90_def_var_chunking proc~uemep_save_for_emep_netcdf_file->nf90_def_var_deflate proc~uemep_save_for_emep_netcdf_file->nf90_enddef proc~uemep_save_for_emep_netcdf_file->nf90_put_att proc~uemep_save_for_emep_netcdf_file->nf90_put_var proc~uemep_save_for_emep_netcdf_file->nf90_redef proc~uemep_save_for_emep_netcdf_file->proc~check proc~date_to_julian->proc~date_to_number

Variables

Type Attributes Name Initial
real :: end_time_cpu
logical :: have_read_emep = .false.
integer :: source_index
real :: start_time_cpu

Source Code

program uEMEP
    !! ****************************************************************************
    !!   uEMEP
    !!
    !!   Bruce rolstad Denby (brucerd@met.no)
    !!   MET Norway
    !! ****************************************************************************
    !! Reminder note for compilation on Intel
    !! To add this library to your linker input in the IDE, open the context menu for the project node, choose Properties, then in the Project Properties dialog box, choose Linker
    !! , and edit the Linker Input to add legacy_stdio_definitions.lib to the semi-colon-separated list
    !! Tools/options/intel compilers and tools/visual fortran/compilers and add bin, include and lib, e.g. C:\Program Files (x86)\netcdf 4.3.3.1\bin;
    !!   Control programme for running the downscaling routine uEMEP
    !! ****************************************************************************
    !!
    !! ****************************************************************************
    !! To link to netcdf in visual studio
    !! Tools - options - Intel compilers - VisusalFortran - Compilers - Libraries/includes/executables
    !! C:\Program Files (x86)\netcdf 4.3.3.1\include
    !! C:\Program Files (x86)\netcdf 4.3.3.1\bin
    !! C:\Program Files (x86)\netcdf 4.3.3.1\lib
    
    use uemep_configuration
    use uEMEP_definitions
    use read_command_line, only: uEMEP_read_command_line, check_command_line
    use set_constants, only: uEMEP_set_constants, uEMEP_set_pollutant_loop, &
        uEMEP_reset_constants, uEMEP_set_species_loop
    use read_config, only: uEMEP_read_config
    use read_emep, only: uEMEP_read_EMEP
    use read_meteo_nc, only: uEMEP_read_meteo_nc
    use read_rwc_heating_data, only: uEMEP_read_RWC_heating_data
    use save_emission_netcdf, only: uEMEP_calculate_emissions_for_EMEP
    use set_subgrids, only: uEMEP_set_subgrids, uEMEP_set_subgrid_select_latlon_centre
    use read_landuse_rivm_data, only: uEMEP_read_landuse_rivm_data, &
        uEMEP_set_landuse_classes, uEMEP_read_netcdf_landuse_latlon
    use read_roadlink_data_ascii, only: read_country_bounding_box_data, &
        uEMEP_read_roadlink_data_ascii, uEMEP_change_road_data, uEMEP_read_roadlink_emission_data
    use set_filenames, only: uEMEP_set_filenames
    use read_receptor_data, only: uEMEP_read_receptor_data, uEMEP_set_loop_receptor_grid, &
        uEMEP_grid_receptor_data
    use read_ssb_data, only: uEMEP_read_netcdf_population, uEMEP_read_SSB_data, &
        uEMEP_read_netcdf_population_latlon
    use read_agriculture_asi_data, only: uEMEP_read_agriculture_rivm_data, &
        uEMEP_read_emission_rivm_data
    use read_industry_data, only: uEMEP_read_industry_data
    use read_shipping_asi_data, only: uEMEP_preaggregate_shipping_asi_data, &
        uEMEP_read_netcdf_shipping_latlon, uEMEP_read_weekly_shipping_asi_data, &
        uEMEP_read_monthly_and_daily_shipping_asi_data, uEMEP_read_shipping_asi_data
    use read_time_profiles, only: uEMEP_read_time_profiles
    use redistribute_data, only: uEMEP_redistribute_local_source, uEMEP_disperse_local_source, &
        uEMEP_combine_local_source
    use save_netcdf_file, only: uEMEP_save_netcdf_control
    use subgrid_deposition, only: uEMEP_subgrid_deposition
    use subgrid_dispersion, only: uEMEP_subgrid_dispersion
    use set_emission_factors, only: uEMEP_set_emission_factors, uEMEP_convert_proxy_to_emissions, &
        uEMEP_nox_emission_temperature
    use subgrid_emep, only: uEMEP_subgrid_EMEP, uEMEP_subgrid_EMEP_from_in_region
    use subgrid_deposition_emep, only: uEMEP_set_deposition_velocities, &
        uEMEP_subgrid_deposition_EMEP, uEMEP_calculate_deposition
    use subgrid_emission_emep, only: uEMEP_subgrid_emission_EMEP
    use subgrid_meteo_emep, only: uEMEP_subgrid_meteo_EMEP
    use tiling_routines, only: uEMEP_set_tile_grids, uEMEP_set_region_tile_grids
    use chemistry_no2, only: uEMEP_chemistry, correct_annual_mean_chemistry
    use crossreference_grids, only: uEMEP_crossreference_grids
    use grid_roads, only: uEMEP_grid_roads
    use define_subgrid, only: uEMEP_define_subgrid_extent, uEMEP_define_subgrid
    use calculate_exposure, only: uEMEP_calculate_exposure
    use auto_subgrid, only: uEMEP_region_mask_new

    use uemep_logger

    implicit none

    integer :: source_index
    real :: start_time_cpu, end_time_cpu
    logical :: have_read_emep = .false.

    ! Start timer
    call cpu_Time(start_time_cpu)

        ! Set model version
    model_version_str='7.0.2'

    ! Check command line arguments and handle special cases that have to be printed to stdout
    call check_command_line()

    write(*,*) ''
    write(*,*) '------------------------------------------------------------------------'
    write(*,*) 'Starting program uEMEP v'//trim(model_version_str)
    write(*,*) '------------------------------------------------------------------------'

    ! Read the command line, assigning the configuration file names and the substitution date_str
    call uEMEP_read_command_line()

    ! Set constants and variable names to be read from EMEP and meteo files
    call uEMEP_set_constants()

    ! Read the configuration files. Hard coded to be up to 5 files. Log file opened in this routine
    call uEMEP_read_config()

    ! If selected then specify subgrid using the lat and lon coordinates
    if (select_latlon_centre_domain_position_flag) then
        call uEMEP_set_subgrid_select_latlon_centre()
    end if

    ! Set the landuse if required
    if (use_landuse_as_proxy .or. read_landuse_flag) then
        call uEMEP_set_landuse_classes()
    end if

    ! Set the pollutant and compound loop definitions
    call uEMEP_set_pollutant_loop()

    !Reset any constants needed based on the configuration input
    call uEMEP_reset_constants()

    ! Autoselect files and countries if required. Place here because it changes config data
    if (auto_select_OSM_country_flag .or. trim(select_country_by_name) .ne. '') then
        call read_country_bounding_box_data()
    end if

    ! Set the EMEP species definitions if they are to be read
    call uEMEP_set_species_loop()

    ! Set the names of files to be written to when saving intermediate files
    call uEMEP_set_filenames()

    ! Read positions of receptor points (usually observations) for specifying multiple receptor grids or calculation points within a single grid
    call uEMEP_read_receptor_data()

    ! Enter the routine for saving emissions used in uEMEP for EMEP in netcdf files defined for the Norwegian domain in Lambert coordinates. Will stop after this
    if (save_emissions_for_EMEP(allsource_index)) then
        call uEMEP_calculate_emissions_for_EMEP()
    end if

    ! We set up an initial emission grid parameter set that can be used to first select the outester region
    ! This has been done to enable reading of multiple road link files but only keeping those in the initial defined emission area
    call uEMEP_set_subgrids()
    init_emission_subgrid_min = emission_subgrid_min
    init_emission_subgrid_max = emission_subgrid_max
    init_emission_subgrid_dim = emission_subgrid_dim
    init_emission_subgrid_delta = emission_subgrid_delta

    ! Set the grid loop (g_loop) extent based on use_multiple_receptor_grids_flag or not
    if (use_multiple_receptor_grids_flag) then
        start_grid_loop_index = 1
        end_grid_loop_index = n_receptor_in
        n_receptor = 1
        n_valid_receptor = 1
        valid_receptor_index(1) = 1
    else
        start_grid_loop_index = 1
        end_grid_loop_index = 1
        n_receptor = n_receptor_in
        use_receptor(start_grid_loop_index) = .true.
    end if

    first_g_loop = .true.

    ! If the use_single_time_loop_flag is true (Reads and calculates one time step at a time to save memory) then set these parameters
    if (use_single_time_loop_flag) then
        start_time_loop_index = 1
        end_time_loop_index = end_time_nc_index - start_time_nc_index + 1
        subgrid_dim(t_dim_index) = 1
        dim_length_nc(time_dim_nc_index) = 1
    else
        start_time_loop_index = 1
        end_time_loop_index = 1
        subgrid_dim(t_dim_index) = end_time_nc_index - start_time_nc_index + 1
        dim_length_nc(time_dim_nc_index) = subgrid_dim(t_dim_index)
    end if

    ! Start internal grid receptor loop using only those receptor grids specified in uEMEP_read_receptor_data
    do g_loop = start_grid_loop_index, end_grid_loop_index
        if (use_receptor(g_loop)) then
            ! Set the grid definitions according to the receptor/observation positions
            call uEMEP_set_loop_receptor_grid()

            ! Create the subgrid
            call uEMEP_set_subgrids()

            ! Set emission factors for the current subgrid
            call uEMEP_set_emission_factors()

            ! Start the internal time loop
            do t_loop = start_time_loop_index, end_time_loop_index
                ! Write progress in time and receptor grid loop to screen
                write(*,*) 'REC LOOP= ', g_loop, ' OF ', end_grid_loop_index
                if (unit_logfile .ne. 0) then
                    write(unit_logfile,*) 'REC LOOP= ', g_loop,' OF ', end_grid_loop_index
                end if
                write(*,*) 'TIME LOOP=', t_loop,' OF ', end_time_loop_index
                if (unit_logfile .ne. 0) then
                    write(unit_logfile,*) 'TIME LOOP=', t_loop,' OF ', end_time_loop_index
                end if

                ! For the first time loop set the initial subgrid range values used in reading EMEP and meteo data
                if (t_loop .ge. start_time_loop_index) then
                    init_subgrid_min = subgrid_min
                    init_subgrid_max = subgrid_max
                end if

                ! Read EMEP data from netcdf files. Time stamps based on this
                if ( .not. have_read_emep) then
                    call uEMEP_read_EMEP()
                end if

                ! If read EMEP only once flag is on then turn off the EMEP reading
                ! This is intended for use with multiple receptor files and requires alot of memory so is permanently turned off
                if (read_EMEP_only_once_flag) have_read_emep = .true.

                ! Read meteo grid from netcdf files if required
                if (use_alternative_meteorology_flag .or. use_alternative_z0_flag) then
                    call uEMEP_read_meteo_nc()
                end if

                ! Set the following for the first internal time step only
                if (t_loop .eq. start_time_loop_index) then
                    ! Define subgrid positions and buffer zones. Must be done after reading EMEP data as is based on EMEP grid sizes
                    call uEMEP_define_subgrid_extent()
                    call uEMEP_define_subgrid()

                    ! Define and allocate cross reference subgrids used to transfer data between different subgrids
                    call uEMEP_crossreference_grids()

                    ! Read all road link data from ascii files
                    if (calculate_source(traffic_index) .and. .not. read_subgrid_emission_data) then
                        ! Do this only for the first receptor grid loop
                        if (first_g_loop) then
                            call uEMEP_read_roadlink_data_ascii()
                            call uEMEP_change_road_data()
                            
                            ! Read in the NORTRIP emission data for traffic in the first g_loop if required
                            if (use_NORTRIP_emission_data) then
                                call uEMEP_read_roadlink_emission_data()
                            end if
                        end if
                    end if

                    ! Read in and grid industry data
                    if (calculate_source(industry_index) .and. .not. read_subgrid_emission_data) then
                        call uEMEP_read_industry_data()
                    end if

                    ! Read and subgrid shipping data
                    if (calculate_source(shipping_index) .and. .not. read_subgrid_emission_data) then
                        ! If necessary aggregate shipping data first
                        call uEMEP_preaggregate_shipping_asi_data()
                        
                        ! Read in shipping data
                        if (read_shipping_from_netcdf_flag) then
                            call uEMEP_read_netcdf_shipping_latlon()
                        else
                            if (read_weekly_shipping_data_flag) then
                                call uEMEP_read_weekly_shipping_asi_data()
                            else if (read_monthly_and_daily_shipping_data_flag) then
                                call uEMEP_read_monthly_and_daily_shipping_asi_data()
                            else
                                call uEMEP_read_shipping_asi_data()
                            end if
                        end if
                    end if

                    ! Read in proxy data for home heating. Currently dwelling density
                    if (calculate_source(heating_index) .and. .not. read_subgrid_emission_data) then
                        ! If calculating tiles then read only the dwelling data
                        if (calculate_tiling_flag .or. calculate_region_tiling_flag) then
                            use_RWC_emission_data = .false.
                        end if
                        
                        ! Read the Residential Wood Combustion data from MetVed
                        if (use_RWC_emission_data) then
                            call uEMEP_read_RWC_heating_data()
                        else
                            ! Read and subgrid SSB dwelling data
                            SSB_data_type = dwelling_index
                            if (read_population_from_netcdf_flag) then
                                call uEMEP_read_netcdf_population_latlon()
                            else if (read_population_from_netcdf_local_flag) then
                                call uEMEP_read_netcdf_population()
                            else
                                call uEMEP_read_SSB_data()
                            end if
                        end if
                    end if

                    ! Read and subgrid agriculture data
                    if (calculate_source(agriculture_index) .and. use_rivm_agricuture_emission_data .and. .not. read_subgrid_emission_data) then
                        ! Currently only data from RIVM here
                        call uEMEP_read_agriculture_rivm_data()
                    end if
                    if (read_rivm_landuse_flag) then
                        call uEMEP_read_landuse_rivm_data()
                    end if
                    if (read_subgrid_emission_data) then
                        ! Special routine for reading in RIVM point source emission data
                        if (use_rivm_subgrid_emission_format) then
                            call uEMEP_read_emission_rivm_data()
                        else
                            ! Nothing else available yet
                        end if
                    end if

                    ! Read in population data
                    if (calculate_population_exposure_flag .or. use_population_positions_for_auto_subgrid_flag .or. save_population) then
                        ! Read and subgrid SSB population data
                        SSB_data_type = population_data_type
                        if (read_population_from_netcdf_flag) then
                            call uEMEP_read_netcdf_population_latlon()
                        else if (read_population_from_netcdf_local_flag) then
                            call uEMEP_read_netcdf_population()
                        else
                            call uEMEP_read_SSB_data()
                        end if
                    end if

                    if (use_landuse_as_proxy .or. read_landuse_flag) then
                        call uEMEP_read_netcdf_landuse_latlon()
                    end if

                    ! Autogrid setting for selecting which subgrids to calculate
                    if (use_emission_positions_for_auto_subgrid_flag(allsource_index)) then
                        call uEMEP_grid_roads()
                        write(unit_logfile,*) "'uEMEP_auto_subgrid' has been disabled, because array 'use_subgrid_val' is disabled"
                        stop
                        !call uEMEP_auto_subgrid()
                    end if

                    ! No longer call uEMEP_region_mask, as use_subgrid_val is deactivated and use_subgrid is set elsewhere
                    !if (use_region_select_and_mask_flag) then
                    !    call uEMEP_region_mask()
                    !end if

                    ! New subroutine for reading region mask and region fraction
                    if (trace_emissions_from_in_region .or. use_region_select_and_mask_flag) then
                        call uEMEP_region_mask_new()
                    endif

                    ! Specify the subgrids sizes to be calculated using use_receptor_region
                    call uEMEP_grid_receptor_data

                    ! Carry out tiling. Programme will stop here
                    if (calculate_tiling_flag) then
                        call uEMEP_grid_roads()
                        call uEMEP_set_tile_grids()
                    end if

                    ! Carry out regional tiling. Programme will stop here
                    if (calculate_region_tiling_flag) then
                        call uEMEP_set_region_tile_grids()
                    end if
                end if

                ! Read time profiles for emissions
                call uEMEP_read_time_profiles()

                ! Call grid_roads again to include the time variation from NORTRIP
                if ( .not. read_subgrid_emission_data) then
                    call uEMEP_grid_roads()
                end if

                ! Interpolate meteo data to subgrid. Placed on the integral subgrid
                call uEMEP_subgrid_meteo_EMEP()

                ! Replaces proxy emissions with distributed EMEP emissions
                call uEMEP_subgrid_emission_EMEP()

                ! Convert proxies to emissions including time profiles
                call uEMEP_convert_proxy_to_emissions()

                ! Adjust traffic emissions of NOx based on temperature
                if (use_traffic_nox_emission_temperature_dependency) then
                    call uEMEP_nox_emission_temperature()
                end if

                ! Places EMEP deposition velocities into the deposition_subgrid
                if (calculate_deposition_flag) then
                    call uEMEP_set_deposition_velocities()
                end if

                ! Set travel_time values to 0 outside of the source loop as these are aggregated over all sources
                traveltime_subgrid = 0.0
                
                ! Subgrid dispersion calculation
                do source_index = 1, n_source_index
                    if (calculate_source(source_index) .and. .not. use_plume_dispersion_deposition_flag) then
                        call uEMEP_subgrid_dispersion(source_index)
                    end if
                end do

                do source_index = 1, n_source_index
                    if (calculate_source(source_index) .and. use_plume_dispersion_deposition_flag) then
                        call uEMEP_subgrid_deposition(source_index)
                    end if
                end do

                ! Interpolate local_subgrid if necessary
                if (interpolate_subgrids_flag) then
                    write(unit_logfile,*) "'uEMEP_interpolate_auto_subgrid' has been disabled, because array 'use_subgrid_val' is disabled"
                    stop
                    !call uEMEP_interpolate_auto_subgrid()
                end if

                ! Old diagnostic for comparing EMEP and proxy data emissions. Working only on lat lon EMEP grids. Do not use
                if (make_EMEP_grid_emission_data(allsource_index)) then
                    !call uEMEP_aggregate_proxy_emission_in_EMEP_grid
                end if

                ! Put EMEP data into the additional subgrids for all sources.
                ! Must be run first
                if (EMEP_additional_grid_interpolation_size .gt. 0.0) then
                    calculate_EMEP_additional_grid_flag = .true.
                    call uEMEP_subgrid_EMEP()
                    calculate_EMEP_additional_grid_flag = .false.
                end if

                ! Put EMEP data into subgrids for all sources
                call uEMEP_subgrid_EMEP()

                ! Call the new subroutine for calculating more precise estimates of the contributions from outside moving window but within region
                if (trace_emissions_from_in_region) then
                    if (EMEP_grid_interpolation_flag == 0 .or. EMEP_grid_interpolation_flag == 6) then
                        call uEMEP_subgrid_EMEP_from_in_region()
                    end if
                    ! NB: Only implemented to be consistent with interpolation flag 0 and 6
                end if

                if (calculate_deposition_flag) then
                    call uEMEP_subgrid_deposition_EMEP()
                end if

                ! Interpolate EMEP to sub-grid
                do source_index = 1, n_source_index
                    if (calculate_source(source_index)) then
                        ! Redistributes proxy subgrid data into the EMEP grid concentrations only when local_subgrid_method_flag=1 (based on EMEP concentration redistribution scaling factor)
                        call uEMEP_redistribute_local_source(source_index)
                        
                        ! Places the proxy_subgrid data into the local_subgrid when local_subgrid_method_flag<>1
                        call uEMEP_disperse_local_source(source_index)
                    end if
                end do

                ! Combine and save sources in local and total values
                call uEMEP_combine_local_source()

                ! Calculate the nonlocal depositions
                if (calculate_deposition_flag) then
                    call uEMEP_calculate_deposition()
                end if

                ! Calculate chemistry for NO2 and O3
                call uEMEP_chemistry()

                ! Correct annual mean chemistry for pdf
                if (use_annual_mean_pdf_chemistry_correction) then
                    call correct_annual_mean_chemistry()
                end if

                ! Calculate exposure
                if (calculate_population_exposure_flag) then
                    call uEMEP_calculate_exposure()
                end if

                ! Save results to netcdf
                if (save_netcdf_file_flag .or. save_netcdf_receptor_flag) then
                    call uEMEP_save_netcdf_control()
                end if

            end do ! t_loop

            ! Update first_g_loop flag
            if (first_g_loop) first_g_loop = .false.

        end if ! use_receptor
    end do ! g_loop

    call cpu_time(end_time_cpu)

    if (unit_logfile .ne. 0) then
        write(unit_logfile,*) ''
        write(unit_logfile,*) '------------------------------------------------------------------------'
        write(unit_logfile,*) 'Ending program '//trim(model_version_str)
        write(unit_logfile,'(a,i5,a,i2)') ' CPU time taken (MM:SS): ', floor((end_time_cpu - start_time_cpu)/60.0), ':', floor(mod(end_time_cpu - start_time_cpu, 60.0))
        write(unit_logfile,*) '------------------------------------------------------------------------'
    end if

    if (unit_logfile .gt. 0) then
        close(unit_logfile, status='keep')
    end if

    ! Save finished file
    if (trim(finished_filename) .ne. '') then
        if (save_netcdf_receptor_flag .and. n_valid_receptor .ne. 0) then
            write(*,'(2A)') 'Writing finished file for uEMEP output: ', trim(finished_file_rec)
            open(unit_finishedfile, file=finished_file_rec, status='replace')
            close(unit_finishedfile)
        end if
        if (save_netcdf_file_flag) then
            write(*,'(2A)') 'Writing finished file for uEMEP output: ', trim(finished_file)
            open(unit_finishedfile, file=finished_file, status='replace')
            close(unit_finishedfile)
        end if
    end if

    write(*,*) ''
    write(*,*) '------------------------------------------------------------------------'
    write(*,*) 'Ending program '//trim(model_version_str)
    write(*,'(a,i5,a,i2)') ' CPU time taken (MM:SS): ', floor((end_time_cpu - start_time_cpu)/60.0),':', floor(mod(end_time_cpu - start_time_cpu, 60.0))
    write(*,*) '------------------------------------------------------------------------'

end program uEMEP