uEMEP_convert_proxy_to_emissions Subroutine

public subroutine uEMEP_convert_proxy_to_emissions()

Uses

  • proc~~uemep_convert_proxy_to_emissions~~UsesGraph proc~uemep_convert_proxy_to_emissions uEMEP_convert_proxy_to_emissions module~uemep_definitions uEMEP_definitions proc~uemep_convert_proxy_to_emissions->module~uemep_definitions

Arguments

None

Called by

proc~~uemep_convert_proxy_to_emissions~~CalledByGraph proc~uemep_convert_proxy_to_emissions uEMEP_convert_proxy_to_emissions proc~uemep_calculate_emissions_for_emep uEMEP_calculate_emissions_for_EMEP proc~uemep_calculate_emissions_for_emep->proc~uemep_convert_proxy_to_emissions program~uemep uEMEP program~uemep->proc~uemep_convert_proxy_to_emissions program~uemep->proc~uemep_calculate_emissions_for_emep

Source Code

    subroutine uEMEP_convert_proxy_to_emissions

        use uEMEP_definitions

        implicit none

        integer i_source,i_subsource
        integer tt
        real sum_emission_subgrid

        integer i_pollutant

        !Do not calculate emissions if EMEP emissions are to be used
        if (local_subgrid_method_flag.eq.3) return

        write(unit_logfile,'(A)') ''
        write(unit_logfile,'(A)') '================================================================'
        write(unit_logfile,'(A)') 'Converting proxy data to emissions (uEMEP_convert_proxy_to_emissions)'
        write(unit_logfile,'(A)') '================================================================'

        !Set all emissions to the same constant emission value with emissions in ug/sec for all sources
        do i_source=1,n_source_index
            if (calculate_source(i_source)) then
                i_subsource=1
                do i_pollutant=1,n_pollutant_loop
                    !Do not calculate for traffic if use_NORTRIP_emission_data=.true. and  use_NORTRIP_emission_pollutant=.false.). This is done in uEMEP_grid_roads
                    if (i_source.ne.traffic_index.or.read_subgrid_emission_data &
                        .or.(i_source.eq.traffic_index.and..not.use_NORTRIP_emission_data) &
                        .or.(i_source.eq.traffic_index.and.use_NORTRIP_emission_data.and..not.use_NORTRIP_emission_pollutant(pollutant_loop_index(i_pollutant)))) then

                        do tt=1,subgrid_dim(t_dim_index)
                            emission_subgrid(:,:,tt,i_source,i_pollutant)=proxy_emission_subgrid(:,:,i_source,i_pollutant) &
                                *emission_factor_conversion(pollutant_loop_index(i_pollutant),i_source,i_subsource) &
                                *emission_time_profile_subgrid(:,:,tt,i_source,i_pollutant)

                            !write(*,*) sum(proxy_emission_subgrid(:,:,i_source,i_subsource)),emission_factor_conversion(compound_index,i_source,i_subsource),sum(emission_time_profile_subgrid(:,:,tt,i_source,i_subsource))
                        enddo
                    endif

                    sum_emission_subgrid=sum(emission_subgrid(:,:,:,i_source,i_pollutant))
                    write(unit_logfile,'(A,es12.2)') 'Sum of emissions for '//trim(source_file_str(i_source))//' '//trim(pollutant_file_str(pollutant_loop_index(i_pollutant)))//' over period (kg)=',sum_emission_subgrid*3600./1.e9
                enddo
            endif
        enddo

        !Check NOx shipping
        !i_source=shipping_index
        !i_pollutant=pollutant_loop_back_index(nox_nc_index)
        !do tt=1,subgrid_dim(t_dim_index)
        !    write(unit_logfile,'(A,es12.2)') 'Sum of emissions per hour '//trim(source_file_str(i_source))//' '//trim(pollutant_file_str(pollutant_loop_index(i_pollutant)))//' over period (kg)=',sum(emission_subgrid(:,:,tt,i_source,i_pollutant))*3600./1.e9
        !enddo

    end subroutine uEMEP_convert_proxy_to_emissions